mtpfws/mtpfw/dataproviders/dputility/inc/mtpsvcdpconst.h
changeset 0 d0791faffa3f
child 1 f8e15b44d440
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // mw/remoteconn/mtpfws/mtpfw/dataproviders/dputility/inc/mtpsvcdpconst.h
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent
       
    19  */
       
    20 
       
    21 #ifndef __MTPSVCDPCONST_H__
       
    22 #define __MTPSVCDPCONST_H__
       
    23 
       
    24 #include <mtp/mtpprotocolconstants.h>
       
    25 
       
    26 
       
    27 /**
       
    28 service types defined in MTP
       
    29  */
       
    30 typedef enum
       
    31 	{
       
    32 	EMTPServiceTypeNormal = 0,
       
    33 	EMTPServiceTypeAbstract = 1
       
    34 	} TMTPServiceType;
       
    35 
       
    36 /**
       
    37 Abstract service types defined in MTP
       
    38  */
       
    39 typedef enum
       
    40 	{
       
    41 	EMTPFullEnumSyncService = 0,
       
    42 	EMTPAnchorSyncService
       
    43 	} TMTPAbstrctServiceType;
       
    44 
       
    45 // Service Name definition
       
    46 _LIT(KFullEnumServiceName,  "FullEnumSync");
       
    47 
       
    48 // FullEnum Sync Service GUID, specified by Spec.
       
    49 const TUint32 KMTPFullEnumServiceGUID[] = {0x28d3aac9, 0xc07544be, 0x888165f3, 0x8d305909};
       
    50 
       
    51 // FullEnumm Sync Service Persistent GUID, specified by Symbian/Nokia Implementation.
       
    52 const TUint32 KMTPFullEnumServicePSGUID[] = {0x102827A1, 0x00000001, 0x00000000, 0x00000000};
       
    53 
       
    54 /*
       
    55  Service property definition
       
    56  */
       
    57 
       
    58 //FullEnum Sync Service Namespace for Service Property, specified by Spec.
       
    59 const TUint32 KMTPFullEnumSyncServiceNSGUID[] = {0x63b10e6c, 0x4f3a456d, 0x95cb9894, 0xedec9fa5};
       
    60 //SyncSvc Service Namespace for Service Property, specified by Spec.
       
    61 const TUint32 KMTPSyncSvcServiceNSGUID[] = {0x703d392c, 0x532c4607, 0x91589cea, 0x742f3a16};
       
    62 
       
    63 // FullEnum/Anchor Sync service property value definition
       
    64 typedef enum
       
    65 	{
       
    66 	EMTPServicePropertyVersionProps = 0,
       
    67 	EMTPServicePropertyReplicaID,
       
    68 	EMTPServicePropertyKnowledgeObjectID,
       
    69 	EMTPServicePropertyLastSyncProxyID,
       
    70 	EMTPServicePropertyProviderVersion,         // In Simulator, it's not supported.
       
    71 	EMTPServicePropertySyncFormat,              // In Simulator, it's moved to normal service property
       
    72 	EMTPServicePropertyLocalOnlyDelete,
       
    73 	EMTPServicePropertyFilterType,
       
    74 	EMTPServicePropertySyncObjectReferences,    // In Simulator, it's not supported.
       
    75 	EMTPAbstractServicePropertyEnd
       
    76 	} TMTPAbstractServiceProperty;
       
    77 
       
    78 // Define Full Enumeration Sync service property name
       
    79 _LIT(KNameFullEnumVersionProps,         "FullEnumVersionProps");
       
    80 _LIT(KNameFullEnumReplicaID,            "FullEnumReplicaID");
       
    81 _LIT(KNameFullEnumKnowledgeObjectID,    "FullEnumKnowledgeObjectID");
       
    82 _LIT(KNameFullEnumLastSyncProxyID,      "FullEnumLastSyncProxyID");
       
    83 _LIT(KNameFullEnumProviderVersion,      "FullEnumProviderVersion");
       
    84 _LIT(KNameSyncSvcLocalOnlyDelete,       "LocalOnlyDelete");
       
    85 _LIT(KNameSyncSvcSyncFormat,            "SyncFormat");
       
    86 _LIT(KNameSyncSvcFilterType,            "FilterType");
       
    87 _LIT(KNameSyncSvcSyncObjectReferences,  "SyncObjectReferences");
       
    88 
       
    89 /**
       
    90 Abstract service format definition
       
    91  */
       
    92 // Define all the abstract service format
       
    93 typedef enum
       
    94 	{
       
    95 	EMTPFormatTypeFullEnumSyncKnowledge,
       
    96 	EMTPAbstractFormatTypeEnd
       
    97 	} TMTPAbstractServiceFormatType;
       
    98 
       
    99 _LIT(KNameFullEnumSyncKnowledege, "FullEnumSyncKnowledge");
       
   100 _LIT(KNameFullEnumSyncKnowledegeMIMEType, "");
       
   101 
       
   102 
       
   103 /**
       
   104 Format property definition
       
   105 ---------Supported Property Namespaces--------------
       
   106     FullEnum Knowledge Format   : { Generic Object Namespace Properties; }
       
   107  */
       
   108 
       
   109 // FullEnum Sync Service > Knowledge Format GUID, specified by Spec.
       
   110 const TUint32 KMTPFullEnumSyncKnowledgeFormatGUID[] = {0x221bce32, 0x221b4f45, 0xb48b80de, 0x9a93a44a};
       
   111 
       
   112 // Generic Object Namespace GUID for Service Format, specified by Spec.
       
   113 const TUint32 KMTPGenericObjectNSGUID[] = {0xEF6B490D, 0x5CD8437A, 0xAFFCDA8B, 0x60EE4A3C};
       
   114 
       
   115 //Sync Object Namespace for Service Format, specified by Spec. Current this value comes from Simulator.
       
   116 const TUint32 KMTPSyncObjcetNSGUID[] = {0x37364f58, 0x2f744981, 0x99a57ae2, 0x8aeee319};
       
   117 
       
   118 // Generic Object Namespace prop code value defnition
       
   119 typedef enum
       
   120 	{
       
   121 	EMTPGenObjPropCodeParentID             = EMTPObjectPropCodeParentObject,
       
   122 	EMTPGenObjPropCodeName                 = EMTPObjectPropCodeName,
       
   123 	EMTPGenObjPropCodePersistentUniqueObjectIdentifier = EMTPObjectPropCodePersistentUniqueObjectIdentifier,
       
   124 	EMTPGenObjPropCodeObjectFormat         = EMTPObjectPropCodeObjectFormat,
       
   125 	EMTPGenObjPropCodeObjectSize           = EMTPObjectPropCodeObjectSize,
       
   126 	EMTPGenObjPropCodeStorageID            = EMTPObjectPropCodeStorageID,
       
   127 	EMTPGenObjPropCodeObjectHidden         = EMTPObjectPropCodeHidden,
       
   128 	EMTPGenObjPropCodeNonConsumable        = EMTPObjectPropCodeNonConsumable,
       
   129 	EMTPGenObjPropCodeDateModified         = EMTPObjectPropCodeDateModified,
       
   130 	// LastAuthorProxyID is from Simulator, and is not a Generic Object property. For conveniency, put it here.
       
   131 	EMTPSvcObjPropCodeLastAuthorProxyID    = EMTPObjectPropCodeVendorExtensionStart + 1,
       
   132 	} TMTPGenericObjectProperty;
       
   133 
       
   134 // Normal service Object Extension definition should start with this value
       
   135 const TUint16 KMTPNormalServiceObjExtensionStart = EMTPObjectPropCodeVendorExtensionStart + 2;
       
   136 
       
   137 // Define Generic Object Property name string
       
   138 _LIT(KObjPropNameParentID,          "ParentID");
       
   139 _LIT(KObjPropNameName,              "Name");
       
   140 _LIT(KObjPropNamePUOID,             "PersistentUID");
       
   141 _LIT(KObjPropNameObjectFormat,      "ObjectFormat");
       
   142 _LIT(KObjPropNameObjectSize,        "ObjectSize");
       
   143 _LIT(KObjPropNameStorageID,         "StorageID");
       
   144 _LIT(KObjPropNameHidden,            "Hidden");
       
   145 _LIT(KObjPropNameNonConsumable,     "NonConsumable");
       
   146 _LIT(KObjPropNameDateModified,      "DateModified");
       
   147 _LIT(KObjPropNameLastAuthorProxyID, "LastAuthorProxyID");
       
   148 
       
   149 
       
   150 // FullEnum Knowledge Format object prop array
       
   151 const TUint16 KMTPFullEnumSyncKnowledgeObjectProperties[] =
       
   152 	{
       
   153 	EMTPGenObjPropCodeParentID,
       
   154 	EMTPGenObjPropCodeName,
       
   155 	EMTPGenObjPropCodePersistentUniqueObjectIdentifier,
       
   156 	EMTPGenObjPropCodeObjectFormat,
       
   157 	EMTPGenObjPropCodeObjectSize,
       
   158 	EMTPGenObjPropCodeStorageID,
       
   159 	EMTPGenObjPropCodeObjectHidden,
       
   160 	EMTPGenObjPropCodeNonConsumable,
       
   161 	EMTPGenObjPropCodeDateModified,
       
   162 	EMTPSvcObjPropCodeLastAuthorProxyID // Simulator defined
       
   163 	};
       
   164 
       
   165 
       
   166 /*
       
   167 Value Range definition
       
   168  */
       
   169 // Enum value describing type of hidden.
       
   170 typedef enum 
       
   171 	{
       
   172 	EMTPUnInitialized                 = 0xFF,
       
   173 	EMTPGenObjNotHidden               = 0,
       
   174 	EMTPGenObjHidden                  = 1
       
   175 	} TMTPGenObjHidden;
       
   176 
       
   177 // Enum value describing type of the filter
       
   178 typedef enum
       
   179 	{
       
   180 	EMTPSyncSvcFilterNone                         = 0,
       
   181 	EMTPSyncSvcFilterContactsWithPhone            = 1,
       
   182 	EMTPSyncSvcFilterTaskActive                   = 2,
       
   183 	EMTPSyncSvcFilterCalendarWindowWithRecurrence = 3,
       
   184 	EMTPSyncSvcFilterUnInitialized                = ~0
       
   185 	} TMTPSyncSvcFilterType;
       
   186 
       
   187 // Boolean flag indicating whether deletion of objects on the service host
       
   188 // should be treated as "local only" and not propogated to other sync
       
   189 // participants.  The alternative is "true sync" in which deletes on the
       
   190 // service host are propogated to all other sync participants.
       
   191 typedef enum
       
   192 	{
       
   193 	EMTPLocalOnlyDeleteFalse          = 0,
       
   194 	EMTPLocalOnlyDeleteTrue           = 1,
       
   195 	EMTPLocalOnlyDeleteUnInitialized  = ~0
       
   196 	} TMTPSyncSvcLocalOnlyDelete;
       
   197 
       
   198 // Boolean flag describing whether object references should be included
       
   199 // as part of the sync process or not.
       
   200 typedef enum
       
   201 	{
       
   202 	EMTPSyncObjectReferencesDisabled = 0x00,
       
   203 	EMTPSyncObjectReferencesEnabled  = 0xFF
       
   204 	} TMTPSyncSvcSyncObjectReferences;
       
   205 
       
   206 
       
   207 /*
       
   208 Simple const value definition
       
   209  */
       
   210 // Define abstract service info const variable
       
   211 _LIT(KMTPExtension, "microsoft.com/DeviceServices: 1.0");
       
   212 
       
   213 // the default value of BaseFormat in service info dataset
       
   214 const TUint16 KBaseFormatCode = 0x00;
       
   215 
       
   216 // the default value of ServiceVersion in service info dataset
       
   217 const TUint32 KMTPDefaultServiceVersion = 0x64;
       
   218 
       
   219 // the default value of ProviderVersion in service property, 0 is reserved, so start from 1.
       
   220 const TUint32 KMTPDefaultProviderVersion = 0x01;
       
   221 
       
   222 // the default value of ServiceType in service info dataset
       
   223 // 0 if standard service. 1 if abstract
       
   224 const TUint32 KMTPDefaultServiceType   = 0x00;
       
   225 
       
   226 // the default value of BaseServiceID in service info dataset
       
   227 const TUint32 KMTPDefaultBaseServiceID = 0x00;
       
   228 
       
   229 // the value in spec. to sepcify to do some operation on all service properties.
       
   230 const TUint32 KMTPServicePropertyAll = 0x00000000;
       
   231 
       
   232 const TUint32 KMTPUnInitialized32 = 0xFFFFFFFF;
       
   233 const TUint32 KMaxSUIDLength = 50;
       
   234 const TUint64 KObjectSizeNotAvaiable = ~0;
       
   235 const TUint32 KLongStringMaxLength = 0x1000;
       
   236 
       
   237 //---------------------------------------------------------------
       
   238 // the old names, It'd better be renamed.
       
   239 
       
   240 // Knowledge object prop array Group 2
       
   241 const TUint16 KMTPKnowledgeObjectPropertiesGroup2[] =
       
   242 	{
       
   243 	EMTPGenObjPropCodeParentID,
       
   244 	EMTPGenObjPropCodePersistentUniqueObjectIdentifier,
       
   245 	EMTPGenObjPropCodeObjectFormat,
       
   246 	EMTPGenObjPropCodeObjectSize,
       
   247 	EMTPGenObjPropCodeStorageID,
       
   248 	EMTPGenObjPropCodeObjectHidden,
       
   249 	EMTPGenObjPropCodeDateModified,
       
   250 	EMTPSvcObjPropCodeLastAuthorProxyID
       
   251 	};
       
   252 // Knowledge object prop array Group 5
       
   253 const TUint16 KMTPKnowledgeObjectPropertiesGroup5[] =
       
   254 	{
       
   255 	EMTPGenObjPropCodeName
       
   256 	};
       
   257 
       
   258 // Knowledge object prop array Group 1
       
   259 const TUint16 KMTPKnowledgeObjectPropertiesGroup1[] =
       
   260 	{
       
   261 	EMTPGenObjPropCodeNonConsumable
       
   262 	};
       
   263 
       
   264 //---------------------------------------------------------------
       
   265 
       
   266 #endif // __MTPSVCDPCONST_H__
       
   267