upnpharvester/common/cmlibrary/inc/cmmediaserver.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     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:      Capsulating Media server
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef __CMMEDIASERVER_H
       
    24 #define __CMMEDIASERVER_H
       
    25 
       
    26 // INCLUDES
       
    27 #include <e32base.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class RWriteStream;
       
    31 class RReadStream;
       
    32 
       
    33 /**
       
    34  *  CCmMediaServer class
       
    35  *    Capsulating media servers
       
    36  *  @lib cmcommon.lib
       
    37  *  @since S60 v3.0
       
    38  */
       
    39 class CCmMediaServer : public CBase
       
    40     {
       
    41 
       
    42 public:
       
    43 
       
    44     /* Constructors and destructor. */
       
    45 
       
    46     /**
       
    47      * Creates new CCmMediaServer class.
       
    48      * @param aUDN
       
    49      * @return  pointer to CCmMediaServer class
       
    50      */
       
    51     IMPORT_C static CCmMediaServer* NewL();
       
    52 
       
    53     /**
       
    54      * Creates new CCmMediaServer class and
       
    55      * leaves the instance in the cleanup stack.
       
    56      * @param aUDN
       
    57      * @return  pointer to CCmMediaServer class
       
    58      */
       
    59     IMPORT_C static CCmMediaServer* NewLC();
       
    60 
       
    61     /**
       
    62      * Destructor.
       
    63      */
       
    64     virtual ~CCmMediaServer();
       
    65 
       
    66 public:
       
    67 
       
    68     /**
       
    69      * MediaServer
       
    70      * @since Series 60 3.1
       
    71      * @param None
       
    72      * @return media servers udn
       
    73      */
       
    74     IMPORT_C const TDesC8& MediaServer() const;
       
    75 
       
    76     /**
       
    77      * SetUDNL
       
    78      * @since Series 60 3.1
       
    79      * @param aUDN, UDN of the media server
       
    80      * @return None
       
    81      */
       
    82     IMPORT_C void SetUDNL( const TDesC8& aUDN );
       
    83 
       
    84     /**
       
    85      * Media server's db id
       
    86      * @since Series 60 3.1
       
    87      * @param None
       
    88      * @return Server's db id
       
    89      */
       
    90     IMPORT_C TInt64 DbId() const;
       
    91 
       
    92     /**
       
    93      * SetDbId
       
    94      * @since Series 60 3.1
       
    95      * @param aDbId
       
    96      * @return None
       
    97      */
       
    98     IMPORT_C void SetDbId( const TInt64 aDbId );
       
    99 
       
   100     /**
       
   101      * SystemUpdateID
       
   102      * @since Series 60 3.1
       
   103      * @param None
       
   104      * @return systemupdateID
       
   105      */
       
   106     IMPORT_C TInt SystemUpdateID() const;
       
   107 
       
   108     /**
       
   109      * SetSystemUpdateID
       
   110      * @since Series 60 3.1
       
   111      * @param aSystemUpdateID
       
   112      * @return None
       
   113      */
       
   114     IMPORT_C void SetSystemUpdateID( const TInt aSystemUpdateID );
       
   115     
       
   116     /**
       
   117     * Externalizes container information to stream.
       
   118     * Leaves in case of errors.
       
   119     * @since Series 60 3.1
       
   120     * @param reference to RWriteStream
       
   121     * @return none
       
   122     */
       
   123     void ExternalizeL( RWriteStream& aStream ) const;
       
   124 
       
   125     /**
       
   126     * Internalizes container information from stream.
       
   127     * Leaves in case of errors.
       
   128     * @since Series 60 3.1
       
   129     * @param reference to RReadStream
       
   130     * @return none
       
   131     */
       
   132     void InternalizeL( RReadStream& aStream );
       
   133 
       
   134 protected:
       
   135 
       
   136     /**
       
   137      * Constructor.
       
   138      */
       
   139     CCmMediaServer();
       
   140 
       
   141     /**
       
   142      * Second-phase constructor.
       
   143      */
       
   144     void ConstructL();
       
   145 
       
   146 
       
   147 protected: // data
       
   148 
       
   149     /** UDN */
       
   150     HBufC8* iUDN; // owned
       
   151 
       
   152     /** Database id */
       
   153     TInt64 iDbId;
       
   154 
       
   155     /** SystemUpdateID */
       
   156     TInt iSystemUpdateID;
       
   157 
       
   158     };
       
   159 
       
   160 #endif //  __CMMEDIASERVER_H