services.h 17.9 KB
Newer Older
Linus Tolke's avatar
Linus Tolke committed
1
/*
2
 * $Id: services.h,v 0.43 1999/02/05 21:39:53 ceder Exp $
Per Cederqvist's avatar
Per Cederqvist committed
3
 * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996  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
23
24
 *
 * 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.
 *
 * Please mail bug reports to bug-lyskom@lysator.liu.se. 
 */
Per Cederqvist's avatar
.  
Per Cederqvist committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
 *  services.h  --  All the services the LysKOM server makes available
 *		    for clients.
 *
 *  Requires kom-types.h
 *
 *  Created by ceder 1990-03-23
 */


#ifndef  _SERVICES_H_ALREADY_INCLUDED__
#define  _SERVICES_H_ALREADY_INCLUDED__


#if defined (CLIENT)
#	if defined (SERVER)
#		error Both CLIENT and SERVER defined!
#	endif
#	define	KOM_(function)		kom_ ## function
#	define	CONST			const
#elif defined (SERVER)
#	define	KOM_(function)		function
#	define	CONST
#else
#	error	Neither CLIENT nor SERVER defined!
#endif




/*
 * Session control
 */
#ifdef CLIENT
extern  Success
KOM_( open_connection (const char	* server ));

extern  void
KOM_( set_storage_management (malloc_function	new_malloc,
			      realloc_function	new_realloc,
			      free_function	new_free));

#endif


70
71
72
73
extern  Success
KOM_( login_old (Pers_no	person,
		 const String	passwd ));

Per Cederqvist's avatar
.  
Per Cederqvist committed
74
75
extern  Success
KOM_( login (Pers_no		person,
76
77
	     const String	passwd,
	     Bool		invisible));
Per Cederqvist's avatar
.  
Per Cederqvist committed
78
79
80
81
82
83

extern  Success
KOM_( logout (void));	/* can never fail */

/* Change Conference */
extern  Success
84
KOM_( change_conference (Conf_no conference));
Per Cederqvist's avatar
.  
Per Cederqvist committed
85
86
87
88
89
90
91
92
93
94


/* Change name of a person or conference. */
extern  Success
KOM_( change_name (Conf_no	  conf_no,
		   const String	  new_name));

extern  Success
KOM_( change_what_i_am_doing (CONST String  what_am_i_doing ));

95
96
97
98
99
100
101
102
103
104
105
106
/* Client version: one call to set, two to retrieve. */
extern  Success
KOM_( set_client_version (const String client_name,
			  const String client_version));

extern  Success
KOM_( get_client_name (Session_no session_no,
		       String *result));

extern  Success
KOM_( get_client_version (Session_no session_no,
			  String *result));
Per Cederqvist's avatar
.  
Per Cederqvist committed
107
108
109
110
111
112
113

/* Get info about a session */

extern  Success
KOM_( get_session_info  (Session_no session_no,
			 Session_info *result) );

114
115
116
117
extern  Success
KOM_( get_session_info_ident  (Session_no session_no,
			       Session_info_ident *result) );

Per Cederqvist's avatar
Per Cederqvist committed
118
119
120
121
extern  Success
KOM_( get_static_session_info (Session_no session_no,
			       Static_session_info *result) );

Per Cederqvist's avatar
.  
Per Cederqvist committed
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/*
 * 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
KOM_( disconnect (Session_no session_no));

/*
 * Returns your session number
 */
extern  Success
KOM_( who_am_i (Session_no *session_no));

Per Cederqvist's avatar
Per Cederqvist committed
136
137
138
139
140
141
/*
 * Set state in the session
 */

extern  Success
KOM_( user_active (void));
Per Cederqvist's avatar
.  
Per Cederqvist committed
142
143
144
145
146
147
148
149
150

/******************************
*     Person-related calls    *
******************************/

/*
 *  Create a new person.  Returns 0 if any error occured.
 */
extern  Pers_no
151
152
153
154
155
156
157
KOM_( create_person_old (const String  name,
                         const String  passwd ));

extern Pers_no
KOM_( create_person (const String name,
                     const String passwd,
                     Aux_item_list *conf_aux ));
Per Cederqvist's avatar
.  
Per Cederqvist committed
158
159
160
161
162


/* Obsolete call; use get_person_stat instead. */
extern  Success
KOM_( get_person_stat_old (Pers_no		  person,
163
164
                             int		  mask,
                             Person		* result ));
Per Cederqvist's avatar
.  
Per Cederqvist committed
165
166
167

extern  Success
KOM_( get_person_stat (Pers_no		  person,
168
                       Person		* result ));
Per Cederqvist's avatar
.  
Per Cederqvist committed
169
170
171
172

extern  Success
KOM_( get_created_texts (Pers_no	  person,
			 Local_text_no	  first,
173
			 unsigned long	  no_of_texts,
174
			 L2g_iterator    *created_texts ));
Per Cederqvist's avatar
.  
Per Cederqvist committed
175

176
177
178
179
180
181
extern  Success
KOM_( map_created_texts (Pers_no	  person,
			 Local_text_no	  first,
			 unsigned long	  no_of_texts,
			 Text_mapping    *created_texts ));

182
183
184
185
186
187
188
extern  Success
KOM_( get_membership_old (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
189
190
extern  Success
KOM_( get_membership (Pers_no		  person,
191
192
		      unsigned short	  first,
		      unsigned short	  no_of_confs,
Per Cederqvist's avatar
.  
Per Cederqvist committed
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
		      Bool		  want_read_texts,
		      Membership_list	* memberships ));

extern  Success
KOM_( set_priv_bits (Pers_no	person,
		     Priv_bits	privileges ));


/*  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
KOM_( set_passwd (Pers_no	 person,
		  const String   old_pwd,
		  const String   new_pwd ));


/* You can query for unread texts without logging in. */
211
212
213
214
215
extern  Success
KOM_( query_read_texts_old (Pers_no	     pers_no,
                            Conf_no	     conf_no,
                            Membership	   * result   ));

Per Cederqvist's avatar
.  
Per Cederqvist committed
216
217
218
extern  Success
KOM_( query_read_texts (Pers_no	     pers_no,
			Conf_no	     conf_no,
219
			Membership * result   ));
Per Cederqvist's avatar
.  
Per Cederqvist committed
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236


extern Success
KOM_( get_unread_confs(Pers_no       pers_no,
		       Conf_no_list *result));

extern Success
KOM_( set_user_area(Pers_no	pers_no,
		    Text_no	user_area));

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


extern  Conf_no
237
238
239
240
241
242
243
244
245
246
247
248
KOM_( create_conf_old (const String	  name,
                       Conf_type	  type ));

extern Conf_no
KOM_( create_conf (const String name,
                   Conf_type type,
                   Aux_item_list *aux ));

extern Success
KOM_ ( 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
249
250
251
252
253
254
255
256
257
258


/*  Delete a conference.  Also used to delete persons.  */
extern  Success
KOM_( delete_conf (Conf_no	conf ));


/*
 *  Map conference name to number.  Returns a list of the conferences
 *  that match the name NAME. Can be done without logging in.
259
 * This should be phased out.
Per Cederqvist's avatar
.  
Per Cederqvist committed
260
261
262
263
264
265
266
267
268
269
270
 */
#ifdef SERVER
extern  Success
KOM_( lookup_name (const String	 name,
		   Conf_list_old *result));
#else
extern  Success
KOM_( lookup_name (const String	 name,
		   Conf_list	*result));
#endif

271
272
273
274
275
276
extern Success
KOM_( lookup_z_name (const String name,
		     int want_persons,
		     int want_confs,
		     Conf_z_info_list *result));

277
278
279
280
281
282
283
284
285
/* Use these two lookup-calls instead of lookup_name */
extern  Success
KOM_( lookup_person (const String  pattern,
		     Conf_no_list  *result));

extern  Success
KOM_( lookup_conf (const String  pattern,
		   Conf_no_list  *result));

286
287
288
289
290
291
292
293
294
/* Two functions for matching regexps. */
extern  Success
KOM_( re_lookup_person (const String  regexp,
			Conf_no_list  *result));

extern  Success
KOM_( re_lookup_conf (const String  regexp,
		      Conf_no_list  *result));

295
296
297
298
299
300
extern  Success
KOM_( re_z_lookup (const String  regexp,
		   int want_persons,
		   int want_confs,
		   Conf_z_info_list *result));

301
302
303
304
305
306
307
308
extern Success
KOM_( get_collate_table (String * result));

extern  Success
KOM_( get_conf_stat_older (Conf_no	conf_no,
                           int		mask,
                           Conference   * result ));

Per Cederqvist's avatar
.  
Per Cederqvist committed
309
extern  Success
310
311
KOM_( get_conf_stat_old (Conf_no		  conf_no,
                         Conference		* result ));
Per Cederqvist's avatar
.  
Per Cederqvist committed
312
313
314
315
316

extern  Success
KOM_( get_conf_stat (Conf_no		  conf_no,
		     Conference		* result ));

317
318
319
320
extern Success
KOM_( get_uconf_stat (Conf_no		  conf_no,
		      Small_conf	* result));

Per Cederqvist's avatar
.  
Per Cederqvist committed
321
322
extern  Success
KOM_( get_members (Conf_no	  conf,
323
324
		   unsigned short first,
		   unsigned short no_of_members,
325
326
327
328
329
330
331
332
		   Member_list	* members
    ));

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



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

extern  Success
KOM_( add_member_old (Conf_no		conf_no,
                      Pers_no		pers_no,
                      unsigned char	priority,
                      unsigned short	where	)); /* Range of where is [0..] */

extern Success
KOM_( set_membership_type (Pers_no      pers_no,
                           Conf_no      conf_no,
                           Membership_type *type   ));
Per Cederqvist's avatar
.  
Per Cederqvist committed
354
355
356
357
358
359
360
361
362
363


extern  Success
KOM_( sub_member (Conf_no	conf_no,
		  Pers_no	pers_no ));


/*
 * 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
364
365
366
 *
 * 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
367
 */
Kent Engström's avatar
Kent Engström committed
368

Per Cederqvist's avatar
.  
Per Cederqvist committed
369
370
371
372
extern  Success
KOM_( set_unread (Conf_no   conf_no,
		  Text_no   no_of_unread));

Kent Engström's avatar
Kent Engström committed
373
374
extern  Success
KOM_( set_last_read (Conf_no   conf_no,
375
		     Local_text_no   last_read));
Kent Engström's avatar
Kent Engström committed
376
377


Per Cederqvist's avatar
.  
Per Cederqvist committed
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
/*
 * 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
KOM_( set_presentation (Conf_no   conf_no,
			Text_no   text_no )); /* 0 to delete pres. */

extern  Success
KOM_( set_etc_motd (Conf_no	  conf_no,
		    Text_no	  text_no ));


extern  Success
KOM_( set_supervisor (Conf_no	  conf_no,
		      Conf_no	  admin	));

extern  Success
KOM_( set_permitted_submitters (Conf_no	  conf_no,
				Conf_no	  perm_sub ));

extern  Success
KOM_( set_super_conf (Conf_no	  conf_no,
		      Conf_no	  super_conf ));

extern  Success
KOM_( set_conf_type (Conf_no	  conf_no,
		     Conf_type	  type	));
extern  Success
KOM_( set_garb_nice (Conf_no	  conf_no,
409
		     Garb_nice	  days )); /* number of days */
Per Cederqvist's avatar
.  
Per Cederqvist committed
410

411
412
413
414
extern  Success
KOM_( set_expire (Conf_no	  conf_no,
		  Garb_nice	  expire )); /* number of days */

Per Cederqvist's avatar
.  
Per Cederqvist committed
415

416
417
418
419
420
extern Success
KOM_ ( set_keep_commented(Conf_no	conf_no,
                   Garb_nice	keep_commented));	/* number of days */


Per Cederqvist's avatar
.  
Per Cederqvist committed
421
422
423
424
425
426
427
428
429
430
431
432
433
434

/********************************
*     Calls to handle marks     *
********************************/


extern  Success
KOM_( get_marks (Mark_list *result ));



/*
 *  Will fail if the user is not allowed to read the text.
 */
435
436
/* This function uses mark_type==0 to delete the mark. */
extern  Success
437
438
439
KOM_( mark_text_old (Text_no	  	  text,
		     unsigned char	  mark_type ));

440
441

/* Using this function, you can set mark_type==0. */
Per Cederqvist's avatar
.  
Per Cederqvist committed
442
443
extern  Success
KOM_( mark_text (Text_no	  text,
444
445
		 unsigned char	  mark_type ));

Per Cederqvist's avatar
.  
Per Cederqvist committed
446

447
448
449
450
/* Remove a mark, reporting an error if you had not marked the text. */
extern  Success
KOM_( unmark_text (Text_no	  text));

Per Cederqvist's avatar
.  
Per Cederqvist committed
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469


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


extern  Success
KOM_( get_text (Text_no	 	  text,
		String_size	  start_char,
		String_size	  end_char,
		String		* result));


extern  Success
KOM_( get_text_stat (Text_no    text,
		     Text_stat *result));

470
471
472
473
extern  Success
KOM_( get_text_stat_old (Text_no    text,
                         Text_stat *result));

Per Cederqvist's avatar
.  
Per Cederqvist committed
474
475
476
477
478
479
480
481
extern  Success
KOM_( mark_as_read (Conf_no		    conference,
		    int			    no_of_texts,
		    const Local_text_no	  * text_arr   ));


/* Returns 0 on error */
extern  Text_no
482
KOM_( create_text (const String		  message,
483
		   unsigned short	  no_of_misc,
484
485
486
487
488
489
490
		   CONST Misc_info	* misc,
                   Aux_item_list        * aux ));

extern Text_no
KOM_( create_text_old (const String		  message,
                       unsigned short	  no_of_misc,
                       CONST Misc_info	* misc	     ));
Per Cederqvist's avatar
.  
Per Cederqvist committed
491

492
493
/* Returns 0 on error. This function is experimental. */
extern  Text_no
494
KOM_( create_anonymous_text (const String       message,
495
			     unsigned short	no_of_misc,
496
497
498
499
500
501
502
			     CONST Misc_info  * misc,
                             Aux_item_list    *aux          ));

extern  Text_no
KOM_( create_anonymous_text_old (const String       message,
                                 unsigned short	no_of_misc,
                                 CONST Misc_info  * misc	     ));
503

Per Cederqvist's avatar
.  
Per Cederqvist committed
504
505
506
extern Success
KOM_( delete_text( Text_no text_no ));

507
508
509
510
extern Success
KOM_ ( modify_text_info(Text_no        text,
                         Number_list   *items_to_delete, 
                         Aux_item_list *aux ) );
Per Cederqvist's avatar
.  
Per Cederqvist committed
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545


extern  Success
KOM_( add_recipient (Text_no	  text_no,
		     Conf_no	  conf_no,
		     Info_type	  type	)); /* recpt or cc_recpt */

extern  Success
KOM_( sub_recipient (Text_no	  text_no,
		     Conf_no	  conf_no ));


extern  Success
KOM_( add_comment (Text_no	  comment,
		   Text_no 	  comment_to ));


/*
 *  Make the text COMMENT to not be a comment to text COMMENT_TO
 */
extern  Success
KOM_( sub_comment (Text_no	  comment,
		   Text_no	  comment_to ));

extern Success
KOM_( add_footnote (Text_no	footnote,
		    Text_no 	footnote_to ));

extern Success
KOM_( sub_footnote (Text_no	footnote,
		    Text_no	parent ));

extern  Success
KOM_( get_map (Conf_no		  conf_no,
	       Local_text_no	  first_local_no,
546
	       unsigned long	  no_of_texts,
547
	       L2g_iterator      *result));
548
549
550
551
552
553

extern Success
KOM_( local_to_global (Conf_no       conf_No,
		       Local_text_no first_local_no,
		       unsigned long no_of_texts,
		       Text_mapping *result));
Per Cederqvist's avatar
.  
Per Cederqvist committed
554
555
556
557
558
559
560
561


/*
 *  Ask what the server thinks the time is. This
 *  might differ if on two different machines.
 */
#ifdef SERVER
extern  Success
562
KOM_( get_time (time_t *t));
Per Cederqvist's avatar
.  
Per Cederqvist committed
563
564
565
566
567
568
#else				/* CLIENT */
extern  Success
KOM_( get_time (struct tm *clock));
#endif


Linus Tolke's avatar
Linus Tolke committed
569
570
571
/*
 *  Gets the last text before a given time.
 */
572

573
extern  Success
574
KOM_( get_last_text (struct tm *clk, Text_no *result));
Linus Tolke's avatar
Linus Tolke committed
575

576
577
578
579
580
581
582
583
584
585
586
/*
 * Return next/previous existing text-no.
 */

extern  Success
KOM_( find_next_text_no (Text_no start, Text_no *result));

extern  Success
KOM_( find_previous_text_no (Text_no start, Text_no *result));


Per Cederqvist's avatar
.  
Per Cederqvist committed
587
588
589
590
591
592
593
594
595
/*
 * Who is logged on now?
 */
extern  Success
KOM_( who_is_on_old (Who_info_list_old	* result ));

extern  Success
KOM_( who_is_on (Who_info_list	* result ));

596
597
extern  Success
KOM_( who_is_on_ident (Who_info_ident_list *result));
Per Cederqvist's avatar
.  
Per Cederqvist committed
598

Per Cederqvist's avatar
Per Cederqvist committed
599
600
601
extern  Success
KOM_( who_is_on_dynamic (int want_visible,
			 int want_invisible,
602
			 long active_last,
Per Cederqvist's avatar
Per Cederqvist committed
603
604
			 Dynamic_session_info_list *result) );

Per Cederqvist's avatar
.  
Per Cederqvist committed
605
606
607
/*
 *  Return various information about the server
 */
608
609
610
extern  Success
KOM_( get_info_old (Info *result ));

Per Cederqvist's avatar
.  
Per Cederqvist committed
611
612
613
extern  Success
KOM_( get_info (Info *result ));

614
615
616
extern  Success
KOM_( get_version_info (Version_info *result ));

Per Cederqvist's avatar
.  
Per Cederqvist committed
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
/*
 *  Wait for asynchronous message from client, or input on any of
 *  the file-descriptors in opt_set. Returns FAILURE if nothing
 *  happened in msec milliseconds or an error occurs. (kom_errno ==
 *  KOM_NO_ERR if the return was due to a timeout). Returns OK if
 *  there was an asynchronous message or input on any of the fd's in
 *  opt_set.
 *
 *  Set opt_set to NULL if you don't want to wait on any other input
 *  than a message.
 *
 *  To wait for a message or input on stdin the following code can be used:
 *
 *  fd_set read_set;
 *
 *  FD_ZERO(&read_set);
 *  FD_SET(fileno(stdin), &read_set);
 *  if ( kom_wait(read_set, 1000) == OK )
 *  {
 *	if ( FD_ISSET(fileno(stdin), &read_set) )
 *	    handle_stdin_input();
 *	else
 *	    handle_asynchronous_message();
 *  }
 *  else
 *	time_out();
 *
 *  (The handler is called from kom_wait and not handle_asynchronous_message,
 *   but there might be more to do afterwards since a handler cannot call
 *   functions that communicate with the server.)
 */
#ifdef CLIENT
extern  Success
KOM_( wait (fd_set *opt_set,
	    int     msec));
#endif

/*
 * Privileged calls.
 */

David Byers's avatar
David Byers committed
658
659
660
extern Success
KOM_( set_info(Info *info));

661
662
663
664
extern Success
KOM_( modify_server_info(Number_list      *items_to_delete,
                         Aux_item_list    *items_to_add));

Per Cederqvist's avatar
.  
Per Cederqvist committed
665
666
667
668
669
670
671
extern Success
KOM_( set_motd_of_lyskom (Text_no motd));

/*
 * Set ena_level. 0 means don't use any privileges.
 */
extern Success
Per Cederqvist's avatar
Per Cederqvist committed
672
KOM_( enable (unsigned char ena_level));
Per Cederqvist's avatar
.  
Per Cederqvist committed
673
674
675
676
677

/*
 * Make LysKOM sync its files.
 */
extern Success
Per Cederqvist's avatar
Per Cederqvist committed
678
KOM_( sync_kom (void) );
Per Cederqvist's avatar
.  
Per Cederqvist committed
679
680
681
682
683

/*
 * Close LysKOM.
 */
extern Success
684
KOM_( shutdown_kom (int exit_val) );
Per Cederqvist's avatar
.  
Per Cederqvist committed
685
686

/*
687
688
 * 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
689
690
691
692
693
694
695
696
697
 */
extern Success
KOM_( broadcast (const String message) );

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

701
702
703
704
705
706
707
708
709
/*
 * Selection of asynchronous messages
 */

extern Success
KOM_( accept_async(Number_list *accept_list));

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

711
712
713
714
715
716
717
718
/*
 * Aux-items
 */

extern Success
KOM_( query_predefined_aux_items(Number_list *result));


719
720
721
#ifdef DEBUG_CALLS
extern Success
KOM_ ( get_memory_info(Memory_info *result));
722
723
724
725
726
727
728
729
730

extern Success
KOM_ ( set_marks(Text_no text_no, unsigned long no_of_marks));

extern Success
KOM_ (backdate_text(Text_no text_no,
                    unsigned long seconds));


731
#endif
732
733


Per Cederqvist's avatar
.  
Per Cederqvist committed
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
/*
 * Asynchronous messages.
 */
#ifdef CLIENT
void
register_new_text(void (*async_new_text)(Text_no    text_no, 
					 Text_stat  text_s));

void
register_i_am_on(void (*async_i_am_on)(Who_info info));

void
register_i_am_off (void (*async_i_am_off)(Pers_no pers_no));

void
register_new_name(void (*async_new_name)(Conf_no  conf_no,
					 String   old_name,
					 String   new_name));
Linus Tolke's avatar
Linus Tolke committed
752
753
754
755
void
register_directed_message(void (*async_message)(Conf_no	to,
						Conf_no	from,
						String	message));
Linus Tolke's avatar
Linus Tolke committed
756
757
758
759

void
register_saving(void (*saving_fun)(void));

Per Cederqvist's avatar
.  
Per Cederqvist committed
760
761
762
#endif	/* CLIENT */
    
#endif	/*  _SERVICES_H_ALREADY_INCLUDED__  */