syncmlfw/common/syncagent/inc/nsmlerror.h
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Error code conversion
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __NSMLERROR_H
       
    21 #define __NSMLERROR_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <nsmldefines.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CNSmlFutureReservation;
       
    29 
       
    30 //  INCLUDES
       
    31 class TNSmlError
       
    32 	{
       
    33 	// Public members
       
    34 	public:  // enumerations
       
    35 	//
       
    36     enum TNSmlAgentErrorCode
       
    37 		{
       
    38 		ESmlServerNotResponding = 9,
       
    39 		ESmlCommandInvalid = 1000,
       
    40 		ESmlSyncHdrMissing = 1001,
       
    41 		ESmlVerDTDMissing = 1002,
       
    42 		ESmlVerDTDNotSupported = 1003,
       
    43 		ESmlVerProtoMissing = 1004,
       
    44 		ESmlVerProtoNotSupported = 1005,
       
    45 		ESmlMsgIDMissing = 1006,
       
    46 		ESmlMsgIDInvalid = 1007,
       
    47 		ESmlTargetLocURIMissing = 1008,
       
    48 		ESmlTargetLocURIInvalid = 1009,
       
    49 		ESmlSourceLocURIMissing = 1010,
       
    50 		ESmlSourceLocURIInvalid = 1011,
       
    51 		ESmlUnexpectedCmd = 1012,
       
    52 		ESmlUnsupportedCmd = 1013,
       
    53 		ESmlStatusMissing = 1101,
       
    54 		ESmlNoMatchingStatusElement = 1102,
       
    55 		ESmlMsgRefMissing = 1103,
       
    56 		ESmlMsgRefInvalid = 1104,
       
    57 		ESmlCmdRefMissing = 1105,
       
    58 		ESmlCmdRefInvalid = 1106,
       
    59 		ESmlCmdMissing = 1107,
       
    60 		ESmlCmdInvalid = 1108,
       
    61 		ESmlSourceRefInvalid = 1109,
       
    62 		ESmlStatusDataMissing = 1110,
       
    63 		ESmlStatusDataInvalid = 1111,
       
    64 		ESmlCmdIDMissing = 1112,
       
    65 		ESmlCmdIDInvalid = 1113,
       
    66 		ESmlSyncTargetLocURIMissing = 1114,
       
    67 		ESmlSyncTargetLocURIInvalid = 1115,
       
    68 		ESmlSyncSourceLocURIMissing = 1116,
       
    69 		ESmlSyncSourceLocURIInvalid = 1117,
       
    70 		ESmlFormatNotSupported = 1118,
       
    71 		ESmlFormatInvalid = 1119,
       
    72 		ESmlTypeNotSupported = 1120,
       
    73 		ESmlTypeInvalid = 1121,
       
    74 		ESmlItemSourceLocURIMissing = 1122,
       
    75 		ESmlItemDataMissing = 1123,
       
    76 		ESmlItemTargetLocURIMissing = 1126,
       
    77 		ESmlResultsInvalid = 1400,
       
    78 		ESmlResultsMissing = 1401,
       
    79 		ESmlResultsItemSourceMissing = 1402,
       
    80 		ESmlResultsItemSourceInvalid = 1403,
       
    81 		ESmlAlertMissingInInitialisation = 1404,
       
    82 		ESmlAlertMissingInNextAlerting = 1405,
       
    83 		ESmlAlertInvalid = 1406,
       
    84 		ESmlAlertCodeMissing = 1407,
       
    85 		ESmlAlertCodeInvalid = 1408,
       
    86 		ESmlAlertTargetLocURIMissing = 1410,
       
    87 		ESmlAlertTargetLocURIInvalid = 1411,
       
    88 		ESmlAlertSourceLocURIMissing = 1412,
       
    89 		ESmlAlertSourceLocURIInvalid = 1413,
       
    90 		ESmlPutInvalid = 1414,
       
    91 		ESmlPutItemSourceMissing = 1415,
       
    92 		ESmlPutItemSourceInvalid = 1416,
       
    93 		ESmlGetInvalid = 1417,
       
    94 		ESmlGetItemTargetMissing = 1418,
       
    95 		ESmlGetItemTargetInvalid = 1419,
       
    96 		ESmlChalMissing = 1420,
       
    97 		ESmlChalInvalid = 1421,
       
    98 		ESmlMaxMsgSizeInvalid = 1422,
       
    99 		ESmlServerIsBusy = 1500,
       
   100 		ESmlErrorInSettings = 1600,
       
   101 		ESmlTooLongMessage = 1602,
       
   102 		ESmlLowMemory = 1603,
       
   103 		ESmlIncompleteMessage = 1604,
       
   104 		ESmlServerUnauthorized = 1700,
       
   105 		ESmlCommunicationInterrupted = 8193,
       
   106 		ESmlCommunicationError = 0x5011,
       
   107 		ESmlUntrustedCert = 0x6011 
       
   108 		};
       
   109 		// SyncML Status Codes
       
   110 	enum TNSmlSyncMLStatusCode
       
   111 		{
       
   112 		ESmlStatusInProgress = 101,
       
   113 		ESmlStatusOK = 200,
       
   114 		ESmlStatusItemAdded = 201,
       
   115 		ESmlStatusAcceptedForProcessing = 202,
       
   116 		ESmlStatusNonAuthoriveResponse = 203,
       
   117 		ESmlStatusNoContent = 204,
       
   118 		ESmlStatusResetContent = 205,
       
   119 		ESmlStatusPartialContent = 206,
       
   120 		ESmlStatusConflictResolvedWithMerge = 207,
       
   121 		ESmlStatusConflictResolvedWithClientsCommand = 208,
       
   122 		ESmlStatusConflictResolvedWithDuplicate = 209,
       
   123 		ESmlStatusDeleteWithoutArchive = 210,
       
   124 		ESmlStatusItemIsNotDeleted = 211,
       
   125 		ESmlStatusAuthenticationAccepted = 212,
       
   126 		ESmlStatusItemAccepted = 213,
       
   127 		ESmlStatusOperationCancelled = 214,
       
   128 		ESmlStatusNotExecuted = 215,
       
   129 		ESmlStatusRollBackOK = 216,
       
   130         ESmlStatusNotPossibleInOfflineMode = 217, // 1.2 CHANGES: Offline mode
       
   131 		ESmlStatusMultipleChoices = 300,
       
   132 		ESmlStatusMovedPermanently = 301,
       
   133 		ESmlStatusMovedTemporarily = 302,
       
   134 		ESmlStatusSeeOtherURI = 303,
       
   135 		ESmlStatusNotModified = 304,
       
   136 		ESmlStatusUseProxy = 305,
       
   137 		ESmlStatusBadRequest = 400,
       
   138 		ESmlStatusUnauthorized = 401,
       
   139 		ESmlStatusPaymentRequired = 402,
       
   140 		ESmlStatusForbidden = 403,
       
   141 		ESmlStatusNotFound = 404,
       
   142 		ESmlStatusCommandNotAllowed = 405,
       
   143 		ESmlStatusOptFeatureNotSupported = 406,
       
   144 		ESmlStatusClientAuthenticationRequired = 407,
       
   145 		ESmlStatusRequestTimeout = 408,
       
   146 		ESmlStatusConflict = 409,
       
   147 		ESmlStatusGone = 410,
       
   148 		ESmlStatusSizeRequired = 411,
       
   149 		ESmlStatusIncompleteCommand = 412,
       
   150 		ESmlStatusEntityTooLarge = 413,
       
   151 		ESmlStatusURITooLong = 414,
       
   152 		ESmlStatusUnsupportedMediaTypeOrFormat = 415,
       
   153 		ESmlStatusRequestedSizeTooBig = 416,
       
   154 		ESmlStatusRetryLater = 417,
       
   155 		ESmlStatusAlreadyExists = 418,
       
   156 		ESmlStatusConflictResolvedWithServerData = 419,
       
   157 		ESmlStatusDeviceFull = 420,
       
   158 		ESmlStatusUnknownSearchGrammar = 421,
       
   159 		ESmlStatusBadCGIScript = 422,
       
   160 		ESmlStatusSoftDeleteUpdateConflict = 423,
       
   161 		ESmlStatusSizeMismatch = 424,
       
   162 		ESmlStatusMoveFailed = 428,
       
   163 		ESmlStatusCommandFailed = 500,
       
   164 		ESmlStatusCommandNotImplemented = 501,
       
   165 		ESmlStatusBadGateway = 502,
       
   166 		ESmlStatusServiceUnavailable = 503,
       
   167 		ESmlStatusGatewayTimeout = 504,
       
   168 		ESmlStatusVersionNotSupported = 505,
       
   169 		ESmlStatusProcessingError = 506,
       
   170 		ESmlStatusAtomicFailed = 507,
       
   171 		ESmlStatusRefreshRequired = 508,
       
   172 		ESmlStatusDataStoreFailure = 510,
       
   173 		ESmlStatusServerFailure = 511,
       
   174 		ESmlStatusSynchronisationFailed = 512,
       
   175 		ESmlStatusProtocolVersionNotSupported = 513,
       
   176 		ESmlStatusAtomicRollBackFailed = 516 
       
   177 		};	
       
   178 	protected:  //enumerations
       
   179 	enum TNSmlCommonAgentMessage    
       
   180 		{		
       
   181 		ESystemError = 1,
       
   182 		EServerSystemError,
       
   183 		ESyncMLError,
       
   184 		ESyncMLCommandNotSupported,
       
   185 		ESyncMLVersionNotSupported,
       
   186 		EUnsupportedContentTypeOrFormat,
       
   187 		ESyncMLClientAuthenticationError,
       
   188 		ESyncMLServerAuthenticationError,
       
   189 		EServerBusy,
       
   190 		EServerNotResponding,
       
   191 		EInvalidURI,
       
   192 		ECommunicationError,
       
   193 		EHTTPAuthError,
       
   194         ENotPossibleInOfflineMode // 1.2 CHANGES: Offline mode
       
   195 		};
       
   196 	public:  //constructor	
       
   197 	IMPORT_C TNSmlError();
       
   198 	IMPORT_C virtual ~TNSmlError();
       
   199 	
       
   200 	public: //new functions
       
   201 	IMPORT_C void SetErrorCode( TInt aErrorCode );
       
   202 	// Sync Log Message code 
       
   203 	IMPORT_C virtual TInt SyncLogMessageCode();
       
   204 	IMPORT_C TInt SyncLogErrorCode();
       
   205 
       
   206 	protected: //new functions
       
   207 	IMPORT_C void virtual ErrorCodeConversion();
       
   208 	// Private variables
       
   209 	protected: // Data
       
   210 	TInt iErrorCode;
       
   211     private: // Data
       
   212 	// Reserved to maintain binary compability
       
   213 	CNSmlFutureReservation* iReserved;
       
   214 	};
       
   215 
       
   216 #endif // __NSMLERROR_H
       
   217