00001
00019 #ifndef INCL_SYNCML_PROCESSOR
00020 #define INCL_SYNCML_PROCESSOR
00021
00023 #include "base/util/ArrayList.h"
00024 #include "base/util/XMLProcessor.h"
00025 #include "spds/SyncSource.h"
00026 #include "spds/SyncItem.h"
00027 #include "spds/SyncItemStatus.h"
00028 #include "syncml/core/TagNames.h"
00029 #include "syncml/core/ObjectDel.h"
00030 #include "syncml/parser/Parser.h"
00031 #include "spds/SyncReport.h"
00032
00033
00034
00035
00036
00037 class __declspec(dllexport) SyncMLProcessor : public XMLProcessor {
00038
00039 private:
00040
00041
00042
00043
00044 int getStatusCode(SyncBody* syncBody, SyncSource* source, const char* commandName) EXTRA_SECTION_01;
00045
00046
00047
00048
00049
00050
00051 int getSyncHeaderStatusCode(Status* s) EXTRA_SECTION_01;
00052
00053
00054
00055
00056
00057
00058 int getAlertStatusCode(Status* status, const char* sourceName) EXTRA_SECTION_01;
00059
00060
00061
00062
00063 AbstractCommand* getCommand(SyncBody* syncBody, const char* commandName, int index) EXTRA_SECTION_01;
00064
00065
00066
00067
00068
00069 ArrayElement* getArrayElement(ArrayList* list, int index) EXTRA_SECTION_01;
00070
00071 public:
00072
00073
00074
00075
00076 SyncMLProcessor();
00077
00078
00079
00080
00081 SyncML* processMsg(char* msg) EXTRA_SECTION_01;
00082
00083
00084
00085
00086
00087
00088
00089 int processInitResponse(SyncSource& source, SyncML* syncml, Alert* alert) EXTRA_SECTION_01;
00090
00091 int processSyncHdrStatus(SyncML* syncml) EXTRA_SECTION_01;
00092 int processAlertStatus(SyncSource& source, SyncML* syncml, ArrayList* alerts) EXTRA_SECTION_01;
00093
00094 int processServerAlert(SyncSource& source, SyncML* syncml) EXTRA_SECTION_01;
00095
00096
00097
00098 Chal* getChal(SyncBody* syncBody) EXTRA_SECTION_01;
00099
00100
00101
00102
00103 Cred* getServerCred(SyncHdr* syncHdr) EXTRA_SECTION_01;
00104
00105
00106
00107
00108
00109
00110 int processItemStatus(SyncSource& source, SyncBody* syncBody) EXTRA_SECTION_01;
00111
00112
00113
00114
00115
00116
00117
00118 Sync* processSyncResponse(SyncSource& source, SyncML* syncml) EXTRA_SECTION_01;
00119
00120
00121
00122
00123
00124
00125
00126
00127 int processMapResponse(SyncSource& source, SyncBody* syncBody) EXTRA_SECTION_01;
00128
00129
00130
00131
00132
00133
00134
00135
00136 const char* getRespURI(SyncHdr* msg) EXTRA_SECTION_01;
00137
00138
00139
00140
00141 ArrayList* getCommands(SyncBody* syncBody, const char* commandName) EXTRA_SECTION_01;
00142
00143
00144
00145
00146 char** getSortedSourcesFromServer(SyncML* syncml, int sourcesNumber);
00147
00148
00149
00150
00151 Sync* getSyncResponse(SyncML* syncml, int index);
00152 };
00153
00155 #endif