00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef INCL_NOTIF_PROCESSOR
00026 #define INCL_NOTIF_PROCESSOR
00027
00029 #include "syncml/core/SyncAlert.h"
00030
00031
00032 enum SN_UIMode {
00033 UI_NotSpecified,
00034 UI_Background,
00035 UI_Info,
00036 UI_Interactive
00037 };
00038
00039
00040 enum SN_Initiator {
00041 UserInitiated,
00042 ServerInitiated
00043 };
00044
00045
00046 enum SN_Errors {
00047 SNErr_Ok,
00048 SNErr_BadReq,
00049 SNErr_InvSync,
00050 SNErr_Incomplete,
00051 SNErr_NullValue,
00052 SNErr_Undefined = 255
00053 };
00054
00055
00056 class SyncNotification {
00057
00058 public:
00059
00060
00061 SyncNotification();
00062
00063 ~SyncNotification();
00064
00065
00066
00067
00068 SN_Errors parse(const char *msg, int len);
00069
00070
00071
00072
00073 int getVersion();
00074 SN_UIMode getUIMode();
00075 SN_Initiator getInitiator();
00076 int getSessionId();
00077 const char* getServerId();
00078 int getNumSyncs();
00079 SyncAlert* getSyncAlert ( int idx );
00080
00081 private:
00082
00083 int version;
00084 SN_UIMode uiMode;
00085 SN_Initiator initiator;
00086 int sessionId;
00087 char* serverId;
00088
00089 int numSyncs;
00090 SyncAlert *syncAlerts;
00091
00092 void reset(bool free);
00093 };
00094
00096 #endif
00097