videofeeds/clientapi/src/CIptvMyVideosGlobalFileId.cpp
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2006 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 <f32file.h>
       
    24 #include "CIptvMyVideosGlobalFileId.h"
       
    25 
       
    26 // CONSTANTS
       
    27 const TInt KTUint32SizeInBytes = 4;
       
    28 
       
    29 // ============================ MEMBER FUNCTIONS ===============================
       
    30 
       
    31 // ---------------------------------------------------------
       
    32 // CIptvMyVideosGlobalFileId::CIptvMyVideosGlobalFileId
       
    33 // ---------------------------------------------------------
       
    34 //
       
    35 CIptvMyVideosGlobalFileId::CIptvMyVideosGlobalFileId()
       
    36  :  iDrive((TDriveNumber)0),
       
    37     iFileId(0)    
       
    38     {
       
    39     }
       
    40 
       
    41 // ---------------------------------------------------------
       
    42 // CIptvMyVideosGlobalFileId::ConstructL
       
    43 // ---------------------------------------------------------
       
    44 //
       
    45 void CIptvMyVideosGlobalFileId::ConstructL()
       
    46     {    
       
    47     }
       
    48 
       
    49 // ---------------------------------------------------------
       
    50 // CIptvMyVideosGlobalFileId::NewL
       
    51 // ---------------------------------------------------------
       
    52 //
       
    53 EXPORT_C CIptvMyVideosGlobalFileId* CIptvMyVideosGlobalFileId::NewL()
       
    54     {
       
    55     CIptvMyVideosGlobalFileId* self = CIptvMyVideosGlobalFileId::NewLC();
       
    56     CleanupStack::Pop(self);
       
    57     return self;
       
    58     }
       
    59 
       
    60 // ---------------------------------------------------------
       
    61 // CIptvMyVideosGlobalFileId::NewLC
       
    62 // ---------------------------------------------------------
       
    63 //
       
    64 EXPORT_C CIptvMyVideosGlobalFileId* CIptvMyVideosGlobalFileId::NewLC()
       
    65     {
       
    66     CIptvMyVideosGlobalFileId* self = new(ELeave) CIptvMyVideosGlobalFileId();
       
    67     CleanupStack::PushL(self);
       
    68     self->ConstructL();
       
    69     return self;
       
    70     }
       
    71 
       
    72 // ---------------------------------------------------------
       
    73 // CIptvMyVideosGlobalFileId::~CIptvMyVideosGlobalFileId
       
    74 // ---------------------------------------------------------
       
    75 //
       
    76 CIptvMyVideosGlobalFileId::~CIptvMyVideosGlobalFileId()
       
    77     {    
       
    78     }
       
    79 
       
    80 // ---------------------------------------------------------
       
    81 // CIptvMyVideosGlobalFileId::ExternalizeL
       
    82 // ---------------------------------------------------------
       
    83 //
       
    84 EXPORT_C void CIptvMyVideosGlobalFileId::ExternalizeL(RWriteStream& aStream)
       
    85     {
       
    86     // See TDriveNumber, EDriveC and EDriveE allowed.
       
    87     aStream.WriteInt32L(iDrive);
       
    88 
       
    89     // Drive specific file ID identifier.
       
    90     aStream.WriteUint32L(iFileId);
       
    91     }
       
    92 
       
    93 // ---------------------------------------------------------
       
    94 // CIptvMyVideosGlobalFileId::InternalizeL
       
    95 // ---------------------------------------------------------
       
    96 //
       
    97 EXPORT_C void CIptvMyVideosGlobalFileId::InternalizeL(RReadStream& aStream)
       
    98     {
       
    99     // See TDriveNumber, EDriveC and EDriveE allowed.
       
   100     iDrive = aStream.ReadInt32L();
       
   101 
       
   102     // Drive specific file ID identifier.
       
   103     iFileId = aStream.ReadUint32L();
       
   104     }
       
   105 
       
   106 // ---------------------------------------------------------
       
   107 // CountExternalizeSize
       
   108 // ---------------------------------------------------------
       
   109 //
       
   110 EXPORT_C TUint32 CIptvMyVideosGlobalFileId::CountExternalizeSize()
       
   111     {
       
   112     TUint32 size = 0;
       
   113 
       
   114     // See TDriveNumber, EDriveC and EDriveE allowed.
       
   115     size = KTUint32SizeInBytes +
       
   116     
       
   117     // Drive specific file ID identifier.
       
   118     KTUint32SizeInBytes;
       
   119 
       
   120     return size;    
       
   121     }
       
   122     
       
   123 // End of file.