videofeeds/utils/inc/CIptvMediaContent.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2004-2008 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 the License "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:    Utilities to handle media content.*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CIPTVMEDIACONTENT_H
       
    21 #define CIPTVMEDIACONTENT_H
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <s32strm.h>
       
    25 #include "CIptvUtil.h"
       
    26 #include "IptvDebug.h"
       
    27 
       
    28 const TInt KIptvMediumMaxLength = 10;
       
    29 
       
    30 /**
       
    31  * Utility class for handling media content.
       
    32  *
       
    33  * @lib IptvUtil.lib
       
    34  * @since Video Center 2.0
       
    35  */
       
    36 class CIptvMediaContent : public CBase
       
    37     {
       
    38     public:
       
    39 
       
    40         /**
       
    41          * Two-phased constructor.
       
    42          * @param 
       
    43          */
       
    44         IMPORT_C static CIptvMediaContent* NewL();
       
    45 
       
    46         /**
       
    47          * Destructor.
       
    48          */
       
    49         virtual ~CIptvMediaContent();
       
    50 
       
    51         /**
       
    52          * Print
       
    53          */
       
    54         IMPORT_C void PrintL();
       
    55 
       
    56         /**
       
    57          * Externalize.
       
    58          */
       
    59         IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
       
    60 
       
    61         /**
       
    62          * Internalize.
       
    63          */
       
    64         IMPORT_C void InternalizeL( RReadStream& aStream );
       
    65 
       
    66         /**
       
    67          * Count externalized size.
       
    68          */
       
    69         IMPORT_C TUint32 CountExternalizeSize();
       
    70 
       
    71         /**
       
    72          * Set media URL.
       
    73          */
       
    74         IMPORT_C void SetMediaContentUrlL( const TDesC& aBrowserUrl );
       
    75 
       
    76         /**
       
    77          * Get media URL.
       
    78          */
       
    79         IMPORT_C TPtrC GetMediaContentUrl() const;
       
    80                                 
       
    81     private: // New functions
       
    82 
       
    83         /**
       
    84          * C++ default constructor.
       
    85          */
       
    86         CIptvMediaContent();
       
    87 
       
    88     public: // Data members
       
    89 
       
    90         /**
       
    91          * Expression types
       
    92          */ 
       
    93         enum TExpression
       
    94             {
       
    95             EFull = 0,
       
    96             ESample,
       
    97             ENonStop
       
    98             };
       
    99 
       
   100         /**
       
   101          * Content key (same as content id)
       
   102          */
       
   103         TUint32 iContentKey;
       
   104 
       
   105         /**
       
   106          * Index (This index identifies content access objects which
       
   107          * belong to some content defined by iContentKey)
       
   108          */
       
   109         TUint32 iIndex;
       
   110 
       
   111         /**
       
   112          * Download type.
       
   113          */
       
   114         TUint32 iDownloadType;
       
   115 
       
   116         /**
       
   117          * File id (Part of global file id (1/2)
       
   118          */
       
   119         TUint32 iFileId;
       
   120 
       
   121         /**
       
   122          * Drive id (Part of global file id (2/2) 
       
   123          */
       
   124         TUint32 iDriveId;
       
   125       
       
   126         /**
       
   127          * File size (MRSS)
       
   128          */ 
       
   129         TUint32 iFileSize; 
       
   130 
       
   131         /**
       
   132          * Mime-type (MRSS)
       
   133          */
       
   134         TBuf<KIptvCAMimeTypeLength> iMimeType;   
       
   135 
       
   136         /**
       
   137          * Medium (MRSS) (Not used in client side)
       
   138          * Medium is the type of object
       
   139          * (image | audio | video | document | executable).
       
   140          * While this attribute can at times seem redundant if type is supplied,
       
   141          * it is included because it simplifies decision making on the reader
       
   142          * side, as well as flushes out any ambiguities between MIME type and 
       
   143          * object type. It is an optional attribute.
       
   144          */
       
   145         TBuf<KIptvMediumMaxLength> iMedium;
       
   146 
       
   147         /**
       
   148          * Is default. (MRSS) (Not used in client side)
       
   149          * isDefault determines if this is the default object that should be
       
   150          * used for the <media:group>. There should only be one default object
       
   151          * per <media:group>. It is an optional attribute.
       
   152          */
       
   153         TBool iIsDefault;
       
   154 
       
   155         /**
       
   156          * Expression. (MRSS)
       
   157          * Expression determines if the object is a sample or the full version
       
   158          * of the object, or even if it is a continuous stream
       
   159          * (sample | full | nonstop). Default value is 'full'.
       
   160          * It is an optional attribute
       
   161          */
       
   162         TUint32 iExpression;
       
   163 
       
   164         /**
       
   165          * Bitrate. (MRSS) (Not used in client side)
       
   166          * Bitrate is the kilobits per second rate of media.
       
   167          * It is an optional attribute
       
   168          */
       
   169         TUint32 iBitrate;
       
   170 
       
   171         /**
       
   172          * Framerate. (MRSS) (Not used in client side)
       
   173          * Framerate is the number of frames per second for the media object.
       
   174          * It is an optional attribute
       
   175          */
       
   176         TUint32 iFramerate;
       
   177 
       
   178         /**
       
   179          * Samplingrate (MRSS) (Not used in client side)
       
   180          * Samplingrate is the number of samples per second taken to create
       
   181          * the media object. It is expressed in thousands of samples
       
   182          * per second (kHz). It is an optional attribute.
       
   183          */
       
   184         TUint32 iSamplingrate;
       
   185 
       
   186         /**
       
   187          * Duration. (MRSS)
       
   188          * Duration is the number of seconds the media object plays.
       
   189          * It is an optional attribute.
       
   190          */
       
   191         TUint32 iDuration;  
       
   192 
       
   193         /**
       
   194          * Height. (MRSS) (Not used in client side)
       
   195          * Height is the height of the media object. It is an optional attribute.
       
   196          */
       
   197         TUint32 iHeight;
       
   198 
       
   199         /**
       
   200          * Width. (MRSS) (Not used in client side)
       
   201          * Width is the width of the media object. It is an optional attribute.
       
   202          */
       
   203         TUint32 iWidth;
       
   204 
       
   205         /**
       
   206          * Language. (MRSS)
       
   207          * Lang is the primary language encapsulated in the media object.
       
   208          * Language codes possible are detailed in 
       
   209          * RFC 3066. This attribute is used similar to the xml:lang attribute
       
   210          * detailed in the XML 1.0 Specification (Third Edition).
       
   211          * It is an optional attribute.
       
   212          */
       
   213         TBuf<KIptvCALanguageLength> iLanguage;
       
   214 
       
   215         /**
       
   216          * Last viewing position of this video.
       
   217          */
       
   218         TUint32 iLastPosition;
       
   219 
       
   220     private:        
       
   221 
       
   222         /**        
       
   223          * Content URL (MRSS)
       
   224          * Own.
       
   225          */
       
   226         HBufC* iMediaContentUrl;
       
   227         
       
   228     };
       
   229 
       
   230 #endif // CIPTVMEDIACONTENT_H