videofeeds/clientapi/src/CIptvVodContentContentFullDetails.cpp
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2004-2005 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:    Defines data class structure for the API*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include <e32base.h>
       
    22 #include <s32strm.h>
       
    23 #include "IptvDebug.h"
       
    24 #include "CIptvVodContentContentFullDetails.h"
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // ============================ MEMBER FUNCTIONS ===============================
       
    29 
       
    30 // ---------------------------------------------------------
       
    31 // CIptvVodContentContentFullDetails::ConstructL
       
    32 // Symbian 2nd phase constructor can leave.
       
    33 // ---------------------------------------------------------
       
    34 //
       
    35 void CIptvVodContentContentFullDetails::ConstructL()
       
    36     {
       
    37     IPTVLOGSTRING_LOW_LEVEL("CIptvVodContentContentFullDetails::ConstructL");                  
       
    38 
       
    39     CIptvVodContentContentBriefDetails::ConstructL();    
       
    40     }
       
    41 
       
    42 // ---------------------------------------------------------
       
    43 // CIptvVodContentContentFullDetails::NewL
       
    44 // Two-phased constructor.
       
    45 // ---------------------------------------------------------
       
    46 //
       
    47 EXPORT_C CIptvVodContentContentFullDetails* CIptvVodContentContentFullDetails::NewL()
       
    48     {
       
    49     IPTVLOGSTRING_LOW_LEVEL("CIptvVodContentContentFullDetails::NewL");                  
       
    50 
       
    51     CIptvVodContentContentFullDetails* self = new(ELeave) CIptvVodContentContentFullDetails();
       
    52     CleanupStack::PushL(self);
       
    53 
       
    54     self->ConstructL(); 
       
    55 
       
    56     CleanupStack::Pop(self);
       
    57     return self;
       
    58     }
       
    59 
       
    60 // ---------------------------------------------------------
       
    61 // CIptvVodContentContentFullDetails::~CIptvVodContentContentFullDetails
       
    62 // Destructor
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 CIptvVodContentContentFullDetails::~CIptvVodContentContentFullDetails()    
       
    66     {    
       
    67     IPTVLOGSTRING_LOW_LEVEL("CIptvVodContentContentFullDetails::~CIptvVodContentContentFullDetails");                  
       
    68     }
       
    69 
       
    70 // ---------------------------------------------------------
       
    71 // CIptvVodContentContentFullDetails::CIptvVodContentContentFullDetails
       
    72 // C++ default constructor
       
    73 // ---------------------------------------------------------
       
    74 //
       
    75 CIptvVodContentContentFullDetails::CIptvVodContentContentFullDetails()    
       
    76     {
       
    77     IPTVLOGSTRING_LOW_LEVEL("CIptvVodContentContentFullDetails::CIptvVodContentContentFullDetails");                              
       
    78     }
       
    79     
       
    80 // ---------------------------------------------------------
       
    81 // Externalize
       
    82 // 
       
    83 // ---------------------------------------------------------
       
    84 //
       
    85 EXPORT_C void CIptvVodContentContentFullDetails::ExternalizeL(RWriteStream& aStream) const
       
    86     {
       
    87     IPTVLOGSTRING_LOW_LEVEL("CIptvVodContentContentFullDetails::ExternalizeL");                              
       
    88 
       
    89     CIptvVodContentContentBriefDetails::ExternalizeL(aStream);
       
    90         
       
    91     // Content description string.
       
    92     CIptvUtil::WriteDesToStreamL(iDescription, aStream);
       
    93            
       
    94     //  DRM placeholder.
       
    95     aStream.WriteInt32L(iContentProtection);
       
    96 
       
    97     // Author
       
    98     CIptvUtil::WriteDesToStreamL(iAuthor, aStream);
       
    99 
       
   100     // Copyright
       
   101     CIptvUtil::WriteDesToStreamL(iCopyright, aStream);
       
   102     }
       
   103 
       
   104 // ---------------------------------------------------------
       
   105 // Internalize
       
   106 // 
       
   107 // ---------------------------------------------------------
       
   108 //
       
   109 EXPORT_C void CIptvVodContentContentFullDetails::InternalizeL(RReadStream& aStream)
       
   110     {
       
   111     IPTVLOGSTRING_LOW_LEVEL("CIptvVodContentContentFullDetails::InternalizeL");                              
       
   112 
       
   113     CIptvVodContentContentBriefDetails::InternalizeL(aStream);
       
   114                 
       
   115     // Content description string.
       
   116     CIptvUtil::ReadDesFromStreamL(iDescription, aStream);
       
   117                     
       
   118     //  DRM placeholder.
       
   119     iContentProtection = aStream.ReadInt32L();                        
       
   120 
       
   121     // Author
       
   122     CIptvUtil::ReadDesFromStreamL(iAuthor, aStream);
       
   123 
       
   124     // Copyright
       
   125     CIptvUtil::ReadDesFromStreamL(iCopyright, aStream);
       
   126     }
       
   127 
       
   128 // ---------------------------------------------------------
       
   129 // Count externalized size
       
   130 // 
       
   131 // ---------------------------------------------------------
       
   132 //
       
   133 EXPORT_C TUint32 CIptvVodContentContentFullDetails::CountExternalizeSize()
       
   134     {
       
   135     IPTVLOGSTRING_LOW_LEVEL("CIptvVodContentContentFullDetails::CountExternalizeSize");                              
       
   136 
       
   137     TUint32 size = 0;
       
   138 
       
   139     size = CIptvVodContentContentBriefDetails::CountExternalizeSize() +
       
   140     
       
   141     // Content description string.
       
   142     2 + (iDescription.Length() * 2) +
       
   143         
       
   144     //  DRM placeholder.
       
   145     4 +
       
   146 
       
   147     // Author
       
   148     2 + (iAuthor.Length() * 2) +
       
   149 
       
   150     // Copyright
       
   151     2 + (iCopyright.Length() * 2);
       
   152             
       
   153     return size;
       
   154     }
       
   155 
       
   156 // End of file.