iaupdate/IAD/engine/controller/inc/iaupdateplatformdependency.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2009 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:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef IA_UPDATE_PLATFORM_DEPENDENCY_H
       
    21 #define IA_UPDATE_PLATFORM_DEPENDENCY_H
       
    22 
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 #include "iaupdateversion.h"
       
    27 
       
    28 
       
    29 /**
       
    30  * CIAUpdatePlatformDependency contains and provides
       
    31  * platform specific dependency information.
       
    32  *
       
    33  * @since S60 v3.2
       
    34  */
       
    35 class CIAUpdatePlatformDependency : public CBase
       
    36     {
       
    37     
       
    38 public:
       
    39 
       
    40     /**
       
    41      * @return CIAUpdatePlatformDependency* Created object.
       
    42      *
       
    43      * @since S60 v3.2
       
    44      */
       
    45     static CIAUpdatePlatformDependency* NewL();
       
    46 
       
    47     /**
       
    48      * @see CIAUpdatePlatformDependency::NewL
       
    49      *
       
    50      * @since S60 v3.2
       
    51      */
       
    52     static CIAUpdatePlatformDependency* NewLC();
       
    53 
       
    54 
       
    55     /**
       
    56      * Destructor
       
    57      *
       
    58      * @since S60 v3.2
       
    59      */
       
    60     virtual ~CIAUpdatePlatformDependency();
       
    61     
       
    62 
       
    63     /**
       
    64      * Checks if the dependency platform information specifies
       
    65      * an acceptable s60 platform. Also, check if the platform version
       
    66      * is acceptable.
       
    67      *
       
    68      * @return TBool ETrue if platform information is acceptable. 
       
    69      * EFalse if platform information is not acceptable.
       
    70      * @exception Leaves with system wide error code.
       
    71      *
       
    72      * @since S60 v3.2
       
    73      */
       
    74     TBool AcceptablePlatformL() const;
       
    75 
       
    76     /**
       
    77      * Sets the platform information.
       
    78      *
       
    79      * @param aPlatform The platform information.
       
    80      *
       
    81      * @since S60 v3.2
       
    82      */
       
    83     void SetPlatformL( const TDesC8& aPlatform );
       
    84     
       
    85 
       
    86     /**
       
    87      * @return const TIAUpdateVersion& Version floor of the platform
       
    88      * dependency.
       
    89      *
       
    90      * @since S60 v3.2
       
    91      */
       
    92     const TIAUpdateVersion& VersionFloor() const;
       
    93 
       
    94     /**
       
    95      * @param aVersion Version floor of the platform
       
    96      * dependency.
       
    97      *
       
    98      * @since S60 v3.2
       
    99      */
       
   100     void SetVersionFloor( const TVersion& aVersion );
       
   101     
       
   102     
       
   103     /**
       
   104      * return const TIAUpdateVersion& Version roof of the platform
       
   105      * dependency.
       
   106      *
       
   107      * @since S60 v3.2
       
   108      */
       
   109     const TIAUpdateVersion& VersionRoof() const;
       
   110 
       
   111     /**
       
   112      * @param aVersion Version roof of the platform
       
   113      * dependency.
       
   114      *
       
   115      * @since S60 v3.2
       
   116      */
       
   117     void SetVersionRoof( const TVersion& aVersion );
       
   118         
       
   119 
       
   120     /**
       
   121      * Resets the dependency information to the default values.
       
   122      *
       
   123      * @since S60 v3.2
       
   124      */
       
   125     void Reset();
       
   126     
       
   127     
       
   128 protected:
       
   129 
       
   130     /**
       
   131      * Constructor
       
   132      *
       
   133      * @since S60 v3.2
       
   134      */
       
   135     CIAUpdatePlatformDependency();
       
   136     
       
   137     /**
       
   138      * 2nd. phase constructor.
       
   139      *
       
   140      * @since S60 v3.2
       
   141      */
       
   142     virtual void ConstructL();
       
   143     
       
   144 
       
   145 private:
       
   146 
       
   147     // Prevent these if not implemented.
       
   148     CIAUpdatePlatformDependency( const CIAUpdatePlatformDependency& aObject );
       
   149     CIAUpdatePlatformDependency& operator =( const CIAUpdatePlatformDependency& aObject );
       
   150     
       
   151 
       
   152 private: // data
       
   153 
       
   154     TIAUpdateVersion iVersionFloor;
       
   155     TIAUpdateVersion iVersionRoof;    
       
   156 
       
   157     HBufC8* iPlatform;
       
   158     
       
   159     };
       
   160     
       
   161 #endif // IA_UPDATE_PLATFORM_DEPENDENCY_H