src/include/common/spds/constants.h

00001 /*
00002  * Funambol is a mobile platform developed by Funambol, Inc. 
00003  * Copyright (C) 2003 - 2007 Funambol, Inc.
00004  * 
00005  * This program is free software; you can redistribute it and/or modify it under
00006  * the terms of the GNU Affero General Public License version 3 as published by
00007  * the Free Software Foundation with the addition of the following permission 
00008  * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED
00009  * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE 
00010  * WARRANTY OF NON INFRINGEMENT  OF THIRD PARTY RIGHTS.
00011  * 
00012  * This program is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00014  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00015  * details.
00016  * 
00017  * You should have received a copy of the GNU Affero General Public License 
00018  * along with this program; if not, see http://www.gnu.org/licenses or write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00020  * MA 02110-1301 USA.
00021  * 
00022  * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite 
00023  * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com.
00024  * 
00025  * The interactive user interfaces in modified source and object code versions
00026  * of this program must display Appropriate Legal Notices, as required under
00027  * Section 5 of the GNU Affero General Public License version 3.
00028  * 
00029  * In accordance with Section 7(b) of the GNU Affero General Public License
00030  * version 3, these Appropriate Legal Notices must retain the display of the
00031  * "Powered by Funambol" logo. If the display of the logo is not reasonably 
00032  * feasible for technical reasons, the Appropriate Legal Notices must display
00033  * the words "Powered by Funambol".
00034  */
00035 
00036 
00037 
00038 #ifndef INCL_SPDS_CONSTANTS
00039 #define INCL_SPDS_CONSTANTS
00040 
00042 #include "base/fscapi.h"
00043 
00044 #define DIM_SOURCE_NAME      128
00045 #define DIM_SOURCE_URI        64
00046 #define DIM_KEY              256
00047 #define DIM_MIME_TYPE         64
00048 #define DIM_USERNAME         100
00049 #define DIM_PASSWORD         100
00050 #define DIM_DEVICE_ID         50
00051 #define DIM_SERVERNAME       100
00052 #define DIM_SYNC_MODES_LIST   64
00053 #define DIM_SYNC_MODE         16
00054 #define DIM_ANCHOR            32
00055 
00056 #define ERR_REPRESENTATION  700
00057 
00058 typedef enum SyncMode{
00059         SYNC_NONE                          = 000,
00060         SYNC_TWO_WAY                       = 200,
00061         SYNC_SLOW                          = 201,
00062         SYNC_ONE_WAY_FROM_CLIENT           = 202,
00063         SYNC_REFRESH_FROM_CLIENT           = 203,
00064         SYNC_ONE_WAY_FROM_SERVER           = 204,
00065         SYNC_REFRESH_FROM_SERVER           = 205,
00066         SYNC_TWO_WAY_BY_SERVER             = 206,
00067         SYNC_ONE_WAY_FROM_CLIENT_BY_SERVER = 207,
00068         SYNC_REFRESH_FROM_CLIENT_BY_SERVER = 208,
00069         SYNC_ONE_WAY_FROM_SERVER_BY_SERVER = 209,
00070         SYNC_REFRESH_FROM_SERVER_BY_SERVER = 210,
00071         //---Funambol extension-----------------
00072         SYNC_ADDR_CHANGE_NOTIFICATION      = 745
00073 } SyncMode;
00074 
00075 #define CONTEXT_SPDS_SYNCML  "/spds/syncml"
00076 #define CONTEXT_SPDS_SOURCES "/spds/sources"
00077 #define CONTEXT_CONN         "/Conn"
00078 #define CONTEXT_AUTH         "/Auth"
00079 #define CONTEXT_DEV_INFO     "/DevInfo"
00080 #define CONTEXT_DEV_DETAIL   "/DevDetail"
00081 #define CONTEXT_EXT          "/Ext"
00082 
00083 //-------------------------------------------------------
00084 // Status codes
00085 
00086 #define IN_PROGRESS                                   101
00087 #define OK                                            200
00088 #define ITEM_ADDED                                    201
00089 #define ACCEPTED_FOR_PROCESSING                       202
00090 #define NONAUTHORITATIVE_RESPONSE                     203
00091 #define NO_CONTENT                                    204
00092 #define RESET_CONTENT                                 205
00093 #define PARTIAL_CONTENT                               206
00094 #define CONFLICT_RESOLVED_WITH_MERGE                  207
00095 #define CONFLICT_RESOLVED_WITH_CLIENT_COMMAND_WINNING 208
00096 #define CONFLICT_RESOLVED_WITH_DUPLICATE              209
00097 #define DELETE_WITHOUT_ARCHIVE                        210
00098 #define ITEM_NOT_DELETED                              211
00099 #define AUTHENTICATION_ACCEPTED                       212
00100 #define CHUNKED_ITEM_ACCEPTED                         213
00101 #define OPERATION_CANCELLED_OK                        214
00102 #define NOT_EXECUTED                                  215
00103 #define ATOMIC_ROLLBACK_OK                            216
00104 #define MULTIPLE_CHOICES                              300
00105 #define MOVED_PERMANENTLY                             301
00106 #define FOUND                                         302
00107 #define SEE_ANOTHER_URI                               303
00108 #define NOT_MODIFIED                                  304
00109 #define USE_PROXY                                     305
00110 #define BAD_REQUEST                                   400
00111 #define INVALID_CREDENTIALS                           401
00112 #define PAYMENT_REQUIRED                              402
00113 #define FORBIDDEN                                     403
00114 #define NOT_FOUND                                     404
00115 #define COMMAND_NOT_ALLOWED                           405
00116 #define OPTIONAL_FEATURE_NOT_SUPPORTED                406
00117 #define MISSING_CREDENTIALS                           407
00118 #define REQUEST_TIMEOUT                               408
00119 #define UPDATE_CONFLICT                               409
00120 #define GONE                                          410
00121 #define SIZE_REQUIRED                                 411
00122 #define INCOMPLETE_COMMAND                            412
00123 #define REQUESTED_ENTITY_TOO_LARGE                    413
00124 #define URI_TOO_LONG                                  414
00125 #define UNSUPPORTED_MEDIA_TYPE                        415
00126 #define REQUESTED_SIZE_TOO_BIG                        416
00127 #define RETRY_LATER                                   417
00128 #define ALREADY_EXISTS                                418
00129 #define CONFLICT_RESOLVED_WITH_SERVER_DATA            419
00130 #define DEVICE_FULL                                   420
00131 #define UNKNOWN_SEARCH_GRAMMAR                        421
00132 #define BAD_CGI_SCRIPT                                422
00133 #define SOFT_DELETE_CONFLICT                          423
00134 #define OBJECT_SIZE_MISMATCH                          424
00135 #define PERMISSION_DENIED                             425
00136 #define COMMAND_FAILED                                500
00137 #define COMMAND_NOT_IMPLEMENTED                       501
00138 #define BAD_GATEWAY                                   502
00139 #define SERVICE_UNAVAILABLE                           503
00140 #define GATEWAY_TIMEOUT                               504
00141 #define VERSION_NOT_SUPPORTED                         505
00142 #define PROCESSING_ERROR                              506
00143 #define ATOMIC_FAILED                                 507
00144 #define REFRESH_REQUIRED                              508
00145 #define RECIPIENT_EXCEPTION_RESERVED1                 509
00146 #define DATASTORE_FAILURE                             510
00147 #define SERVER_FAILURE                                511
00148 #define SYNCHRONIZATION_FAILED                        512
00149 #define PROTOCOL_VERSION_NOT_SUPPORTED                513
00150 #define OPERATION_CANCELLED                           514
00151 #define ATOMIC_ROLLBACK_FAILED                        516
00152 #define ATOMIC_RESPONSE_TOO_LARGE_TO_FIT              517
00153 
00154 // ------------------------------------------------------
00155 
00156 //-------------------------------------------------------
00157 // Commands
00158 
00159 #define COMMAND_ADD     "Add"
00160 #define COMMAND_DELETE  "Delete"
00161 #define COMMAND_GET     "Get"
00162 #define COMMAND_PUT     "Put"
00163 #define COMMAND_REPLACE "Replace"
00164 #define COMMAND_RESULTS "Results"
00165 #define COMMAND_STATUS  "Status"
00166 #define COMMAND_SYNC    "Sync"
00167 
00168 //-------------------------------------------------------
00169 
00170 #ifndef NULL
00171     #define NULL 0x00
00172 #endif
00173 
00174 
00175 char*  retSyncMode(SyncMode);
00176 
00178 #endif

Generated on Thu Mar 6 14:25:04 2008 for Funambol C++ Client Library by  doxygen 1.5.2