servicediscoveryandcontrol/pnp/test/upnp/upnpdescription/inc/cpnpdeviceparam.h
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __CPNPDEVICEPARAM_H_
       
    17 #define __CPNPDEVICEPARAM_H_
       
    18 
       
    19 #include <e32cmn.h>
       
    20 #include <e32base.h>
       
    21 #include "cupnpproperty.h"
       
    22 
       
    23 class CUPnPServiceInfo;
       
    24 class CUPnPIconInfo;
       
    25 class CUPnPDevice;
       
    26 
       
    27 /** 
       
    28 Container for device object. 
       
    29 
       
    30 @publishedPartner
       
    31 @prototype */
       
    32 
       
    33 class CUPnPDeviceDescription: public CUPnPProperty
       
    34 	{
       
    35 public:
       
    36 
       
    37 	IMPORT_C static CUPnPDeviceDescription* NewL();
       
    38 	IMPORT_C ~CUPnPDeviceDescription();
       
    39 
       
    40     inline void SetDeviceObjectL( CUPnPDevice *aValue);
       
    41     inline  CUPnPDevice* DeviceObject() const;
       
    42 
       
    43     inline void SetMinorNumberL(const TInt aValue);
       
    44     inline const TInt MinorNumber () const;
       
    45 
       
    46     inline void SetMajorNumberL(const TInt aValue);
       
    47     inline const TInt MajorNumber () const;
       
    48 	TBool Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) const;
       
    49 
       
    50 private :
       
    51 
       
    52 	CUPnPDeviceDescription();
       
    53 	void ConstructL();
       
    54 
       
    55 private :
       
    56 	TVersion 		iVersion;
       
    57 	CUPnPDevice	*iDeviceObj;
       
    58 
       
    59 	};
       
    60 
       
    61 
       
    62 /** 
       
    63 Describes a device object.
       
    64 Can contain embedded device, service and icon info
       
    65 
       
    66 @publishedPartner
       
    67 @prototype */
       
    68 
       
    69 class CUPnPDevice: public CUPnPProperty
       
    70 	{
       
    71 
       
    72 public:
       
    73 	IMPORT_C static CUPnPDevice* NewL();
       
    74 	IMPORT_C ~CUPnPDevice();
       
    75 
       
    76     inline void AppendToEmbeddedDeviceInfoTableL(const CUPnPDevice* aValue);
       
    77     inline TInt CountOfEmbeddedDeviceInfoTable () const;
       
    78     inline CUPnPDevice* AtEmbeddedDeviceInfoTable(const TInt aIndex) const;
       
    79     inline void DeleteEmbeddedDeviceInfoAtIndexL(const TInt aIndex);
       
    80 
       
    81     inline void AppendToServiceInfoTableL(const CUPnPServiceInfo* aValue);
       
    82     inline TInt CountOfServiceInfoTable () const;
       
    83     inline CUPnPServiceInfo* AtServiceInfoTable(const TInt aIndex) const;
       
    84     inline void DeleteServiceInfoAtIndexL(const TInt aIndex);
       
    85 
       
    86     inline void AppendToIconInfoTableL(const CUPnPIconInfo* aValue);
       
    87     inline TInt CountOfIconInfoTable () const;
       
    88     inline CUPnPIconInfo* AtIconInfoTable(const TInt aIndex) const;
       
    89     inline void SetDlna( TBool aValue);
       
    90     inline TBool Dlna() const ;
       
    91 	TBool Validate(const RStringPool& aStringPool, const TStringTable& aStringTable );
       
    92 private :
       
    93 
       
    94 	CUPnPDevice();
       
    95 	void ConstructL();
       
    96 
       
    97 private :
       
    98 	TBool iHasDlnaTag;
       
    99 	RPointerArray<CUPnPDevice>			iEmbeddedDeviceInfo;
       
   100 	RPointerArray<CUPnPServiceInfo> 		iServiceInfo;
       
   101 	RPointerArray<CUPnPIconInfo> 			iIconInfo;
       
   102 	};
       
   103 
       
   104 
       
   105 /** 
       
   106 Following structure store service information.
       
   107 
       
   108 @publishedPartner
       
   109 @prototype */
       
   110 class CUPnPServiceInfo: public CUPnPProperty
       
   111 	{
       
   112 
       
   113 public:
       
   114 	IMPORT_C static CUPnPServiceInfo* NewL();
       
   115 	IMPORT_C ~CUPnPServiceInfo();
       
   116 	TBool Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) ;
       
   117 
       
   118 private :
       
   119 
       
   120 	CUPnPServiceInfo();
       
   121 	void ConstructL();
       
   122 
       
   123 private:
       
   124 	};
       
   125 
       
   126 /** 
       
   127 
       
   128 CUPnPIconInfo stores icon information.
       
   129 
       
   130 @publishedPartner
       
   131 @prototype */	
       
   132 	
       
   133 class CUPnPIconInfo: public CUPnPProperty
       
   134 	{
       
   135 
       
   136 public:
       
   137 	IMPORT_C static CUPnPIconInfo* NewL();
       
   138 	IMPORT_C ~CUPnPIconInfo();
       
   139 
       
   140 	TBool Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) ;
       
   141 private :
       
   142 
       
   143 	CUPnPIconInfo();
       
   144 	void ConstructL();
       
   145 	};
       
   146 
       
   147 #include "cpnpdeviceparam.inl"
       
   148 #endif /*CPNPDEVICEPARAM_H_*/