00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _SML_SESSION_INTERNALS_H_
00023 #define _SML_SESSION_INTERNALS_H_
00024
00025 #include "sml_queue_internals.h"
00026
00027 struct SmlSession {
00028 gint refCount;
00029 SmlProtocolVersion version;
00030 SmlProtocolType protocol;
00031 SmlSessionType sessionType;
00032 SmlAssembler *assembler;
00033 SmlBool onlyReplace;
00034
00035 SmlSessionEventCallback eventCallback;
00036 void *eventCallbackUserdata;
00037
00038 SmlSessionDataCallback dataCallback;
00039 void *dataCallbackUserdata;
00040
00041 char *sessionID;
00042
00043 SmlLocation *target;
00044 SmlLocation *orgTarget;
00045 SmlLocation *source;
00046 char *responseURI;
00047 SmlChal *chal;
00048 SmlCred *cred;
00049
00050
00051
00052
00053
00054 unsigned int localMaxMsgSize;
00055 unsigned int localMaxObjSize;
00056
00057 GList *pendingReplies;
00058
00059 unsigned long lastMessageID;
00060 unsigned long lastReceivedMessageID;
00061 unsigned long lastCommandID;
00062
00063 GList *commands;
00064 SmlBool final;
00065 SmlBool authenticate;
00066 SmlBool established;
00067
00068 SmlMimeType type;
00069
00070 SmlQueue *command_queue;
00071 SmlBool waiting;
00072 SmlBool sending;
00073 GList *commandStack;
00074 SmlBool hasCommand;
00075 SmlBool assmHasHeader;
00076
00077 SmlBool end;
00078 GMutex *reportEnd;
00079 SmlBool reportedEnd;
00080
00081 SmlCommand *parentCommand;
00082
00083
00084
00085 SmlCommand *incomingBuffer;
00086
00087
00088 SmlCommand *frag_command;
00089
00090
00091 unsigned int frag_size;
00092 SmlStatusReplyCb frag_callback;
00093 void *frag_userdata;
00094
00095 SmlBool active;
00096 GMutex *dispatch_mutex;
00097 };
00098
00099 struct SmlPendingStatus {
00100 unsigned int cmdID;
00101 unsigned int msgID;
00102 SmlStatusReplyCb callback;
00103 void *userdata;
00104 };
00105
00106 SmlBool smlSessionTryLock(SmlSession *session);
00107 void smlSessionLock(SmlSession *session);
00108 void smlSessionUnlock(SmlSession *session);
00109
00110 void smlSessionRestoreTargetURI(SmlSession *session);
00111 SmlBool smlSessionSetResponseURI(
00112 SmlSession *session,
00113 const char *responseURI,
00114 SmlError **error);
00115
00116 #endif //_SML_SESSION_INTERNALS_H_