internetradio2.0/ircommon/inc/irchannelserverurl.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 IRCHANNELSERVERURL_H
       
    19 #define IRCHANNELSERVERURL_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 preset's url data
       
    28  * information that come from the isds server.
       
    29  * It also provides the basic getter and setter functions to 
       
    30  * manage the preset's url information.
       
    31  * for url selection for a particular bitrate some functionality 
       
    32  * has been provided
       
    33  * copy constructor and assignment operator has been provided to 
       
    34  * override the default ones 
       
    35  *
       
    36  * @code
       
    37  * CIRChannelServerUrl* presetUrl = CIRChannelServerUrl::NewL()
       
    38  * preset->SetXXX();
       
    39  * preset->GetXXX();
       
    40  * @endcode
       
    41  *   
       
    42  */
       
    43 class CIRChannelServerUrl:public CBase
       
    44     {
       
    45 public:
       
    46     
       
    47     /**
       
    48      * CIRChannelServerUrl::NewL()
       
    49      * Static function
       
    50      * standard two phased constructor
       
    51      * @return *CIRChannelServerUrl
       
    52      */
       
    53     IMPORT_C static CIRChannelServerUrl* NewL();
       
    54     
       
    55     /**
       
    56      * CIRChannelServerUrl::NewLC()
       
    57      * Static function
       
    58      * standard two phased constructor
       
    59      * @return *CIRChannelServerUrl
       
    60      */
       
    61     IMPORT_C static CIRChannelServerUrl* NewLC();
       
    62     
       
    63     /**
       
    64      * CIRChannelServerUrl::SetServerName()
       
    65      * sets server name 
       
    66      * @param TDesC
       
    67      */
       
    68     IMPORT_C void SetServerName( const TDesC& aServerName );
       
    69     
       
    70     /**
       
    71      * CIRChannelServerUrl::SetServerUrl()
       
    72      * sets server url 
       
    73      * @param TDesC
       
    74      */
       
    75     IMPORT_C void SetServerUrl( const TDesC& aServerUrl );
       
    76     
       
    77     /**
       
    78      * CIRChannelServerUrl::SetBitRate()
       
    79      * sets server bitrate 
       
    80      * @param TInt
       
    81      */
       
    82     IMPORT_C void SetBitRate( TInt aBitrate );
       
    83     
       
    84     /**
       
    85      * CIRChannelServerUrl::GetServerName()
       
    86      * gets server name 
       
    87      * @return TDesC
       
    88      */
       
    89     IMPORT_C const TDesC& GetServerName() const;
       
    90     
       
    91     /**
       
    92      * CIRChannelServerUrl::GetServerUrl()
       
    93      * gets server url 
       
    94      * @return TDesC
       
    95      */
       
    96     IMPORT_C const TDesC& GetServerUrl() const;
       
    97     
       
    98     /**
       
    99      * CIRChannelServerUrl::GetBitRate()
       
   100      * gets server bitrate
       
   101      * @return TInt
       
   102      */
       
   103     IMPORT_C TInt GetBitRate() const;
       
   104     
       
   105     /**
       
   106      * CIRChannelServerUrl::~CIRChannelServerUrl()
       
   107      * standard C++ destructor 
       
   108      */    
       
   109     ~CIRChannelServerUrl();
       
   110     
       
   111     /**
       
   112      * CIRChannelServerUrl::=()
       
   113      * standard C++ copy constructor(deep copy) 
       
   114      * @param CIRChannelServerUrl
       
   115      */    
       
   116     IMPORT_C CIRChannelServerUrl& operator=( const CIRChannelServerUrl& churl );
       
   117         
       
   118     /**
       
   119      * CIRChannelServerUrl::ExternalizeL()
       
   120      * function to externalize url data
       
   121      * @param CIRChannelServerUrl
       
   122      */
       
   123     IMPORT_C void ExternalizeL( RWriteStream& aWriteStream );    
       
   124     
       
   125     /**
       
   126      * CIRChannelServerUrl::InternalizeL()
       
   127      * function to internalize url data
       
   128      * @param CIRChannelServerUrl
       
   129      */
       
   130     IMPORT_C void InternalizeL( RReadStream& aReadStream );
       
   131 
       
   132 protected:
       
   133     /**
       
   134      * CIRChannelServerUrl::ConstructL()
       
   135      * standard second phase construction
       
   136      */    
       
   137     void ConstructL() const;
       
   138     
       
   139 public:
       
   140     //server name
       
   141     HBufC *iServerName;
       
   142     HBufC *iURL;
       
   143     //bit rate
       
   144     TInt iBitrate;
       
   145     };
       
   146     
       
   147 #endif //IRCHANNELSERVERURL_H
       
   148