upnpavcontroller/upnpavcontrollerserver/src/upnpavactioninfo.cpp
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     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 "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:      UpnpAvAction info
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 // INCLUDE FILES
       
    24 
       
    25 #include "upnpavactioninfo.h"
       
    26 
       
    27 // CONSTANTS
       
    28 _LIT( KComponentLogfile, "upnpavcontrollerserver.txt");
       
    29 #include "upnplog.h"
       
    30 
       
    31 // ============================ MEMBER FUNCTIONS ============================
       
    32 
       
    33 // --------------------------------------------------------------------------
       
    34 // CUPnPAVActionInfo::CUPnPAVActionInfo
       
    35 // C++ default constructor can NOT contain any code, that
       
    36 // might leave.
       
    37 // --------------------------------------------------------------------------
       
    38 //
       
    39 CUPnPAVActionInfo::CUPnPAVActionInfo()
       
    40     {    
       
    41     }
       
    42 
       
    43 // --------------------------------------------------------------------------
       
    44 // CUPnPAVActionInfo::ConstructL
       
    45 // Symbian 2nd phase constructor can leave.
       
    46 // --------------------------------------------------------------------------
       
    47 void CUPnPAVActionInfo::ConstructL()
       
    48     {                           
       
    49     }
       
    50 
       
    51 // --------------------------------------------------------------------------
       
    52 // CUPnPAVActionInfo::NewL
       
    53 // Two-phased constructor.
       
    54 // --------------------------------------------------------------------------
       
    55 CUPnPAVActionInfo* CUPnPAVActionInfo::NewL()
       
    56     {
       
    57     CUPnPAVActionInfo* self = NewLC();
       
    58     CleanupStack::Pop( self );
       
    59     return self;
       
    60     }
       
    61 
       
    62 // --------------------------------------------------------------------------
       
    63 // CUPnPAVActionInfo::NewLC
       
    64 // Two-phased constructor.
       
    65 // --------------------------------------------------------------------------
       
    66 CUPnPAVActionInfo* CUPnPAVActionInfo::NewLC()
       
    67     {
       
    68     CUPnPAVActionInfo* self = new( ELeave )
       
    69         CUPnPAVActionInfo;   
       
    70     CleanupStack::PushL( self );
       
    71     self->ConstructL();
       
    72     return self;
       
    73     }
       
    74 
       
    75     
       
    76 // --------------------------------------------------------------------------
       
    77 // Destructor
       
    78 // --------------------------------------------------------------------------
       
    79 CUPnPAVActionInfo::~CUPnPAVActionInfo()
       
    80     {
       
    81     delete iUuid;            
       
    82     }
       
    83 
       
    84 // --------------------------------------------------------------------------
       
    85 // CUPnPAVActionInfo::SetSessionId
       
    86 // See upnpavcationinfo.h
       
    87 // --------------------------------------------------------------------------
       
    88 void CUPnPAVActionInfo::SetSessionId( TInt aSessionId )
       
    89     {
       
    90     iSessionId = aSessionId;
       
    91     }
       
    92 
       
    93 // --------------------------------------------------------------------------
       
    94 // CUPnPAVActionInfo::SessionId
       
    95 // See upnpavcationinfo.h
       
    96 // --------------------------------------------------------------------------
       
    97 TInt CUPnPAVActionInfo::SessionId() const
       
    98     {
       
    99     return iSessionId;
       
   100     }
       
   101 
       
   102 // --------------------------------------------------------------------------
       
   103 // CUPnPAVActionInfo::SetObserver
       
   104 // See upnpavcationinfo.h
       
   105 // --------------------------------------------------------------------------
       
   106 void CUPnPAVActionInfo::SetObserver( MUpnpAVControlPointObserver& aObserver )
       
   107     {
       
   108     iObserver = &aObserver;
       
   109     }
       
   110 
       
   111 // --------------------------------------------------------------------------
       
   112 // CUPnPAVActionInfo::Observer
       
   113 // See upnpavcationinfo.h
       
   114 // --------------------------------------------------------------------------
       
   115 MUpnpAVControlPointObserver& CUPnPAVActionInfo::Observer() const
       
   116     {
       
   117     
       
   118     __ASSERTD( iObserver, __FILE__, __LINE__ );
       
   119     return *iObserver;
       
   120     }
       
   121 
       
   122 // --------------------------------------------------------------------------
       
   123 // CUPnPAVActionInfo::SetUuidL
       
   124 // See upnpavcationinfo.h
       
   125 // --------------------------------------------------------------------------
       
   126 void CUPnPAVActionInfo::SetUuidL( const TDesC8& aUuid )
       
   127     {
       
   128     HBufC8* tempBuf = aUuid.AllocL();
       
   129     delete iUuid;
       
   130     iUuid = tempBuf;
       
   131     }
       
   132 
       
   133 // --------------------------------------------------------------------------
       
   134 // CUPnPAVActionInfo::Uuid
       
   135 // See upnpavcationinfo.h
       
   136 // --------------------------------------------------------------------------
       
   137 const TDesC8& CUPnPAVActionInfo::Uuid() const
       
   138     {
       
   139     if( iUuid )
       
   140         {
       
   141         return *iUuid;
       
   142         }
       
   143     else
       
   144         {
       
   145         return KNullDesC8;
       
   146         }    
       
   147     }
       
   148     
       
   149 // End of File
       
   150