fotaapplication/inc/FotaIPCTypes.h
branchRCL_3
changeset 25 b183ec05bd8c
equal deleted inserted replaced
24:13d7c31c74e0 25:b183ec05bd8c
       
     1 /*
       
     2 * Copyright (c) 2005-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: Implementation of fotaserver component
       
    15 * 	This is part of fotaapplication.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __FOTAIPCTYPES_H_
       
    22 #define __FOTAIPCTYPES_H_
       
    23 
       
    24 // INCLUDES 
       
    25 #include <e32std.h>
       
    26 #include <SyncMLDef.h>
       
    27 #include "fotaengine.h"
       
    28 
       
    29 // DATA TYPES
       
    30 typedef TBuf16<200> TPkgIdList;
       
    31 
       
    32 /**
       
    33  *  Inter process parameters for fotaserver
       
    34  *
       
    35  *  @lib    fotaengine.lib
       
    36  *  @since  S60 v3.1
       
    37  */
       
    38 class TDownloadIPCParams
       
    39     {
       
    40 
       
    41 public:
       
    42     TDownloadIPCParams (); 
       
    43 
       
    44 
       
    45     /**
       
    46      * Copy constructor.
       
    47      *
       
    48      * @since   S60 v3.1
       
    49      * @param   p Copy of another ipc
       
    50      * @return  None
       
    51     */
       
    52     TDownloadIPCParams (const TDownloadIPCParams& p ); 
       
    53 
       
    54 
       
    55     /**
       
    56      * Package id
       
    57      */
       
    58     TInt                            iPkgId;
       
    59     
       
    60     /**
       
    61      * Profile id
       
    62      */
       
    63     TSmlProfileId                   iProfileId;
       
    64 
       
    65     
       
    66     /**
       
    67      * Package name
       
    68      */
       
    69     TBuf8<KFotaMaxPkgNameLength>    iPkgName;
       
    70 
       
    71     
       
    72     /**
       
    73      * Package version
       
    74      */
       
    75     TBuf8<KFotaMaxPkgVersionLength> iPkgVersion;
       
    76 
       
    77 
       
    78     /**
       
    79      * Should DM server be notified via generic alert.
       
    80      * This is not saved to database!
       
    81      */
       
    82     TBool iSendAlert;
       
    83 
       
    84 
       
    85     /**
       
    86      * IAP Id used
       
    87      */
       
    88     TInt iIapId;
       
    89 
       
    90     /**
       
    91      * Total size of the package
       
    92      */
       
    93     TUint iPkgSize;
       
    94 
       
    95 
       
    96     /**
       
    97      * DM Session type
       
    98      */
       
    99     TInt iSessionType;
       
   100 
       
   101 
       
   102     /**
       
   103      * Should update happen later?
       
   104      */
       
   105     TBool iUpdateLtr;
       
   106     };
       
   107 
       
   108 
       
   109 /**
       
   110  *  Extended inter process parameters for fotaserver
       
   111  *
       
   112  *  @lib    fotaengine.lib
       
   113  *  @since  S60 v3.1
       
   114  */
       
   115 class TPackageState : public TDownloadIPCParams
       
   116     {
       
   117 
       
   118 public:
       
   119 
       
   120 
       
   121     /**
       
   122      * Constructor
       
   123      *
       
   124      * @since   S60 v3.1
       
   125      * @param   aState  State
       
   126      * @param   aResult Result
       
   127      * @return  None
       
   128     */
       
   129     TPackageState( RFotaEngineSession::TState aState, TInt aResult);
       
   130     
       
   131 
       
   132     /**
       
   133      * Constructor
       
   134      *
       
   135      * @since   S60 v3.1
       
   136      * @param   aState  State
       
   137      * @return  None
       
   138     */
       
   139     TPackageState( RFotaEngineSession::TState aState);
       
   140 
       
   141 
       
   142     /**
       
   143      * Constructor
       
   144      *
       
   145      * @since   S60 v3.1
       
   146      * @param   p  Ipc params
       
   147      * @return  None
       
   148     */
       
   149     TPackageState( TDownloadIPCParams p);
       
   150 
       
   151     TPackageState();
       
   152 
       
   153     /**
       
   154      * Assignment operator
       
   155      *
       
   156      * @since   S60 v3.1
       
   157      * @param   a  Source 
       
   158      * @return  None
       
   159     */
       
   160     TPackageState& operator=(const TDownloadIPCParams& a);
       
   161 
       
   162 
       
   163     /**
       
   164      * Assignment operator
       
   165      *
       
   166      * @since   S60 v3.1
       
   167      * @param   a  Source 
       
   168      * @return  None
       
   169     */
       
   170     TPackageState& operator=(const TPackageState& a);
       
   171 
       
   172 
       
   173 public:
       
   174 
       
   175     /**
       
   176      * State (see FUMO specification)
       
   177      */
       
   178     RFotaEngineSession::TState  iState;
       
   179 
       
   180 
       
   181     /**
       
   182      * Result code (FUMO)
       
   183      */
       
   184     TInt iResult;
       
   185 
       
   186     /**
       
   187      * Counter for generic alert raporting. If raporting fails, try again in
       
   188      * successive boots until counter runs to 0
       
   189      */
       
   190     TInt iSmlTryCount;
       
   191 
       
   192 private :
       
   193 	/*
       
   194 	* Method to set the iSmlTryCount depending on Cenrep settings
       
   195 	*/
       
   196 	void SetSmlTryCount();
       
   197 };
       
   198 
       
   199 
       
   200 
       
   201 /**
       
   202  *  Update reminder task
       
   203  *
       
   204  *  @lib    fotaengine.lib
       
   205  *  @since  S60 v3.1
       
   206  */
       
   207 class TFotaScheduledUpdate
       
   208 {
       
   209     public:
       
   210     TFotaScheduledUpdate(const TInt aPkgId, const TInt aScheduleId)
       
   211         {
       
   212         iPkgId      = aPkgId;
       
   213         iScheduleId = aScheduleId;
       
   214         }
       
   215 
       
   216     TInt                            iPkgId;
       
   217 
       
   218     TInt                            iScheduleId;
       
   219 };
       
   220 
       
   221 #endif      // __FOTAIPCTYPES_H_   
       
   222             
       
   223 // End of File