upnpharvester/common/cmlibrary/inc/cmcommon.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /*
       
     2 * Copyright (c) 2005 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:      Common Client/Server header for Content Manager
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef CMCOMMON_H
       
    24 #define CMCOMMON_H
       
    25 
       
    26 _LIT(KCmServerExe,"cmserver.exe"); ///<EXE name
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // Server name
       
    31 _LIT(KCmServerName,"CmServer");
       
    32 
       
    33 // Panic name
       
    34 _LIT(KCmServerPanic, "CmServerPanic");
       
    35 
       
    36 /// A version must be specified when creating a session with the server
       
    37 const TUint KCmServerMajor = 1;
       
    38 const TUint KCmServerMinor = 0;
       
    39 const TUint KCmServerBuild = 0;
       
    40 
       
    41 const TUid KCmPropertyCat = {0x10012345};
       
    42 const TInt KCmProperty = 1;
       
    43 
       
    44 const TInt64 KCmMmcLowMemory = 10*KMega;
       
    45 
       
    46 // Wlan scan intervals [s]
       
    47 const TInt KWlanScanNetworkNever = 0;
       
    48 const TInt KWlanScanNetworkInterval60 = 60;
       
    49 
       
    50 // Cds namespace
       
    51 _LIT(KCdsNamespace, "http://www.nokia.com/namespaces/metadata/cdssync/");
       
    52 
       
    53 /**  State information for the Content Manager */
       
    54 enum TCmServerState
       
    55     {
       
    56     ECmServerStateDisabled = 0,
       
    57     ECmServerStateIdle = 1,
       
    58     ECmServerStateStoring = 2,
       
    59     ECmServerStateFilling = 3,
       
    60     ECmServerStateHarvesting = 4,
       
    61     ECmServerStateGettingStoreFields = 6,
       
    62     ECmServerStateGettingFillFields = 7,
       
    63     ECmServerStatePreProcessingStore = 8,
       
    64     ECmServerStatePreProcessingFill = 9,
       
    65     ECmServerStateSearchingForServers = 12,
       
    66     ECmServerStateDeleting = 13,
       
    67     ECmServerStatePreProcessingFilllist = 14,
       
    68     ECmServerStateUpdatingFillLists = 15,
       
    69     ECmServerStateDeletingMetadata = 16
       
    70     };
       
    71 
       
    72 /**  Content Manager services */
       
    73 enum TCmService
       
    74     {
       
    75     // main service which must be enabled for anything to work
       
    76     // Note: executable service identifiers equal state identifiers
       
    77     ECmServiceNone = 0,
       
    78     ECmServiceContentManager = 1,
       
    79     ECmServiceStore = 2,
       
    80     ECmServiceFill = 3,
       
    81     ECmServiceHarvest = 4,
       
    82     ECmServiceMemoryManager = 5,
       
    83     ECmServiceGetStoreFields = 6,
       
    84     ECmServiceGetFillFields = 7,
       
    85     ECmServicePreProcessingStore = 8,
       
    86     ECmServicePreProcessingFill = 9,
       
    87     ECmServiceTransferInfoFill = 10,
       
    88     ECmServiceTransferInfoStore = 11,
       
    89     ECmServiceSearchForServers = 12,
       
    90     ECmServiceDeleteFilledFiles = 13,
       
    91     ECmServicePreProcessingFilllist = 14,
       
    92     ECmServiceUpdateFillLists = 15,
       
    93     ECmServiceDeleteMetadata = 16,
       
    94     ECmServiceAutomStoreListProcess = 17
       
    95     };
       
    96 
       
    97 /**  Content Manager service states */
       
    98 enum TCmServiceState
       
    99     {
       
   100     ECmServiceStateDisabled = 0,
       
   101     ECmServiceStateAutomatic
       
   102     };
       
   103 
       
   104 /// opcodes used in message passing between client and server
       
   105 enum TCmRequest
       
   106     {
       
   107     ECmGetServerState = 1,
       
   108     ECmSetServiceState,
       
   109     ECmGetServiceState,
       
   110     ECmExecuteService,
       
   111     ECmSetFillRules,
       
   112     ECmGetFillRules,
       
   113     ECmGetFillRulesSize,
       
   114     ECmGetMediaserversSize,
       
   115     ECmSetMediaServers,
       
   116     ECmSetStoreRules,
       
   117     ECmGetStoreRulesSize,
       
   118     ECmGetFillItemsSize,
       
   119     ECmGetStoreItemsSize,
       
   120     ECmPreProcessFillList,
       
   121     ECmGetItemCount,
       
   122     ECmGetDataBuffer,
       
   123     ECmGetDataFields,
       
   124     ECmGetDataFieldSize,
       
   125     ECmCancel,
       
   126     ECmGetAppWizardState,
       
   127     ECmSetAppWizardState,
       
   128     ECmGetSyncTime,
       
   129     ECmSetFillFileStatuses,
       
   130     ECmGetTransferInfo,
       
   131     ECmUpdateFillLists,
       
   132     ECmDeleteMetadata,
       
   133     ECmDeleteDeletedMediaServers,
       
   134     ECmSetDrives,
       
   135     ECmGetDrivesSize,
       
   136     ECmGetDriveSelectionStatus,
       
   137     ECmApplicationExit,
       
   138     ECmGetFilledFilesSize
       
   139     };
       
   140 
       
   141 /// Panic enums
       
   142 enum TCmClientPanics
       
   143     {
       
   144     ECmClientNoSessionActive,
       
   145     ECmClientBadRequest
       
   146     };
       
   147 
       
   148 /// Panic enums
       
   149 enum TCmServerPanics
       
   150     {
       
   151     EDCmServerIllegalParameter
       
   152     };
       
   153 
       
   154 class TCmProgressInfo
       
   155     {
       
   156 public: // public member variables
       
   157     TCmService iService; // Service identifier
       
   158     TInt iTotalItems;    // Total count of items
       
   159     TInt iProcessedItems;// Processed items
       
   160     TInt iItemsToTransferPerService; // Remaining items per service
       
   161     };
       
   162 
       
   163 enum TCmListItemStatus
       
   164     {
       
   165     ECmToBeFilled = 1,
       
   166     ECmFilled = 2,
       
   167     ECmToBeRemoved = 4,
       
   168     ECmToBeShrinked = 8,
       
   169     ECmToBeSkipped = 16,
       
   170     ECmSkippedByUser = 32,
       
   171     ECmLocalCopy = 64,
       
   172     ECmStored = 128,
       
   173     ECmKeepOnDevice = 256
       
   174     };
       
   175 
       
   176 
       
   177 enum TCmShrinkResolution
       
   178     {
       
   179     ECmShrinkResScreenSize = 0
       
   180     };
       
   181 
       
   182 class TCmLowPriorityFilled
       
   183     {
       
   184 public: // public member variables
       
   185     HBufC* iFullPath; // Path of the filled file
       
   186     TUint32 iSize;    // Size of the filled file
       
   187     TInt64 iListId;   // Items fill list id
       
   188     };
       
   189 
       
   190 typedef TPckgC<TCmProgressInfo> TCmProgressInfoPckg;
       
   191 
       
   192 #endif
       
   193 // end of file