swinstdefs.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : SWInstDefs.h
00004 *  Part of     : SW Installer UIs / SWInstCli
00005 *  Interface   : Internal, SW Installer UI client
00006 *  Description : This file contains declarations of installer parameter classes.
00007 *  Version     :
00008 *
00009 *  Copyright © 2002-2004 Nokia. All rights reserved.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia. All rights are reserved. Copying, including 
00013 *  reproducing, storing, adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia.
00018 * ==============================================================================
00019 */
00020 
00021 #ifndef SWINSTDEFS_H
00022 #define SWINSTDEFS_H
00023 
00024 //  INCLUDES
00025 #include <e32std.h>
00026 #include <apmstd.h>
00027 #include <AknServerApp.h>
00028 
00029 namespace SwiUI
00030 {
00031 
00032 // Errors
00033 const TInt KSWInstErrUserCancel = -30471; // User cancelled the operation
00034 const TInt KSWInstErrFileCorrupted = -30472; // File is corrupted
00035 const TInt KSWInstErrInsufficientMemory = -30473; // Insufficient free memory in the drive to perform the operation
00036 const TInt KSWInstErrPackageNotSupported = -30474; // Installation of the package is not supported
00037 const TInt KSWInstErrSecurityFailure = -30475; // Package cannot be installed due to security error
00038 const TInt KSWInstErrMissingDependency = -30476; // Package cannot be installed due to missing dependency
00039 const TInt KSWInstErrFileInUse = -30477; // Mandatory file is in use and prevents the operation
00040 const TInt KSWInstErrGeneralError = -30478; // Unknown error
00041 const TInt KSWInstErrNoRights = -30479; // The package has no rights to perform the operation
00042 const TInt KSWInstErrNetworkFailure = -30480; // Indicates that network failure aborted the operation
00043 const TInt KSWInstErrBusy = -30481; // Installer is busy doing some other operation
00044 const TInt KSWInstErrAccessDenied = -30482;  // Target location of package is not accessible
00045 const TInt KSWInstUpgradeError = -30483;  // The package is an invalid upgrade
00046 
00047 // Handeled mime types
00048 
00049 _LIT8( KSisxMimeType, "x-epoc/x-sisx-app" );
00050 _LIT8( KSisMimeType, "application/vnd.symbian.install" );
00051 _LIT8( KPipMimeType, "application/x-pip" );
00052 _LIT8( KJadMIMEType, "text/vnd.sun.j2me.app-descriptor" );
00053 _LIT8( KJarMIMEType, "application/java-archive" );
00054 _LIT8( KJavaMIMEType, "application/java");
00055 _LIT8( KJarxMIMEType, "application/x-java-archive");
00056 
00057 const TInt KSWInstMaxUserNameLength = 32;
00058 const TInt KSWInstMaxPasswordLength = 32;
00059 
00065 enum TServerRequest
00066     {
00067     ERequestInstall = RApaAppServiceBase::KServiceCmdBase,
00068     ERequestInstallHandle,
00069     ERequestInstallParams,
00070     ERequestInstallParamsHandle,
00071     ERequestSilentInstall,
00072     ERequestSilentInstallHandle,
00073     ERequestSilentInstallParams,
00074     ERequestSilentInstallParamsHandle,
00075     ERequestUninstall,
00076     ERequestSilentUninstall,
00077     ERequestCancelRequest,
00078     ERequestCustomUninstall,
00079     ERequestSilentCustomUninstall
00080     };
00081 
00088 enum TPolicy
00089     {
00090     EPolicyAllowed,
00091     EPolicyNotAllowed,
00092     EPolicyUserConfirm
00093     };
00094 
00100 enum TOperation
00101     {
00102     EOperationUninstallIndex
00103     };
00104  
00110 class TInstallReq
00111     {
00112     public:
00113         
00117         inline TInstallReq();  
00118 
00119     public:  // Data
00120 
00121         TBuf8<KMaxDataTypeLength> iMIME;  // Mime type
00122         TUint iCharsetId;                 // Id of char set
00123         TFileName iSourceURL;             // Source URL / source dir
00124         TUint iIAP;                       // Access point
00125     };
00126 
00127 //A typedef'd packaged for passing TInstallReq objects.
00128 typedef TPckgBuf<TInstallReq> TInstallReqPckg;
00129 
00135 class TInstallOptions
00136     {
00137     public:   
00138 
00142         inline TInstallOptions();    
00143 
00144     public:  // Data
00145 
00149         TPolicy iUpgrade;   
00150         
00154         TPolicy iOptionalItems;
00155         
00159         TPolicy iOCSP;
00160         
00165         TPolicy iIgnoreOCSPWarnings;
00166         
00170          TPolicy iUntrusted;
00171         
00175         TPolicy iPackageInfo;
00176         
00180         TPolicy iCapabilities;
00181         
00185         TPolicy iKillApp;
00186         
00190         TPolicy iOverwrite;
00191         
00195         TPolicy iDownload;
00196         
00200         TBuf<KSWInstMaxUserNameLength> iLogin;
00201         
00205         TBuf<KSWInstMaxPasswordLength> iPassword;        
00206                 
00210         TChar iDrive;
00211         
00215         TLanguage iLang;
00216         
00220         TBool iUsePhoneLang;
00221 
00225         TPolicy iUpgradeData;        
00226     };
00227 
00228 //A typedef'd packaged for passing TInstallOptions objects.
00229 typedef TPckgBuf<TInstallOptions> TInstallOptionsPckg;
00230 
00236 class TUninstallOptions
00237     {
00238     public:
00239 
00243         inline TUninstallOptions();   
00244 
00245     public: //  Data
00246         
00247         TPolicy iKillApp;    
00248         TPolicy iBreakDependency;
00249     };
00250 
00251 //A typedef'd packaged for passing TUninstallOptions objects.
00252 typedef TPckgBuf<TUninstallOptions> TUninstallOptionsPckg;
00253 
00254 // In silent install this means "any drive"
00255 const TUint KUserConfirmDrive = '!';
00256 
00262 struct TOpUninstallIndexParam
00263     {
00264         TUid iUid;
00265         TInt iIndex;
00266     };
00267 //A typedef'd packaged for passing TOpUninstallIndexParam objects.
00268 typedef TPckgBuf<TOpUninstallIndexParam> TOpUninstallIndexParamPckg;
00269 
00270 #include <SWInstDefs.inl>
00271 
00272 }
00273 
00274 #endif // SWINSTDEFS_H

Copyright © Nokia Corporation 2001-2007