upnpharvester/common/cmlibrary/inc/cmmediaserverfull.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 __CMMEDIASERVERFULL_H
       
    24 #define __CMMEDIASERVERFULL_H
       
    25 
       
    26 #include <e32base.h>
       
    27 #include "cmmediaserver.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class RWriteStream;
       
    31 class RReadStream;
       
    32 
       
    33 /**
       
    34  *  CCmMediaServerFull class
       
    35  *    Capsulating media servers
       
    36  *  @lib cmcommon.lib
       
    37  *  @since S60 v3.0
       
    38  */
       
    39 class CCmMediaServerFull : public CCmMediaServer
       
    40     {
       
    41 
       
    42 public:
       
    43 
       
    44     /* Constructors and destructor. */
       
    45 
       
    46     /**
       
    47      * Creates new CCmMediaServerFull class.
       
    48      * @param None
       
    49      * @return  pointer to CCmMediaServerFull class
       
    50      */
       
    51     IMPORT_C static CCmMediaServerFull* NewL();
       
    52 
       
    53     /**
       
    54      * Creates new CCmMediaServerFull class and
       
    55      * leaves the instance in the cleanup stack.
       
    56      * @param None
       
    57      * @return  pointer to CCmMediaServerFull class
       
    58      */
       
    59     IMPORT_C static CCmMediaServerFull* NewLC();
       
    60 
       
    61     /**
       
    62      * Destructor.
       
    63      */
       
    64     IMPORT_C virtual ~CCmMediaServerFull();
       
    65 
       
    66 public:
       
    67 
       
    68     /**
       
    69      * SetUDNL
       
    70      * @since Series 60 3.1
       
    71      * @return name
       
    72      */
       
    73     IMPORT_C TPtrC8 MediaServerName() const;
       
    74 
       
    75     /**
       
    76      * SetMediaServerNameL
       
    77      * @since Series 60 3.1
       
    78      * @param aName
       
    79      * @return None
       
    80      */
       
    81     IMPORT_C void SetMediaServerNameL( const TDesC8& aName );
       
    82 
       
    83     /**
       
    84      * VisibleDate
       
    85      * @since Series 60 3.1
       
    86      * @param None
       
    87      * @return visible date
       
    88      */
       
    89     IMPORT_C TTime VisibleDate() const;
       
    90 
       
    91     /**
       
    92      * SetVisibleDate
       
    93      * @since Series 60 3.1
       
    94      * @param Time
       
    95      * @return None
       
    96      */
       
    97     IMPORT_C void SetVisibleDate( TTime aTime );
       
    98 
       
    99     /**
       
   100      * IsActive
       
   101      * @since Series 60 3.1
       
   102      * @param None
       
   103      * @return Is active flag
       
   104      */
       
   105     IMPORT_C TUint8 IsActive() const;
       
   106 
       
   107     /**
       
   108      * SetIsActive
       
   109      * @since Series 60 3.1
       
   110      * @param aIsActive
       
   111      * @return None
       
   112      */
       
   113      IMPORT_C void SetIsActive( TUint8 aIsActive );
       
   114 
       
   115     /**
       
   116      * Gets copy capability information
       
   117      * @since Series 60 3.1
       
   118      * @return TBool, ETrue if copy capable, EFalse otherwise
       
   119      */
       
   120      IMPORT_C TBool CopyCapability() const;
       
   121 
       
   122     /**
       
   123      * Sets copy capability information
       
   124      * @since Series 60 3.1
       
   125      * @param aCopyCapable
       
   126      * @return None
       
   127      */
       
   128      IMPORT_C void SetCopyCapability( TBool aCopyCapability );
       
   129 
       
   130     /**
       
   131      * Sets server store usage status
       
   132      * @since Series60 3.2
       
   133      * @param aUsed, status value
       
   134      */
       
   135     IMPORT_C void SetStoreUsage(
       
   136                     TBool aUsed );
       
   137 
       
   138     /**
       
   139      * Gets server store usage status
       
   140      * @since Series60 3.2
       
   141      * @return TBool, usage status value
       
   142      */
       
   143     IMPORT_C TBool StoreUsage();
       
   144 
       
   145     /**
       
   146      * Sets server fill usage status
       
   147      * @since Series60 3.2
       
   148      * @param aUsed, status value
       
   149      */
       
   150     IMPORT_C void SetFillUsage(
       
   151                     TBool aUsed );
       
   152 
       
   153     /**
       
   154      * Gets server fill usage status
       
   155      * @since Series60 3.2
       
   156      * @return TBool, usage status value
       
   157      */
       
   158     IMPORT_C TBool FillUsage();
       
   159 
       
   160     /**
       
   161     * Externalizes media server information to stream.
       
   162     * Leaves in case of errors.
       
   163     * @since Series 60 3.1
       
   164     * @param reference to RWriteStream
       
   165     * @return none
       
   166     */
       
   167     IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
       
   168 
       
   169     /**
       
   170     * Internalizes media server information from stream.
       
   171     * Leaves in case of errors.
       
   172     * @since Series 60 3.1
       
   173     * @param reference to RReadStream
       
   174     * @return none
       
   175     */
       
   176     IMPORT_C void InternalizeL( RReadStream& aStream );
       
   177 
       
   178 
       
   179 private:
       
   180 
       
   181 
       
   182 private: // data
       
   183 
       
   184     /** Name */
       
   185     HBufC8* iName; // owned
       
   186 
       
   187     /** Visible date */
       
   188     TTime iVisibleDate;
       
   189 
       
   190     /** Is active flag */
       
   191     TUint8 iIsActive;
       
   192 
       
   193     /** Copy capability flag **/
       
   194     TBool iCopyCapability;
       
   195     
       
   196     /** Fill usage **/
       
   197     TBool iFillServer;
       
   198     
       
   199     /** Store usage **/
       
   200     TBool iStoreServer;
       
   201 
       
   202     };
       
   203 
       
   204 #endif //  __CMMEDIASERVERFULL_H