ncdengine/engine/inc/catalogsconstants.h
branchRCL_3
changeset 22 0817e13c927e
parent 19 7ca52d38f8c3
child 23 09e5ea190d07
equal deleted inserted replaced
19:7ca52d38f8c3 22:0817e13c927e
     1 /*
       
     2 * Copyright (c) 2006 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:   Constants and definitions.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CATALOGS_CONSTANTS_H
       
    20 #define CATALOGS_CONSTANTS_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <e32msgqueue.h>
       
    24 
       
    25 #include "catalogsuids.h"
       
    26 
       
    27 // Replaced with USE_BUILD_SCRIPT when using build script
       
    28 #define DUMMY_DEFINE
       
    29 
       
    30 
       
    31 /**
       
    32  * Catalogs engine mutex name. All engine object instances have a handle to the mutex.
       
    33  * This can be used to determine if there are engine objects in use.
       
    34  */
       
    35 #ifdef USE_BUILD_SCRIPT
       
    36 _LIT( KCatalogsEngineMutex, "ncd-engine-mutex_APP_NAME_POSTFIX" );
       
    37 #else
       
    38 _LIT( KCatalogsEngineMutex, "ncd-engine-mutex_20019119" ); 
       
    39 #endif // USE_BUILD_SCRIPT
       
    40 
       
    41 /**
       
    42  * Note on RProperty usage.
       
    43  * RProperty is defined by category and key.
       
    44  * 
       
    45  * The engine server side process defines RProperty that is defined
       
    46  * to have category value equal to SID of the process.
       
    47  * Two kinds of info are published using RProperty. 
       
    48  * - general settings (currently only maintenance lock status)
       
    49  * - client specific connection activity indicator
       
    50  * 
       
    51  * Connection activity uses RProperty with key that is same as client SID.
       
    52  * Because both information are published within the same category, we must ensure
       
    53  * that there are no conflicts in key values. To ensure this, following assumptions
       
    54  * about keys are used:
       
    55  * - all settings values (such as maintenance lock) must be from protected UID
       
    56  * range class 0 (0x00000000 - 0x0FFFFFFF)
       
    57  * - all engine clients must use UIDs from class 2 (0x20000000 - 0x2FFFFFFF)
       
    58  */
       
    59 
       
    60 /** Catalogs engine property category */
       
    61 const TUid KCatalogsEnginePropertyCategory = { KCatalogsServerUid };
       
    62 
       
    63 /** 
       
    64  * Catalogs engine maintenance lock property key. Written when locking/releasing
       
    65  * (0 = released).
       
    66  */
       
    67 const TUint KCatalogsEnginePropertyKeyMaintenanceLock = 1;
       
    68 
       
    69 /**
       
    70  * Catalogs update message queue name format string. Global message queue with this
       
    71  * name is created 
       
    72  */
       
    73 _LIT( KCatalogsUpdateQueueNameFormat, "CatalogsUpdate-%08x" );
       
    74 
       
    75 /** Catalogs OTA update message queue message size */
       
    76 const TInt KCatalogsUpdateQueueMessageSize = RMsgQueueBase::KMaxLength;
       
    77 const TInt KCatalogsUpdateQueueSlotCount = 32;
       
    78 
       
    79 /** Catalogs engine ECom implementation uid */
       
    80 const TUid KCCatalogsEngineImplUid = { KCatalogsEngineImplementationUid };
       
    81 
       
    82 /** Catalogs OTA update information maximum field sizes */
       
    83 const TInt KCatalogsUpdateInformationMaxSize = 3*1024;
       
    84 const TInt KCatalogsUpdateTargetMaxSize = 256;
       
    85 const TInt KCatalogsUpdateIdMaxSize = 1024;
       
    86 const TInt KCatalogsUpdateVersionMaxSize = 256;
       
    87 const TInt KCatalogsUpdateUriMaxSize = 1024;
       
    88 
       
    89 
       
    90 /**
       
    91  * Mime type match strings. 
       
    92  */
       
    93 
       
    94 _LIT( KMimeTypeMatchSymbianInstall,   "application/vnd.symbian.install" );
       
    95 _LIT( KMimeTypeMatch1JavaApplication, "*java?archive" );
       
    96 _LIT( KMimeTypeMatch2JavaApplication, "application/java-archive" );
       
    97 _LIT( KMimeTypeMatchRealMedia,        "application/vnd.rn-realmedia" );
       
    98 _LIT( KMimeTypeMatchApplicationStream,"application/octet-stream" );
       
    99 _LIT( KMimeTypeMatchApplication,      "application/*" );
       
   100 
       
   101 _LIT( KMimeTypeMatchSis,  "x-epoc/x-app268436505" );
       
   102 _LIT( KMimeTypeMatchSisx, "x-epoc/x-sisx-app" );
       
   103 
       
   104 
       
   105 _LIT( KMimeTypeMatchHtml, "text/html" );
       
   106 _LIT( KMimeTypeMatchTxt,  "text/plain" );
       
   107 _LIT( KMimeTypeMatchCod,  "text/x-co-desc" );
       
   108 _LIT8( KMimeTypeXml, "text/xml" );
       
   109 
       
   110 _LIT( KMimeTypeMatchDrmMessage,     "application/vnd.oma.drm.message" );
       
   111 _LIT( KMimeTypeMatchDrmRightsXml,   "application/vnd.oma.drm.rights+xml" );
       
   112 _LIT( KMimeTypeMatchDrmRightsWbxml, "application/vnd.oma.drm.rights+wbxml" );
       
   113 _LIT8( KMimeTypeMatchDrmRightsXml8,   "application/vnd.oma.drm.rights+xml" );
       
   114 _LIT8( KMimeTypeMatchDrmRightsWbxml8, "application/vnd.oma.drm.rights+wbxml" );
       
   115 _LIT( KMimeTypeMatchDrmContent,     "application/vnd.oma.drm.content" );
       
   116 _LIT8( KMimeTypeMatchDrm8,            "application/vnd.oma.drm.*" );
       
   117 
       
   118 _LIT( KMimeTypeMatchOdd, "application/vnd.oma.dd*" );
       
   119 _LIT8( KMimeTypeMatchOdd8, "application/vnd.oma.dd*" );
       
   120 
       
   121 _LIT( KMimeTypeMatchWidget, "application/x-nokia-widget" );
       
   122 
       
   123 _LIT( KHttpMatchString, "http://*" );
       
   124 
       
   125 // Descriptor types
       
   126 _LIT( KDescriptorTypeOdd, "dd" );
       
   127 _LIT( KDescriptorTypeJad, "jad" );
       
   128 
       
   129 _LIT( KMimeTypeMatchJad, "text/vnd.sun.j2me.app-descriptor" );
       
   130 _LIT8( KMimeTypeMatchJad8, "text/vnd.sun.j2me.app-descriptor" );
       
   131 
       
   132 _LIT( KDirectorySeparator, "\\" );
       
   133 
       
   134 // List granularity used in initializing various lists and arrays.
       
   135 const TInt KListGranularity( 8 );
       
   136 
       
   137 // CBufFlat expansion size, should not be very small for good 
       
   138 // performance.
       
   139 const TInt KBufExpandSize( 256 );
       
   140 
       
   141 // Granularity for CCatalogsStringManager's string arrays
       
   142 const TInt KStringArrayGranularity( 256 );
       
   143 
       
   144 
       
   145 // Query id for payment method query.
       
   146 _LIT( KQueryIdPaymentMethod, "deadbeef" );
       
   147 
       
   148 
       
   149 // Engine configuration file
       
   150 _LIT( KCatalogsConfigFile, "config.xml" );
       
   151 
       
   152 // Download manager root dir
       
   153 _LIT( KCatalogsDownloadMgrPath, "C:\\system\\dmgr\\%S\\downloads\\*.*" );
       
   154 
       
   155 // Number of attempts before we give up on connecting to download manager
       
   156 const TInt KCatalogsDlMgrConnectRetryAttempts = 5;
       
   157 
       
   158 // tenth of a second, the time between download manager connect attemps
       
   159 const TInt KCatalogsDlMgrConnectRetryInterval = 100000; 
       
   160 
       
   161 #endif // CATALOGS_CONSTANTS_H