00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00029
00030 #ifndef _SML_MANAGER_INTERNALS_H
00031 #define _SML_MANAGER_INTERNALS_H
00032
00033 #include "sml_queue_internals.h"
00034
00035 struct SmlManager {
00036 SmlTransport *transport;
00037
00038 GList *sessions;
00039
00040 SmlManagerEventCb eventCallback;
00041 void *eventCallbackUserdata;
00042
00043 SmlHeaderCb headerCallback;
00044 SmlStatusReplyCb headerStatusCallback;
00045 void *headerCallbackUserdata;
00046
00047 GList *objects;
00048
00049 GSourceFuncs *functions;
00050 SmlThread *thread;
00051 GMainContext *context;
00052 GSource *source;
00053
00054 GCond *running;
00055 GMutex *running_mutex;
00056
00057 SmlQueue *userEventQueue;
00058
00059 unsigned int localMaxMsgSize;
00060 unsigned int localMaxObjSize;
00061 };
00062
00063 typedef struct SmlManagerEvent {
00064 SmlManagerEventType type;
00065 SmlSession *session;
00066 SmlCommand *command;
00067 SmlCommand *parent;
00068 SmlError *error;
00069 } SmlManagerEvent;
00070
00071 struct SmlObject {
00072 SmlCommandType type;
00073 SmlLocation *location;
00074 SmlLocation *source;
00075 SmlCommandCb commandCallback;
00076 SmlCommandCb childCallback;
00077 void *commandCallbackUserdata;
00078 char *contentType;
00079 };
00080
00081 void smlManagerSessionFinalLockRef(SmlManager *manager, SmlSession *session);
00082 void smlManagerSessionFinalLockUnref(SmlManager *manager, SmlSession *session);
00083
00084 SmlLink *smlManagerSessionGetLink(
00085 SmlManager *manager,
00086 SmlSession *session,
00087 SmlError **error);
00088
00089 #endif //_SML_MANAGER_INTERNALS_H
00090