internetradio2.0/ircommon/inc/irotaupdate.h
changeset 14 896e9dbc5f19
equal deleted inserted replaced
12:608f67c22514 14:896e9dbc5f19
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef IROTAUPDATE_H
       
    19 #define IROTAUPDATE_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 class RReadStream;
       
    24 class RWriteStream;
       
    25 
       
    26 /**
       
    27  * This class provides the basic structure to hold the OTA information.
       
    28  * information that come from the isds server is parsed and put into this structure
       
    29  * It also provides the basic setter functions to 
       
    30  * manage the OTA information.
       
    31  * @code
       
    32  * CIROTAUpdate* ota = CIROTAUpdate::NewL()
       
    33  * ota->SetXXX();
       
    34  * delete ota;
       
    35  * @endcode
       
    36  *   
       
    37  */
       
    38 
       
    39 class CIROTAUpdate : public CBase
       
    40     {
       
    41     
       
    42     public:
       
    43     
       
    44     /**
       
    45      * Function : NewL
       
    46      * Function returns an instance of CIROTAUpdate
       
    47      * Two phase constructor
       
    48      * @return instance of CIROTAUpdate
       
    49      */
       
    50     IMPORT_C static CIROTAUpdate* NewLC();
       
    51     
       
    52     /**
       
    53      * CIROTAUpdate::NewLC()
       
    54      * Static function
       
    55      * standard two phased constructor
       
    56      * @return *CIROTAUpdate
       
    57      */
       
    58     IMPORT_C static CIROTAUpdate* NewL();
       
    59     
       
    60     /**
       
    61      * CIROTAUpdate::ConstructL()
       
    62      * standard second phase constructor
       
    63      */
       
    64     IMPORT_C void ConstructL();
       
    65     
       
    66     /**
       
    67      * CIROTAUpdate::~CIROTAUpdate()
       
    68      * standard C++ destructor
       
    69      */
       
    70     ~CIROTAUpdate();
       
    71     
       
    72     public:
       
    73     
       
    74     /**
       
    75      * CIROTAUpdate::SetUpdateMethod()
       
    76      * Function to set update method
       
    77      * @param TDesC
       
    78      */
       
    79     IMPORT_C void SetUpdateMethod( const TDesC& aUpdateMethod );
       
    80     
       
    81     /**
       
    82      * CIROTAUpdate::SetVersion()
       
    83      * Function to set version
       
    84      * @param TDesC
       
    85      */
       
    86     IMPORT_C void SetVersion( const TDesC& aVersion );
       
    87     
       
    88     /**
       
    89      * CIROTAUpdate::SetUpdateInterval()
       
    90      * Function to set update interval
       
    91      * @param TDesC
       
    92      */
       
    93     IMPORT_C void SetUpdateInterval( const TDesC& aUpdateInterval );
       
    94     
       
    95     /**
       
    96      * CIROTAUpdate::SetOTAUrl()
       
    97      * Function to set OTA Url
       
    98      * @param TDesC
       
    99      */
       
   100     IMPORT_C void SetOTAUrl( const TDesC& aOTAUrl );
       
   101     
       
   102     /**
       
   103      * CIROTAUpdate::ExternalizeL()
       
   104      * externalizes the data
       
   105      * @param RWriteStream
       
   106      */
       
   107     IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
       
   108     
       
   109     /**
       
   110      * CIROTAUpdate::InternalizeL()
       
   111      * internalizes the data
       
   112      * @param RWriteStream
       
   113      */
       
   114     IMPORT_C void InternalizeL( RReadStream& aStream );
       
   115     
       
   116     public:
       
   117     // native or browser    
       
   118     HBufC* iUpdateMethod;
       
   119     // version no
       
   120     HBufC* iVersion; 
       
   121     // url where the newer version can be found
       
   122     HBufC* iOTAUrl;
       
   123     // silence period
       
   124     TInt iUpdateInterval;
       
   125    };
       
   126    
       
   127 #endif// IROTAUPDATE_H
       
   128