source: branches/port5/AISC_COM/C/client_privat.h

Last change on this file was 5544, checked in by westram, 16 years ago

from elmar:

Make the aisc client side threadsafe. This allows e.g. running more
than one PT server from one process.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
1#ifndef GLOBAL_H
2#include "aisc_global.h"
3#endif
4
5#define AISC_MAX_ATTR           4095
6#define MAX_AISC_SET_GET        16
7#define AISC_MAX_STRING_LEN     1024
8#define AISC_MESSAGE_BUFFER_LEN ((AISC_MAX_STRING_LEN/4+3)*(16+2))
9
10struct aisc_bytes_list {
11    char *data;
12    int   size;
13
14    struct aisc_bytes_list *next;
15};
16
17typedef struct struct_aisc_com {
18    int                     socket;
19    int                     message_type;
20    char                   *message;
21    int                    *message_queue;
22    long                    magic;
23    const char             *error;
24    long                    aisc_mes_buffer[AISC_MESSAGE_BUFFER_LEN];
25    struct aisc_bytes_list *aisc_client_bytes_first;
26    struct aisc_bytes_list *aisc_client_bytes_last;
27} aisc_com;
28
29typedef struct struct_bytestring {
30    char *data;
31    int   size;
32} bytestring;
33
34#define AISC_MAGIC_NUMBER 0
35
36enum aisc_command_list {
37    AISC_GET         = AISC_MAGIC_NUMBER + 0,
38    AISC_SET         = AISC_MAGIC_NUMBER + 1,
39    AISC_NSET        = AISC_MAGIC_NUMBER + 2,
40    AISC_CREATE      = AISC_MAGIC_NUMBER + 3,
41    AISC_FIND        = AISC_MAGIC_NUMBER + 4,
42    AISC_COPY        = AISC_MAGIC_NUMBER + 5,
43    AISC_DELETE      = AISC_MAGIC_NUMBER + 6,
44    AISC_INIT        = AISC_MAGIC_NUMBER + 7,
45    AISC_DEBUG_INFO  = AISC_MAGIC_NUMBER + 8,
46    AISC_FORK_SERVER = AISC_MAGIC_NUMBER + 9
47};
48
49enum aisc_client_command_list {
50    AISC_CCOM_OK      = AISC_MAGIC_NUMBER + 0,
51    AISC_CCOM_ERROR   = AISC_MAGIC_NUMBER + 1,
52    AISC_CCOM_MESSAGE = AISC_MAGIC_NUMBER + 2
53};
Note: See TracBrowser for help on using the repository browser.