services.h 16 KB
Newer Older
Linus Tolke's avatar
Linus Tolke committed
1
/*
2
 * $Id: services.h,v 0.69 2003/08/22 06:45:19 ceder Exp $
3
 * Copyright (C) 1991-1999, 2001-2002  Lysator Academic Computer Association.
Linus Tolke's avatar
Linus Tolke committed
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 *
 * This file is part of the LysKOM server.
 * 
 * LysKOM is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by 
 * the Free Software Foundation; either version 1, or (at your option) 
 * any later version.
 * 
 * LysKOM is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with LysKOM; see the file COPYING.  If not, write to
 * Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
 * or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, 
 * MA 02139, USA.
 *
Per Cederqvist's avatar
Per Cederqvist committed
23
 * Please report bugs at http://bugzilla.lysator.liu.se/. 
Linus Tolke's avatar
Linus Tolke committed
24
 */
Per Cederqvist's avatar
.    
Per Cederqvist committed
25
26
27
28
/*
 *  services.h  --  All the services the LysKOM server makes available
 *		    for clients.
 *
29
30
 *  These functions match the requests defined in doc/Protocol-A.texi.
 *  See the descriptions in that file for documentation.
Per Cederqvist's avatar
.    
Per Cederqvist committed
31
32
33
34
35
 *
 *  Created by ceder 1990-03-23
 */


36
37
#ifndef  SERVICES_H_ALREADY_INCLUDED
#define  SERVICES_H_ALREADY_INCLUDED
Per Cederqvist's avatar
.    
Per Cederqvist committed
38
39
40
41
42
43
44



/*
 * Session control
 */

45
extern  Success
46
47
login_old (Pers_no	person,
	   const String	passwd);
48

Per Cederqvist's avatar
.    
Per Cederqvist committed
49
extern  Success
50
51
52
login (Pers_no		person,
       const String	passwd,
       Bool		invisible);
Per Cederqvist's avatar
.    
Per Cederqvist committed
53
54

extern  Success
55
logout (void);	/* can never fail */
Per Cederqvist's avatar
.    
Per Cederqvist committed
56
57
58

/* Change Conference */
extern  Success
59
change_conference (Conf_no conference);
Per Cederqvist's avatar
.    
Per Cederqvist committed
60
61
62
63


/* Change name of a person or conference. */
extern  Success
64
65
change_name (Conf_no	  conf_no,
	     const String new_name);
Per Cederqvist's avatar
.    
Per Cederqvist committed
66
67

extern  Success
68
change_what_i_am_doing (String  what_am_i_doing);
Per Cederqvist's avatar
.    
Per Cederqvist committed
69

70
71
/* Client version: one call to set, two to retrieve. */
extern  Success
72
73
set_client_version (const String client_name,
		    const String client_version);
74
75

extern  Success
76
77
get_client_name (Session_no session_no,
		 String *result);
78
79

extern  Success
80
81
get_client_version (Session_no session_no,
		    String *result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
82

83
84
85
86
87
extern  Success
set_scheduling(Session_no session_no,
	       unsigned short priority,
	       unsigned short weight);

Per Cederqvist's avatar
.    
Per Cederqvist committed
88
89
90
/* Get info about a session */

extern  Success
91
92
get_session_info  (Session_no session_no,
		   Session_info *result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
93

94
extern  Success
95
96
get_session_info_ident  (Session_no session_no,
			 Session_info_ident *result);
97

Per Cederqvist's avatar
Per Cederqvist committed
98
extern  Success
99
100
get_static_session_info (Session_no session_no,
			 Static_session_info *result);
101
102
103
104

extern  Success
get_scheduling(Session_no session_no,
	       Scheduling_info *result);
Per Cederqvist's avatar
Per Cederqvist committed
105

Per Cederqvist's avatar
.    
Per Cederqvist committed
106
107
108
109
110
111
/*
 * Disconnect a session. You can disconnect your own session (even if
 * you are not logged in) and any session where you are supervisor of
 * the user that is logged in on that session.
 */
extern  Success
112
disconnect (Session_no session_no);
Per Cederqvist's avatar
.    
Per Cederqvist committed
113
114
115
116
117

/*
 * Returns your session number
 */
extern  Success
118
who_am_i (Session_no *session_no);
Per Cederqvist's avatar
.    
Per Cederqvist committed
119

Per Cederqvist's avatar
Per Cederqvist committed
120
121
122
123
124
/*
 * Set state in the session
 */

extern  Success
125
user_active (void);
126
127
128
129
130

extern  Success
set_connection_time_format(int use_utc);
    

Per Cederqvist's avatar
.    
Per Cederqvist committed
131
132
133
134
135
136
137
138
139

/******************************
*     Person-related calls    *
******************************/

/*
 *  Create a new person.  Returns 0 if any error occured.
 */
extern  Pers_no
140
141
create_person_old (const String  name,
		   const String  passwd);
142
143

extern Pers_no
144
145
146
147
create_person (const String name,
	       const String passwd,
	       Personal_flags flags,
	       Aux_item_list *conf_aux);
Per Cederqvist's avatar
.    
Per Cederqvist committed
148
149


David Byers's avatar
David Byers committed
150
151
152
153
extern Success
set_pers_flags(Pers_no pers_no,
               Personal_flags flags);

Per Cederqvist's avatar
.    
Per Cederqvist committed
154
155
/* Obsolete call; use get_person_stat instead. */
extern  Success
156
157
158
get_person_stat_old (Pers_no		  person,
		     int		  mask,
		     Person		* result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
159
160

extern  Success
161
162
get_person_stat (Pers_no	  person,
		 Person		* result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
163
164

extern  Success
165
166
167
168
get_created_texts (Pers_no		  person,
		   Local_text_no	  first,
		   unsigned long	  no_of_texts,
		   L2g_iterator 	 *created_texts);
Per Cederqvist's avatar
.    
Per Cederqvist committed
169

170
extern  Success
171
172
173
174
map_created_texts (Pers_no	  person,
		   Local_text_no  first,
		   unsigned long  no_of_texts,
		   Text_mapping  *created_texts);
175

176
177
178
179
180
181
extern  Success
map_created_texts_reverse(Pers_no	 person,
			  Local_text_no  local_no_ceiling,
			  unsigned long  no_of_texts,
			  Text_mapping_reverse *created_texts);

182
extern  Success
183
184
185
186
187
get_membership_old (Pers_no		  person,
		    unsigned short	  first,
		    unsigned short	  no_of_confs,
		    Bool		  want_read_texts,
		    Membership_list	* memberships);
188

Per Cederqvist's avatar
.    
Per Cederqvist committed
189
extern  Success
Per Cederqvist's avatar
Per Cederqvist committed
190
191
192
193
194
get_membership_10(Pers_no           person,
		  unsigned short    first,
		  unsigned short    no_of_confs,
		  Bool		    want_read_texts,
		  Membership_list * memberships);
Per Cederqvist's avatar
.    
Per Cederqvist committed
195

196
197
198
199
200
201
202
203
extern  Success
get_membership(Pers_no           person,
	       unsigned short    first,
	       unsigned short    no_of_confs,
	       Bool              want_read_ranges,
	       unsigned long     max_ranges,
	       Membership_list * memberships);

Per Cederqvist's avatar
.    
Per Cederqvist committed
204
extern  Success
205
206
set_priv_bits (Pers_no	 person,
	       Priv_bits privileges);
Per Cederqvist's avatar
.    
Per Cederqvist committed
207
208
209
210
211
212


/*  Set the password of PERSON to NEW_PWD.  OLD_PWD is the password
 *  of the person who does the set.  This is not necessarily the
 *  same as the one who gets it set.	*/
extern  Success
213
214
215
set_passwd (Pers_no	   person,
	    const String   old_pwd,
	    const String   new_pwd);
Per Cederqvist's avatar
.    
Per Cederqvist committed
216
217
218


/* You can query for unread texts without logging in. */
219
extern  Success
220
221
222
query_read_texts_old (Pers_no	     pers_no,
		      Conf_no	     conf_no,
		      Membership   * result  );
223

Per Cederqvist's avatar
.    
Per Cederqvist committed
224
extern  Success
Per Cederqvist's avatar
Per Cederqvist committed
225
226
227
query_read_texts_10(Pers_no      pers_no,
		    Conf_no      conf_no,
		    Membership * result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
228

229
230
231
232
233
234
235
236
extern  Success
query_read_texts(Pers_no        pers_no,
		 Conf_no        conf_no,
		 Bool           want_read_ranges,
		 unsigned long  max_ranges,
		 Membership    *result);


Per Cederqvist's avatar
.    
Per Cederqvist committed
237
238

extern Success
239
240
get_unread_confs(Pers_no       pers_no,
		 Conf_no_list *result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
241
242

extern Success
243
244
set_user_area(Pers_no	pers_no,
	      Text_no	user_area);
Per Cederqvist's avatar
.    
Per Cederqvist committed
245
246
247
248
249
250
251
252


/****************************************
*	Conference-related calls	*
****************************************/


extern  Conf_no
253
254
create_conf_old (const String	  name,
		 Conf_type	  type);
255
256

extern Conf_no
257
258
259
create_conf (const String name,
	     Conf_type type,
	     Aux_item_list *aux);
260
261

extern Success
262
263
264
modify_conf_info (Conf_no conf_no,
		  Number_list *items_to_delete,
		  Aux_item_list *items_to_add);
Per Cederqvist's avatar
.    
Per Cederqvist committed
265
266
267
268


/*  Delete a conference.  Also used to delete persons.  */
extern  Success
269
delete_conf (Conf_no	conf);
Per Cederqvist's avatar
.    
Per Cederqvist committed
270
271
272
273
274


/*
 *  Map conference name to number.  Returns a list of the conferences
 *  that match the name NAME. Can be done without logging in.
275
 * This should be phased out.
Per Cederqvist's avatar
.    
Per Cederqvist committed
276
277
 */
extern  Success
278
279
lookup_name (const String   name,
	     Conf_list_old *result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
280

281
extern Success
282
283
284
285
lookup_z_name (const String name,
	       int want_persons,
	       int want_confs,
	       Conf_z_info_list *result);
286

287
288
/* Use these two lookup-calls instead of lookup_name */
extern  Success
289
290
lookup_person (const String  pattern,
	       Conf_no_list  *result);
291
292

extern  Success
293
294
lookup_conf (const String  pattern,
	     Conf_no_list  *result);
295

296
297
/* Two functions for matching regexps. */
extern  Success
298
299
re_lookup_person (const String  regexp,
		  Conf_no_list  *result);
300
301

extern  Success
302
303
re_lookup_conf (const String  regexp,
		Conf_no_list  *result);
304

305
extern  Success
306
307
308
309
re_z_lookup (const String      regexp,
	     int               want_persons,
	     int	       want_confs,
	     Conf_z_info_list *result);
310

311
extern Success
312
get_collate_table (String * result);
313
314

extern  Success
315
316
317
get_conf_stat_older (Conf_no	 conf_no,
		     int	 mask,
		     Conference *result);
318

Per Cederqvist's avatar
.    
Per Cederqvist committed
319
extern  Success
320
321
get_conf_stat_old (Conf_no		  conf_no,
		   Conference		* result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
322
323

extern  Success
324
325
get_conf_stat (Conf_no		  conf_no,
	       Conference	* result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
326

327
extern Success
328
329
get_uconf_stat (Conf_no		  conf_no,
		Small_conf	* result);
330

Per Cederqvist's avatar
.    
Per Cederqvist committed
331
extern  Success
332
333
334
335
get_members (Conf_no	      conf,
	     unsigned short   first,
	     unsigned short   no_of_members,
	     Member_list    * members);
336
337

extern  Success
338
339
340
341
get_members_old (Conf_no	  conf,
		 unsigned short   first,
		 unsigned short   no_of_members,
		 Member_list	* members	);
Per Cederqvist's avatar
.    
Per Cederqvist committed
342
343
344
345
346



/* add_member is also used to change the priority of a conference */
extern  Success
347
348
349
350
351
add_member (Conf_no		conf_no,
	    Pers_no		pers_no,
	    unsigned char	priority,
	    unsigned short	where, /* Range of where is [0..] */
	    Membership_type   * type);
352
353

extern  Success
354
355
356
357
add_member_old (Conf_no		conf_no,
		Pers_no		pers_no,
		unsigned char	priority,
		unsigned short	where	); /* Range of where is [0..] */
358
359

extern Success
360
361
362
set_membership_type (Pers_no          pers_no,
		     Conf_no          conf_no,
		     Membership_type *type   );
Per Cederqvist's avatar
.    
Per Cederqvist committed
363
364
365


extern  Success
366
367
sub_member (Conf_no	conf_no,
	    Pers_no	pers_no);
Per Cederqvist's avatar
.    
Per Cederqvist committed
368
369
370
371
372


/*
 * Tell the server that I want to mark/unmark texts as read so that I
 * get no_of_unread unread texts in conf_no.
Kent Engström's avatar
Kent Engström committed
373
374
375
 *
 * The new alternative function marks last_read as the last read local
 * text. Use this one to avoid race conditions.
Per Cederqvist's avatar
.    
Per Cederqvist committed
376
 */
Kent Engström's avatar
Kent Engström committed
377

Per Cederqvist's avatar
.    
Per Cederqvist committed
378
extern  Success
379
380
set_unread (Conf_no   conf_no,
	    Text_no   no_of_unread);
Per Cederqvist's avatar
.    
Per Cederqvist committed
381

Kent Engström's avatar
Kent Engström committed
382
extern  Success
383
384
set_last_read (Conf_no       conf_no,
	       Local_text_no last_read);
Kent Engström's avatar
Kent Engström committed
385
386


Per Cederqvist's avatar
.    
Per Cederqvist committed
387
388
389
390
391
392
/*
 * set_presentation and set_etc_motd also does some magic with the
 * no_of_marks field in the Text_stat structure of the old and new text.
 */ 

extern  Success
393
394
set_presentation (Conf_no   conf_no,
		  Text_no   text_no); /* 0 to delete pres. */
Per Cederqvist's avatar
.    
Per Cederqvist committed
395
396

extern  Success
397
398
set_etc_motd (Conf_no	  conf_no,
	      Text_no	  text_no);
Per Cederqvist's avatar
.    
Per Cederqvist committed
399
400
401


extern  Success
402
403
set_supervisor (Conf_no	  conf_no,
		Conf_no	  admin	);
Per Cederqvist's avatar
.    
Per Cederqvist committed
404
405

extern  Success
406
407
set_permitted_submitters (Conf_no	  conf_no,
			  Conf_no	  perm_sub);
Per Cederqvist's avatar
.    
Per Cederqvist committed
408
409

extern  Success
410
411
set_super_conf (Conf_no	  conf_no,
		Conf_no	  super_conf);
Per Cederqvist's avatar
.    
Per Cederqvist committed
412
413

extern  Success
414
415
set_conf_type (Conf_no	  conf_no,
	       Conf_type  type	);
Per Cederqvist's avatar
.    
Per Cederqvist committed
416
extern  Success
417
418
set_garb_nice (Conf_no	  conf_no,
	       Garb_nice  days); /* number of days */
Per Cederqvist's avatar
.    
Per Cederqvist committed
419

420
extern  Success
421
422
set_expire (Conf_no	  conf_no,
	    Garb_nice	  expire); /* number of days */
423

Per Cederqvist's avatar
.    
Per Cederqvist committed
424

425
extern Success
426
427
set_keep_commented(Conf_no	conf_no,
                   Garb_nice	keep_commented);	/* number of days */
428

429
430
extern Success
first_unused_conf_no(Conf_no *result);
431

432
433
434
435
436
437
438
439
440
/*
 * Return next/previous existing text-no.
 */

extern  Success
find_next_conf_no(Conf_no start, Conf_no *result);

extern  Success
find_previous_conf_no(Conf_no start, Conf_no *result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
441
442
443
444
445
446
447

/********************************
*     Calls to handle marks     *
********************************/


extern  Success
448
get_marks (Mark_list *result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
449
450
451
452
453
454



/*
 *  Will fail if the user is not allowed to read the text.
 */
455
456
/* This function uses mark_type==0 to delete the mark. */
extern  Success
457
458
mark_text_old (Text_no	  	  text,
	       unsigned char	  mark_type);
459

460
461

/* Using this function, you can set mark_type==0. */
Per Cederqvist's avatar
.    
Per Cederqvist committed
462
extern  Success
463
464
mark_text (Text_no	  text,
	   unsigned char  mark_type);
465

Per Cederqvist's avatar
.    
Per Cederqvist committed
466

467
468
/* Remove a mark, reporting an error if you had not marked the text. */
extern  Success
469
unmark_text (Text_no	  text);
470

Per Cederqvist's avatar
.    
Per Cederqvist committed
471
472
473
474
475
476
477
478
479



/*******************************
*     Calls to handle texts    *
*******************************/


extern  Success
480
481
482
483
get_text (Text_no	  text,
	  String_size	  start_char,
	  String_size	  end_char,
	  String	* result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
484
485
486


extern  Success
487
488
get_text_stat (Text_no    text,
	       Text_stat *result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
489

490
extern  Success
491
492
get_text_stat_old (Text_no    text,
		   Text_stat *result);
493

Per Cederqvist's avatar
.    
Per Cederqvist committed
494
extern  Success
495
496
mark_as_read(Conf_no		conference,
	     const Number_list *texts);	/* Local_text_no */
Per Cederqvist's avatar
.    
Per Cederqvist committed
497

498
499
500
501
502
503
504
505
506
extern  Success
mark_as_unread(Conf_no         conference,
	       Local_text_no   lno);


extern  Success
set_read_ranges(Conf_no conference,
		const struct read_range_list *read_ranges);

Per Cederqvist's avatar
.    
Per Cederqvist committed
507
508
509

/* Returns 0 on error */
extern  Text_no
510
511
512
create_text (const String     message,
	     Misc_info_list * misc,
	     Aux_item_list  * aux);
513
514

extern Text_no
515
516
create_text_old (const String     message,
		 Misc_info_list	* misc	    );
Per Cederqvist's avatar
.    
Per Cederqvist committed
517

518
/* Returns 0 on error.  */
519
extern  Text_no
520
521
522
create_anonymous_text (const String      message,
		       Misc_info_list  * misc,
		       Aux_item_list    *aux);
523
524

extern  Text_no
525
526
create_anonymous_text_old (const String      message,
			   Misc_info_list  * misc);
527

Per Cederqvist's avatar
.    
Per Cederqvist committed
528
extern Success
529
delete_text( Text_no text_no);
Per Cederqvist's avatar
.    
Per Cederqvist committed
530

531
extern Success
532
533
534
modify_text_info(Text_no        text,
		 Number_list   *items_to_delete, 
		 Aux_item_list *aux);
Per Cederqvist's avatar
.    
Per Cederqvist committed
535
536
537


extern  Success
538
539
540
add_recipient (Text_no	      text_no,
	       Conf_no	      conf_no,
	       enum info_type type);
Per Cederqvist's avatar
.    
Per Cederqvist committed
541
542

extern  Success
543
544
sub_recipient (Text_no	  text_no,
	       Conf_no	  conf_no);
Per Cederqvist's avatar
.    
Per Cederqvist committed
545
546
547


extern  Success
548
549
add_comment (Text_no	  comment,
	     Text_no 	  comment_to);
Per Cederqvist's avatar
.    
Per Cederqvist committed
550
551
552
553
554
555


/*
 *  Make the text COMMENT to not be a comment to text COMMENT_TO
 */
extern  Success
556
557
sub_comment (Text_no	  comment,
	     Text_no	  comment_to);
Per Cederqvist's avatar
.    
Per Cederqvist committed
558
559

extern Success
560
561
add_footnote (Text_no	footnote,
	      Text_no 	footnote_to);
Per Cederqvist's avatar
.    
Per Cederqvist committed
562
563

extern Success
564
565
sub_footnote (Text_no	footnote,
	      Text_no	parent);
Per Cederqvist's avatar
.    
Per Cederqvist committed
566

567
568
569
extern Success
first_unused_text_no(Text_no *result);

Per Cederqvist's avatar
.    
Per Cederqvist committed
570
extern  Success
571
572
573
574
get_map (Conf_no	  conf_no,
	 Local_text_no	  first_local_no,
	 unsigned long	  no_of_texts,
	 L2g_iterator    *result);
575
576

extern Success
577
578
579
580
local_to_global (Conf_no       conf_No,
		 Local_text_no first_local_no,
		 unsigned long no_of_texts,
		 Text_mapping *result);
581
582
583
584
585
extern Success
local_to_global_reverse(Conf_no       conf_No,
			Local_text_no local_no_ceiling,
			unsigned long no_of_texts,
			Text_mapping_reverse *result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
586
587
588
589
590
591
592


/*
 *  Ask what the server thinks the time is. This
 *  might differ if on two different machines.
 */
extern  Success
593
get_time (time_t *t);
Per Cederqvist's avatar
.    
Per Cederqvist committed
594
595


Linus Tolke's avatar
Linus Tolke committed
596
597
598
/*
 *  Gets the last text before a given time.
 */
599

600
extern  Success
601
get_last_text (struct tm *clk, Text_no *result);
Linus Tolke's avatar
Linus Tolke committed
602

603
604
605
606
607
/*
 * Return next/previous existing text-no.
 */

extern  Success
608
find_next_text_no (Text_no start, Text_no *result);
609
610

extern  Success
611
find_previous_text_no (Text_no start, Text_no *result);
612
613


Per Cederqvist's avatar
.    
Per Cederqvist committed
614
615
616
617
/*
 * Who is logged on now?
 */
extern  Success
618
who_is_on_old (Who_info_list_old	* result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
619
620

extern  Success
621
who_is_on (Who_info_list	* result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
622

623
extern  Success
624
who_is_on_ident (Who_info_ident_list *result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
625

Per Cederqvist's avatar
Per Cederqvist committed
626
extern  Success
627
628
629
630
who_is_on_dynamic (int want_visible,
		   int want_invisible,
		   long active_last,
		   Dynamic_session_info_list *result);
Per Cederqvist's avatar
Per Cederqvist committed
631

Per Cederqvist's avatar
.    
Per Cederqvist committed
632
633
634
/*
 *  Return various information about the server
 */
635
extern  Success
636
get_info_old (Info *result);
637

Per Cederqvist's avatar
.    
Per Cederqvist committed
638
extern  Success
639
get_info (Info *result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
640

641
extern  Success
642
get_version_info (Version_info *result);
643

Per Cederqvist's avatar
.    
Per Cederqvist committed
644
645
646
647
648

/*
 * Privileged calls.
 */

David Byers's avatar
David Byers committed
649
extern Success
650
set_info(Info *info);
David Byers's avatar
David Byers committed
651

652
extern Success
653
modify_system_info(Number_list      *items_to_delete,
654
		   Aux_item_list    *items_to_add);
655

Per Cederqvist's avatar
.    
Per Cederqvist committed
656
extern Success
657
set_motd_of_lyskom (Text_no motd);
Per Cederqvist's avatar
.    
Per Cederqvist committed
658
659
660
661
662

/*
 * Set ena_level. 0 means don't use any privileges.
 */
extern Success
663
enable (unsigned char ena_level);
Per Cederqvist's avatar
.    
Per Cederqvist committed
664
665
666
667
668

/*
 * Make LysKOM sync its files.
 */
extern Success
669
sync_kom (void);
Per Cederqvist's avatar
.    
Per Cederqvist committed
670
671
672
673
674

/*
 * Close LysKOM.
 */
extern Success
675
shutdown_kom (int exit_val);
Per Cederqvist's avatar
.    
Per Cederqvist committed
676
677

/*
678
679
 * Send a message to all clients. This is obsoleted by send_message(),
 * but will remain for compatibility reasons.
Per Cederqvist's avatar
.    
Per Cederqvist committed
680
681
 */
extern Success
682
broadcast (const String message);
Per Cederqvist's avatar
.    
Per Cederqvist committed
683
684
685
686
687
688

/*
 * Send a message to a person, or all persons. If recipient == 0 all
 * connections will receive the message.
 */
extern Success
689
690
send_message (Conf_no recipient,
	      const String message);
Per Cederqvist's avatar
.    
Per Cederqvist committed
691

692
693
694
695
696
/*
 * Selection of asynchronous messages
 */

extern Success
697
accept_async(Number_list *accept_list);
698
699

extern Success
700
query_async(Number_list *result);
Per Cederqvist's avatar
.    
Per Cederqvist committed
701

702
703
704
705
706
/*
 * Aux-items
 */

extern Success
707
query_predefined_aux_items(Number_list *result);
708
709


710
711
712
713
714
715
716
717
718
/*
 * Measuread statistical numbers.
 */

extern Success
get_stats_description(Stats_description *result);

extern Success
get_stats(const String what,
719
	  Stats_list *result);
720

721
722
723
724
725
726
727
/*
 * Boot-time information.
 */

extern Success
get_boottime_info(Static_server_info *result);

728

729
730
#ifdef DEBUG_CALLS
extern Success
731
get_memory_info(Memory_info *result);
732
733

extern Success
734
set_marks(Text_no text_no, unsigned long no_of_marks);
735
736

extern Success
737
738
backdate_text(Text_no text_no,
	      unsigned long seconds);
739

740
741
742
743
744
745
/* Modify the "sent_at" item.  It must already exist. */
extern Success
backdate_comment_link(Text_no parent,
		      Text_no child,
		      unsigned long seconds);

Per Cederqvist's avatar
Per Cederqvist committed
746
747
748
extern Success
start_garb(void);

749
750
751
752
753
754
extern Success
cache_sync_start(void);

extern Success
cache_sync_finish(void);

755
756
757
extern Success
dump_cfg_timevals(void);

758
#endif
Per Cederqvist's avatar
.    
Per Cederqvist committed
759
760
    
#endif	/*  _SERVICES_H_ALREADY_INCLUDED__  */