FACT++  1.0
dis.h
Go to the documentation of this file.
1 #ifndef __DISDEFS
2 #define __DISDEFS
3 
4 #include "dim_common.h"
5 
6 /* CFORTRAN interface */
7 
8 #define dis_start_serving dis_start_serving_
9 #define dis_stop_serving dis_stop_serving_
10 #define dis_get_next_cmnd dis_get_next_cmnd_
11 #define dis_get_client dis_get_client_
12 #define dis_add_service dis_add_service_
13 #define dis_add_cmnd dis_add_cmnd_
14 #define dis_add_client_exit_handler dis_add_client_exit_handler_
15 #define dis_add_exit_handler dis_add_exit_handler_
16 #define dis_set_client_exit_handler dis_set_client_exit_handler_
17 #define dis_report_service dis_report_service_
18 #define dis_update_service dis_update_service_
19 #define dis_remove_service dis_remove_service_
20 #define dis_send_service dis_send_service_
21 #define dis_convert_str dis_convert_str_
22 #define dis_set_quality dis_set_quality_
23 #define dis_set_timestamp dis_set_timestamp_
24 #define dis_selective_update_service dis_selective_update_service_
25 #define dis_get_timestamp dis_get_timestamp_
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #define __CXX_CONST const
30 #else
31 #define __CXX_CONST
32 #endif
33 
34 _DIM_PROTOE( int dis_start_serving, (__CXX_CONST char *task_name) );
35 _DIM_PROTOE( void dis_stop_serving, () );
36 _DIM_PROTOE( int dis_get_next_cmnd, (dim_long *tag, int *buffer, int *size ) );
37 _DIM_PROTOE( int dis_get_client, (char *name ) );
38 _DIM_PROTOE( int dis_get_conn_id, () );
39 _DIM_PROTOE( unsigned dis_add_service, (__CXX_CONST char *service_name, __CXX_CONST char *service_type,
40  void *service_address, int service_size,
41  void (*usr_routine)(void*,void**,int*,int*), dim_long tag) );
42 _DIM_PROTOE( unsigned dis_add_cmnd, (__CXX_CONST char *service_name, __CXX_CONST char *service_type,
43  void (*usr_routine)(void*,void*,int*), dim_long tag) );
44 _DIM_PROTOE( void dis_add_client_exit_handler,(void (*usr_routine)(int*)) );
45 _DIM_PROTOE( void dis_set_client_exit_handler,(int conn_id, int tag) );
46 _DIM_PROTOE( void dis_add_exit_handler,(void (*usr_routine)(int*)) );
47 _DIM_PROTOE( void dis_add_error_handler,(void (*usr_routine)(int, int, char*)) );
48 _DIM_PROTOE( void dis_report_service, (__CXX_CONST char *service_name) );
49 _DIM_PROTOE( int dis_update_service, (unsigned service_id) );
50 _DIM_PROTOE( int dis_remove_service, (unsigned service_id) );
51 _DIM_PROTOE( void dis_send_service, (unsigned service_id, int *buffer,
52  int size) );
54 _DIM_PROTOE( void dis_set_quality, (unsigned service_id, int quality) );
56  int secs, int millisecs) );
58  int *client_id_list) );
60 _DIM_PROTOE( int dis_get_timeout, (unsigned service_id, int client_id) );
62 _DIM_PROTOE( char *dis_get_client_services, (int conn_id) );
63 _DIM_PROTOE( int dis_start_serving_dns, (dim_long dns_id, __CXX_CONST char *task_name/*, int *id_list*/) );
64 _DIM_PROTOE( void dis_stop_serving_dns, (dim_long dns_id) );
65 _DIM_PROTOE( unsigned dis_add_service_dns, (dim_long dns_id, __CXX_CONST char *service_name, __CXX_CONST char *service_type,
66  void *service_address, int service_size,
67  void (*usr_routine)(void*,void**,int*,int*), dim_long tag) );
68 _DIM_PROTOE( unsigned dis_add_cmnd_dns, (dim_long dns_id, __CXX_CONST char *service_name, __CXX_CONST char *service_type,
69  void (*usr_routine)(void*,void*,int*), dim_long tag) );
70 _DIM_PROTOE( int dis_get_n_clients, (unsigned service_id) );
72  int *secs, int *millisecs) );
73 #ifdef __cplusplus
74 #undef __CXX_CONST
75 }
76 #endif
77 
78 #endif
#define dis_set_client_exit_handler
Definition: dis.h:16
#define dis_remove_service
Definition: dis.h:19
void dis_disable_padding()
Definition: copy_swap.c:30
#define dis_selective_update_service
Definition: dis.h:24
unsigned service_id
Definition: db_dim_client.c:22
int dis_set_buffer_size(int size)
Definition: dis.c:199
#define dis_get_timestamp
Definition: dis.h:25
dis_add_service_dns(dnsid, name1,"I",&NewData, sizeof(NewData),(void *) 0, 0)
#define dis_get_next_cmnd
Definition: dis.h:10
#define dis_set_timestamp
Definition: dis.h:23
int dis_get_conn_id()
Definition: dis.c:2795
void dis_add_error_handler(void(*user_routine)())
Definition: dis.c:540
#define __CXX_CONST
Definition: dis.h:31
char * dis_get_client_services(int conn_id)
Definition: dis.c:2536
#define dis_add_cmnd
Definition: dis.h:13
#define dis_set_quality
Definition: dis.h:22
#define dis_start_serving
Definition: dis.h:8
#define dis_update_service
Definition: dis.h:18
long dim_long
Definition: dim_common.h:57
unsigned dis_add_cmnd_dns(dim_long dnsid, char *name, char *type, void(*user_routine)(), dim_long tag)
Definition: dis.c:510
#define dis_stop_serving
Definition: dis.h:9
_DIM_PROTOE(int dis_start_serving,(__CXX_CONST char *task_name))
int buffer[BUFFSIZE]
Definition: db_dim_client.c:14
#define dis_get_client
Definition: dis.h:11
int size
Definition: db_dim_server.c:17
#define dis_send_service
Definition: dis.h:20
#define dis_add_service
Definition: dis.h:12
int dis_get_timeout(unsigned service_id, int client_id)
Definition: dis.c:1901
#define dis_add_exit_handler
Definition: dis.h:15
#define dis_add_client_exit_handler
Definition: dis.h:14
char * dis_get_error_services()
Definition: dis.c:2531
int dis_get_n_clients(unsigned service_id)
Definition: dis.c:1865
#define dis_report_service
Definition: dis.h:17
void dis_stop_serving_dns(dim_long dnsid)
Definition: dis.c:2335
dis_start_serving_dns(dnsid,"xx_new")