applicationmanagement/inc/ApplicationManagementCommon.h
changeset 47 d316aecb87fd
equal deleted inserted replaced
46:b9b00b134b0d 47:d316aecb87fd
       
     1 /*
       
     2 * Copyright (c) 2000 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: Implementation of applicationmanagement components
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __APPLICATIONMANAGEMENTCOMMON_H__
       
    20 #define __APPLICATIONMANAGEMENTCOMMON_H__
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <uikon.hrh>
       
    24 #include "ApplicationManagementConst.h"
       
    25 
       
    26 namespace NApplicationManagement
       
    27 	{
       
    28 
       
    29 const TUint32  KAppMgmtServerUid         = {0x200267FB};
       
    30 
       
    31 const TUint32 KAMServiceUid = {0x1020781B};
       
    32 
       
    33 const TUid KProperty = {0x101F9A02};
       
    34 
       
    35 const TUint32 KInteger = 0x00000001;
       
    36 
       
    37 //const TUint32 KOmaDMAppUid = {0x200267FB};
       
    38 const TInt KVersionLength= 7; // 3 for Major, 1 for '.' and 3 for Minor
       
    39 _LIT( KLiteralPeriod, ".");
       
    40 
       
    41 const TInt KAMDefaultValue = 0;
       
    42 const TInt KAMSCMAdapter = 1;
       
    43 const TInt KAMSCOMOAdapter = 2;
       
    44 
       
    45 const int KDCIdMaxLength = 128 ;
       
    46 typedef TBuf8<KDCIdMaxLength> TDeploymentComponentId;
       
    47 
       
    48 const int KDeploymentComponentNameMaxLength = 128 ;
       
    49 typedef TBuf8<KDeploymentComponentNameMaxLength> TDeploymentComponentName;
       
    50 
       
    51 const int KDeploymentComponentVersionMaxLength = 32;
       
    52 typedef TBuf8<KDeploymentComponentVersionMaxLength> TDeploymentComponentVersion;
       
    53 
       
    54 const int KDeploymentComponentDescriptionMaxLength = 512;
       
    55 typedef TBuf8<KDeploymentComponentVersionMaxLength> TDeploymentComponentDescription;
       
    56 
       
    57 const int KDeploymentComponentPkgIdMaxLength = 256;
       
    58 typedef TBuf8<KDeploymentComponentPkgIdMaxLength> TDeploymentComponentPkgId;
       
    59 
       
    60 const int KDeploymentComponentPkgIdRefMaxLength = 256;
       
    61 typedef TBuf8<KDeploymentComponentPkgIdRefMaxLength> TDeploymentComponentPkgIdRef;
       
    62 
       
    63 const int KDeploymentComponentPkgTypeRefMaxLength = 256;
       
    64 typedef TBuf8<KDeploymentComponentPkgTypeRefMaxLength> TDeploymentComponentPkgType;
       
    65 
       
    66 typedef TBuf8<KDeploymentComponentNameMaxLength> TMidletnameName;
       
    67 
       
    68 typedef TBuf8<KDeploymentComponentNameMaxLength> TMidletVendorName;
       
    69 typedef TBuf8<KDeploymentComponentVersionMaxLength> TMidletVersion;
       
    70 
       
    71 typedef TBuf8<KDeploymentComponentNameMaxLength> TPreInstalledAppName;
       
    72 typedef TBuf8<KDeploymentComponentNameMaxLength> TPreInstalledAppVendorName;
       
    73 typedef TBuf8<KDeploymentComponentVersionMaxLength> TPreInstalledVersion;
       
    74 
       
    75 const int KDeploymentComponentURLMaxLength = 32;
       
    76 
       
    77 const int KMaxMimeLength = 256 ;
       
    78 typedef TBuf8<KMaxMimeLength> TMimeType;
       
    79 
       
    80 const int KMaxDCUserIdLength = 256;
       
    81 typedef TBuf8<KMaxDCUserIdLength> TDCUserId;
       
    82 
       
    83 enum TDeploymentComponentState
       
    84 	{
       
    85 	EDCSError = -1,
       
    86 	EDCSNone = 0,
       
    87 	EDCSDelivered = 1,
       
    88 	EDCSInactive = 2,
       
    89 	EDCSActive = 3,
       
    90 	EDCSDownload = 4,
       
    91 	EDCSDeployed =5,
       
    92 	EDCSDelete = 6
       
    93 	};
       
    94 	
       
    95 enum TDeplCompAttrType 
       
    96 	{
       
    97 	EDCNone = 0,
       
    98 	EDCId = 1,
       
    99 	EDCName = 2,
       
   100 	EDCVersion = 4,
       
   101 	EDCInstallOptions = 8,
       
   102 	EDCMetaData = 16,
       
   103 	EDCMetaDataMime = 24,
       
   104 	EDCData = 32,
       
   105 	EDCDataMime = 48,
       
   106 	EDCStatus = 64,
       
   107 	EDCDownloadURI = 128,
       
   108 	EDCStateValue = 256,
       
   109 	EDCConRef = 512,
       
   110 	EDCDescriptionRef = 1024,
       
   111 	EDCPkgID = 2048,
       
   112 	EDCPkgType = 4096
       
   113 	};
       
   114 
       
   115 enum TDownloadTarget
       
   116 	{
       
   117 	EDeliver,
       
   118 	EInstall,
       
   119 	EInstallAndActivate,
       
   120 	EUpdate,
       
   121 	EUpdateAndActivate
       
   122 	};
       
   123 enum TSCOMOStatusNodeStates
       
   124     {
       
   125     //Download Status Values
       
   126     EIdle = 10,
       
   127     EDownload_DownloadFailed = 20,
       
   128     EDownload_DownloadProgress = 30,
       
   129     EDownload_DownloadComplete = 40,
       
   130     EDownload_InstallProgress = 50,
       
   131     EDownload_InstalledFailedWithData = 60,
       
   132     EDownload_InstalledFailedWithOutData = 70,
       
   133     //Delivered Status Values
       
   134     EDelivered_RemoveFailed = 20,
       
   135     EDelivered_RemoveProgress = 30,
       
   136     EDelivered_InstallProgress = 40,
       
   137     EDelivered_InstalledFailedWithData = 50,
       
   138     EDelivered_InstallFailedwithOutData = 60,
       
   139     //Deployed Status Values
       
   140     EDeployed_RemoveFailed = 20,
       
   141     EDeployed_RemoveProgress = 30,
       
   142     EDeployed_ActivateFailed = 40,
       
   143     EDeployed_ActivateProgress = 50,
       
   144     EDeployed_DeactivateFailed = 60,
       
   145     EDeployed_DeactivateProgress = 70
       
   146     };
       
   147 /**
       
   148 *  CAMDeliveryDeploymentComponent class to represent delivery items
       
   149 */	
       
   150 
       
   151 struct TDeploymentComponent 
       
   152 	{
       
   153 	// Data
       
   154 	TDeploymentComponentId iId ;
       
   155 	TDeploymentComponentName iName;
       
   156 	TDeploymentComponentVersion iVersion ;
       
   157 	TDeploymentComponentDescription iDescription;
       
   158 	TDeploymentComponentPkgId iPkgID;
       
   159 	TDeploymentComponentPkgIdRef iPkgIDRef;
       
   160 	TDeploymentComponentPkgType iPkgType;
       
   161 	TDeploymentComponentState iState ;
       
   162 	TDeploymentComponentState iOldState ;
       
   163 	TDeploymentComponent() : iId( KNullDesC8() ),
       
   164 							 iName( KNullDesC8() ),
       
   165 							 iVersion( KNullDesC8() ),
       
   166 							 iDescription (KNullDesC8),
       
   167 							 iState( EDCSNone ),
       
   168 							 iOldState ( EDCSNone ) 
       
   169 							 
       
   170 	{
       
   171 	
       
   172 	}
       
   173 	TDeploymentComponent( const TDesC8 &aId, 
       
   174 						  const TDesC8 &aName, 
       
   175 						  const TDesC8 &aVersion, 
       
   176 						  TDeploymentComponentState aState )
       
   177 		: iId( aId ), 
       
   178 		iName( aName ), 
       
   179 		iVersion ( aVersion ), 
       
   180 		iState ( aState ), 
       
   181 		iOldState( EDCSNone )
       
   182 		{
       
   183 		} 
       
   184 	};
       
   185 
       
   186 struct TDeploymentComponentIPC
       
   187 	{
       
   188 	TDeploymentComponent iComponent;
       
   189 	TBuf8<256> iMimeType;
       
   190 	TDCUserId iUserId;
       
   191 	TDeploymentComponentIPC() : iComponent(),
       
   192 								iMimeType( KNullDesC8() ),
       
   193 								iUserId( KNullDesC8())
       
   194 								
       
   195 		{
       
   196 		
       
   197 		}
       
   198 	TDeploymentComponentIPC( const TDeploymentComponent &aComponent,
       
   199 		const TDesC8 &aMimeType,
       
   200 		const TDCUserId &aUserId) 
       
   201 			: iComponent( aComponent ), 
       
   202 				iMimeType( aMimeType ),
       
   203 				iUserId( aUserId )
       
   204 		{
       
   205 		
       
   206 		}
       
   207 	};
       
   208 	
       
   209 struct TDeplCompDataIPC
       
   210 	{
       
   211 	TUint32 iInternalId;
       
   212 	TDeplCompAttrType iAttrType;
       
   213 	TBuf8<256> iDataMime;
       
   214 	};	
       
   215 	
       
   216 	}
       
   217 #endif 
       
   218 
       
   219 //  End of File