videofeeds/livetvutils/inc/CIptvEpgChannel.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 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:    Class to provide channel data to*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CIPTVEPGCHANNEL_H__
       
    21 #define __CIPTVEPGCHANNEL_H__
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <fbs.h>
       
    26 
       
    27 #include "IptvLiveEpgConstants.h"
       
    28 
       
    29 /**
       
    30 *	"Carrier" class to contain data for single channel occurence in EPG xml
       
    31 *	file. This class is used to communicate data from xml content handler
       
    32 *	to EPG manager to be stored to the database.
       
    33 */
       
    34 class CIptvEpgChannel : public CBase
       
    35 	{
       
    36 	public:
       
    37 	/**
       
    38 	*	Symbian two phase constructor
       
    39 	*	@param	None
       
    40 	*	@return	Created instance of CIptvEpgChannel
       
    41 	*/
       
    42 	IMPORT_C static CIptvEpgChannel* NewL();
       
    43 	
       
    44 	/**
       
    45 	*	Destructor
       
    46 	*/
       
    47 	virtual ~CIptvEpgChannel();
       
    48 	
       
    49 	public: // New functions
       
    50 	/** 
       
    51 	* LinearOrderByOrderNum. Static function to compare two channel objects
       
    52 	* based on their iOrder member variable. If first and second channels
       
    53 	* both have iOrder == KMaxTUint32 (deactivated) then they are compared by their
       
    54 	* name.
       
    55 	* @param aFirst First channel object
       
    56 	* @param aSecond Second channel object
       
    57 	* @return Positive integer if first channel's order number is greater
       
    58 	* than second one', zero if order numbers are equal, negative value if
       
    59 	* first channel's order is less than second one's. If either channel's
       
    60     * iOrder is KMaxTUint32 or zero, the logic is inverse. If both orders are 
       
    61 	* deactivated (KMaxTUint32) then the comparison is made using channel name.
       
    62 	*/
       
    63 	static TInt LinearOrderByOrderNum( const CIptvEpgChannel& aFirst, 
       
    64 									   const CIptvEpgChannel& aSecond );
       
    65 
       
    66 	private:
       
    67 	/**
       
    68 	*	Default constructor
       
    69 	*/
       
    70 	CIptvEpgChannel();
       
    71 
       
    72 	/**
       
    73 	*	Symbian second phase constructor which might contain leaving code
       
    74 	*/	
       
    75 	void ConstructL();
       
    76 	
       
    77 	public:
       
    78 	// Setters
       
    79 	
       
    80 	IMPORT_C void SetChannelId( TInt64 aChannelId );
       
    81 	
       
    82 	IMPORT_C void SetServiceId( TUint32 aServiceId );
       
    83 	
       
    84 	IMPORT_C void SetChannelName( HBufC* aChannelName );
       
    85 	
       
    86 	IMPORT_C void SetChannelLogoPath( HBufC* aLogoPath );
       
    87 	
       
    88 	IMPORT_C void SetChannelDescription( HBufC* aDescription );
       
    89 	
       
    90 	IMPORT_C void SetChannelURI( HBufC* aURI );
       
    91 	
       
    92 	IMPORT_C void SetChannelSDP( HBufC* aSDP );
       
    93 	
       
    94 	IMPORT_C void SetChannelOrder( const TUint32 aOrder );
       
    95 
       
    96 	IMPORT_C void SetChannelIconL( const CFbsBitmap& aBitmap );
       
    97 	
       
    98 	// Getters
       
    99 	
       
   100 	IMPORT_C TUint32 ServiceId() const;
       
   101 	
       
   102 	IMPORT_C TInt64 ChannelId() const;
       
   103 	
       
   104 	IMPORT_C TDesC& ChannelName() const;
       
   105 	
       
   106 	IMPORT_C TDesC& ChannelLogoPath() const;
       
   107 	
       
   108 	IMPORT_C TDesC& ChannelDescription() const;
       
   109 	
       
   110 	IMPORT_C TDesC& ChannelURI() const;
       
   111 	
       
   112 	IMPORT_C TDesC& ChannelSDP() const;
       
   113 
       
   114 	IMPORT_C TUint32 ChannelOrder() const;
       
   115 	
       
   116 	IMPORT_C CFbsBitmap* ChannelIcon();
       
   117 
       
   118 	// Instance variables
       
   119 	private:
       
   120 	TUint32					iOrder;
       
   121 	
       
   122 	/** Id of the channel */
       
   123 	TInt64					iChannelId;
       
   124 	
       
   125 	/** Id of the service provider */
       
   126 	TUint32					iServiceProviderId;
       
   127 	
       
   128 	/** Descriptor containing channel's name */
       
   129 	HBufC* 					iChannelName;
       
   130 
       
   131 	/** Descriptor containing the logo path */
       
   132 	HBufC*					iLogoPath;
       
   133 	
       
   134 	/** Descriptor containing the channel description */
       
   135 	HBufC*					iDescription;
       
   136 	
       
   137 	/** Descriptor containing the URI of the channel */
       
   138 	HBufC*					iURI;
       
   139 	
       
   140 	/** Descriptor containing the SDP of the channel
       
   141 		Note, that this descriptor can be quite long */
       
   142 	HBufC*					iSDP;
       
   143 
       
   144 	/** Channel icon bitmap, set and used in the UI side */
       
   145 	CFbsBitmap*				iBitmap;
       
   146 	};
       
   147 
       
   148 #endif // __CIPTVEPGCHANNEL_H__
       
   149 
       
   150 // End of file