dcrud  0.0.0
Distributed data and services
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
IParticipant.h
Go to the documentation of this file.
1 #pragma once
2 #ifdef __cplusplus
3 extern "C" {
4 #endif
5 
6 #include <io/InetSocketAddress.h>
7 #include "ICache.h"
8 #include "IDispatcher.h"
9 #include "IRegistry.h"
10 
11 typedef dcrudShareable(* dcrudShareableFactory )();
12 
13 UTIL_ADT( dcrudIParticipant );
14 
15 typedef void (* dcrudLocalFactory_Set )( dcrudShareableData This, const dcrudShareableData source );
16 typedef ioStatus (* dcrudLocalFactory_Serialize )( dcrudShareableData This, ioByteBuffer target );
17 typedef ioStatus (* dcrudLocalFactory_Unserialize )( dcrudShareableData This, ioByteBuffer source );
20 typedef void (* dcrudRemoteFactory_create )( struct dcrudRemoteFactory_s * This, dcrudArguments how );
21 typedef void (* dcrudRemoteFactory_update )( struct dcrudRemoteFactory_s * This, dcrudShareable what, dcrudArguments how );
22 typedef void (* dcrudRemoteFactory_delete )( struct dcrudRemoteFactory_s * This, dcrudShareable what );
23 
24 typedef struct dcrudLocalFactory_s {
25 
26  dcrudClassID classID;
27  size_t size;
32 
34 
35 typedef struct dcrudRemoteFactory_s {
36 
37  dcrudClassID classID;
38  void * userContext;
39  dcrudIParticipant participant;
43 
45 
54 void dcrudIParticipant_listen ( dcrudIParticipant This, dcrudIRegistry registry, const char * intrfc, bool dumpReceivedBuffer );
55 bool dcrudIParticipant_registerLocalFactory ( dcrudIParticipant This, dcrudLocalFactory * local );
56 bool dcrudIParticipant_registerRemoteFactory( dcrudIParticipant This, dcrudRemoteFactory * remote );
57 dcrudICache dcrudIParticipant_getDefaultCache ( dcrudIParticipant This );
58 dcrudStatus dcrudIParticipant_createCache ( dcrudIParticipant This, dcrudICache * target, byte * cacheId );
59 dcrudICache dcrudIParticipant_getCache ( dcrudIParticipant This, byte ID );
60 dcrudIDispatcher dcrudIParticipant_getDispatcher ( dcrudIParticipant This );
61 dcrudShareable dcrudIParticipant_createShareable ( dcrudIParticipant This, dcrudClassID classID );
62 void dcrudIParticipant_run ( dcrudIParticipant This );
63 
64 #ifdef __cplusplus
65 }
66 #endif
ioStatus(* dcrudLocalFactory_Unserialize)(dcrudShareableData This, ioByteBuffer source)
Definition: IParticipant.h:17
void(* dcrudRemoteFactory_update)(struct dcrudRemoteFactory_s *This, dcrudShareable what, dcrudArguments how)
Definition: IParticipant.h:21
bool dcrudIParticipant_registerRemoteFactory(dcrudIParticipant This, dcrudRemoteFactory *remote)
unsigned char byte
Definition: types.h:16
dcrudLocalFactory_Serialize serialize
Definition: IParticipant.h:30
void dcrudIParticipant_run(dcrudIParticipant This)
dcrudLocalFactory_Unserialize unserialize
Definition: IParticipant.h:31
bool(* dcrudLocalFactory_Initialize)(dcrudShareableData This)
Definition: IParticipant.h:18
dcrudICache dcrudIParticipant_getCache(dcrudIParticipant This, byte ID)
dcrudStatus dcrudIParticipant_createCache(dcrudIParticipant This, dcrudICache *target, byte *cacheId)
enum dcrudStatus_e dcrudStatus
dcrudLocalFactory_Set set
Definition: IParticipant.h:29
dcrudClassID classID
Definition: IParticipant.h:26
dcrudClassID classID
Definition: IParticipant.h:37
void(* dcrudRemoteFactory_delete)(struct dcrudRemoteFactory_s *This, dcrudShareable what)
Definition: IParticipant.h:22
void * dcrudShareableData
Definition: Shareable.h:13
dcrudRemoteFactory_create create
Definition: IParticipant.h:40
UTIL_ADT(dcrudIParticipant)
int bool
Definition: types.h:11
void(* dcrudLocalFactory_Set)(dcrudShareableData This, const dcrudShareableData source)
Definition: IParticipant.h:15
dcrudRemoteFactory_update update
Definition: IParticipant.h:41
void(* dcrudRemoteFactory_create)(struct dcrudRemoteFactory_s *This, dcrudArguments how)
Definition: IParticipant.h:20
bool dcrudIParticipant_registerLocalFactory(dcrudIParticipant This, dcrudLocalFactory *local)
dcrudICache dcrudIParticipant_getDefaultCache(dcrudIParticipant This)
dcrudIDispatcher dcrudIParticipant_getDispatcher(dcrudIParticipant This)
dcrudShareable dcrudIParticipant_createShareable(dcrudIParticipant This, dcrudClassID classID)
struct dcrudRemoteFactory_s dcrudRemoteFactory
dcrudLocalFactory_Initialize initialize
Definition: IParticipant.h:28
enum ioStatus_e ioStatus
struct dcrudLocalFactory_s dcrudLocalFactory
dcrudShareable(* dcrudShareableFactory)()
Definition: IParticipant.h:11
dcrudIParticipant participant
Definition: IParticipant.h:39
ioStatus(* dcrudLocalFactory_Serialize)(dcrudShareableData This, ioByteBuffer target)
Definition: IParticipant.h:16
void dcrudIParticipant_listen(dcrudIParticipant This, dcrudIRegistry registry, const char *intrfc, bool dumpReceivedBuffer)