epoc32/include/mw/playerinformationtarget.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    12 //
    12 //
    13 // Description:
    13 // Description:
    14 //
    14 //
    15 
       
    16 
       
    17 
    15 
    18 /**
    16 /**
    19  @file
    17  @file
    20  @publishedAll
    18  @publishedAll
    21  @released
    19  @released
    33 #include <remcon/avrcpspec.h>
    31 #include <remcon/avrcpspec.h>
    34 #include <playerinformationtargetobserver.h>
    32 #include <playerinformationtargetobserver.h>
    35 
    33 
    36 class CRemConInterfaceSelector;
    34 class CRemConInterfaceSelector;
    37 class CPlayerApplicationSettings;
    35 class CPlayerApplicationSettings;
       
    36 class TEventsMask;
    38 
    37 
    39 // This is the maximum length of the player application setting attribute and value strings
    38 // This is the maximum length of the player application setting attribute and value strings
    40 const TInt KMaxPlayerApplicationSettingsValue = 255 ;
    39 const TInt KMaxPlayerApplicationSettingsValue = 255 ;
    41 // This is the minimum length of the player application setting attribute and value strings
    40 // This is the minimum length of the player application setting attribute and value strings
    42 const TInt KMinPlayerApplicationSettingsValue = 1 ;
    41 const TInt KMinPlayerApplicationSettingsValue = 1 ;
   114 	// Notifier Events bearer processing  
   113 	// Notifier Events bearer processing  
   115 	void ProcessGetPlayStatus();
   114 	void ProcessGetPlayStatus();
   116 	void ProcessGetStatusAndBeginObserving(TUint aOperationId, TRegisterNotificationEvent aEventId, const TDesC8& aData);
   115 	void ProcessGetStatusAndBeginObserving(TUint aOperationId, TRegisterNotificationEvent aEventId, const TDesC8& aData);
   117 	void ProcessGetStatus(TUint aOperationId, TRegisterNotificationEvent aEventId);
   116 	void ProcessGetStatus(TUint aOperationId, TRegisterNotificationEvent aEventId);
   118 	void SendNotificationResponse(TRegisterNotificationEvent aEventId, TRemConMessageSubType aMsgSubType);
   117 	void SendNotificationResponse(TRegisterNotificationEvent aEventId, TRemConMessageSubType aMsgSubType);
       
   118 	void ProcessGetPlayStatusUpdate(const TDesC8& aData);
   119 	
   119 	
   120 	// Capabilities API implementation from MPlayerCapabilitiesObserver
   120 	// Capabilities API implementation from MPlayerCapabilitiesObserver
   121 	void DoClearEvents();
   121 	void DoClearEvents();
   122 	TInt DoAddEvent(TRegisterNotificationEvent aEvent);
   122 	TInt DoAddEvent(TRegisterNotificationEvent aEvent);
   123 	TInt DoRemoveEvent(TRegisterNotificationEvent aEvent);
   123 	TInt DoRemoveEvent(TRegisterNotificationEvent aEvent);
   133 	TBool IsValidAttributeValue(TUint anAttributeId, TUint aAttributeValue);
   133 	TBool IsValidAttributeValue(TUint anAttributeId, TUint aAttributeValue);
   134 	TBool AttributeValueCanBeSet(TUint anAttributeId, TUint aAttributeValue);
   134 	TBool AttributeValueCanBeSet(TUint anAttributeId, TUint aAttributeValue);
   135 	void SendError(TInt, TInt);
   135 	void SendError(TInt, TInt);
   136 	void SendError(TInt, TInt, TRemConMessageSubType aSubType);
   136 	void SendError(TInt, TInt, TRemConMessageSubType aSubType);
   137 	CPlayerApplicationSettings* GetSetting(TUint anAttribute);
   137 	CPlayerApplicationSettings* GetSetting(TUint anAttribute);
   138 	
   138 	MPlayerEventsObserver::TTargetBatteryStatus DetectBatteryStatus();
       
   139 
   139 private: // owned
   140 private: // owned
   140 	RBuf8								iOutBuf;
   141 	RBuf8								iOutBuf;
   141 
   142 
   142 	MPlayerApplicationSettingsNotify& 	iApplicationSettingNotifier;
   143 	MPlayerApplicationSettingsNotify& 	iApplicationSettingNotifier;
   143 		
   144 		
   147 	TUint32 							iLengthInMilliseconds;
   148 	TUint32 							iLengthInMilliseconds;
   148 	TPlayPosition						iTrackPosition;
   149 	TPlayPosition						iTrackPosition;
   149 	
   150 	
   150 	// The time interval (received as part if the RegisterNotification) 
   151 	// The time interval (received as part if the RegisterNotification) 
   151 	// in which the change in playback position will be notified
   152 	// in which the change in playback position will be notified
   152 	TUint32								iPlayBackIntervalInMilliseconds;
   153 	TUint32   							iPlayBackIntervalInMilliseconds;
   153 
   154 
   154 	TTargetBatteryStatus				iBatteryStatus;
   155 	TTargetBatteryStatus				iBatteryStatus;
   155 	TUint32 							iPlaybackPositionInMilliseconds;
   156 	TUint32 							iPlaybackPositionInMilliseconds;
   156 	TUint32								iLastNotifiedPlaybackPositionInMilliseconds;
   157 	TUint32								iLastNotifiedPlaybackPositionInMilliseconds;
   157 	
   158 	
   158 	// data for MPlayerCapabilitiesObserver
   159 	// data for MPlayerCapabilitiesObserver
   159 	RArray<TRegisterNotificationEvent> 			iSupportedNotificationEventList;
   160 	TEventsMask*						iSupportedNotificationEventList;
   160 	RArray<TInt> 						iCompanyIdList;
   161 	RArray<TInt> 						iCompanyIdList;
   161 
   162 
   162 	// list of events for which notifications have been request 
   163 	// list of events for which notifications have been request 
   163 	RArray<TRegisterNotificationEvent> 			iPendingNotificationEventList;
   164 	RArray<TRegisterNotificationEvent> 			iPendingNotificationEventList;
       
   165 	
       
   166 	// Whether we've been asked for an update when the play status changes
       
   167 	TBool								iPlaybackStatusUpdatePending;
   164 
   168 
   165 	// Attribute (settings) data MPlayerApplicationSettingsObserver
   169 	// Attribute (settings) data MPlayerApplicationSettingsObserver
   166 	RHashMap<TInt, CPlayerApplicationSettings*>		iPlayerApplicationSettings;
   170 	RHashMap<TInt, CPlayerApplicationSettings*>		iPlayerApplicationSettings;
   167 
   171 
   168 	};
   172 	};