?? smbmusicapsingleplayerrsccontroller.h
字號:
/*----------------------------------------------------------------------------*/
// Copyright (c) 2007 Sony Ericsson Mobile Communications Japan, Inc.
// All rights reserved.
/*----------------------------------------------------------------------------*/
// FileName:
// SmbMusicAPSinglePlayerRscController.h
//
// Description:
// 儈儏乕僕僢僋傾僾儕堦嬋嵞惗僾儗僀儎乕偺儕僜乕僗丒傾僾儕働乕僔儑儞嫞崌僐儞僩儘乕儖僋儔僗
//
// Modefy:
// 2006-07-25 宲彸尦偵CBase捛壛丅懠堦晹僐乕僪惍棟 K3Hirono
//
// 2007-02-01 PTX824Start
// 2007-07-24 D_82400007238
/*----------------------------------------------------------------------------*/
// $NoKeywords: $
#ifndef SMBMUSICAPSINGLEPLAYERRSCCONTROLLER_H_
#define SMBMUSICAPSINGLEPLAYERRSCCONTROLLER_H_
#ifndef SMBMUSICAPSINGLEPLAYEROBSERVER_H_
#include "SmbMusicAPSinglePlayerObserver.h" // 堦嬋嵞惗僾儗僀儎乕僆僽僓乕僶僋儔僗
#endif // SMBMUSICAPSINGLEPLAYEROBSERVER_H_
#ifndef __SMBMUSICAPSINGLEPLAYERLOCALINTERFACE_H__
#include "SmbMusicAPSinglePlayerLocalInterface.h" // 堦嬋嵞惗僾儗僀儎乕儘乕僇儖IF
#endif // __SMBMUSICAPSINGLEPLAYERLOCALINTERFACE_H__
#ifndef __SMBRSCMGRCLIENT_H__
#include <SmbRscMgrClient.h> // 嫞崌僼儗乕儉儚乕僋儕僜乕僗儅僱乕僕儍乕僋儔僀傾儞僩
#endif // __SMBRSCMGRCLIENT_H__
SEMCJ_NAMESPACE_BEGIN
class TResourceAllocatedState
{
public:
TResourceAllocatedState()
{}
TResourceAllocatedState(TSmbMusicAPSinglePlayerResource aResourceId,TSmbRscMgrRsc aRscMgrSrc,
TInt aPriority, TBool aAlloctedState)
: iResourceId(aResourceId), iRscMgrRsc(aRscMgrSrc), iPriority(aPriority), iState(aAlloctedState)
{}
// 枹巊梡
/* // @return return 0 if maching object
inline TInt FindByInternalId(TSmbMusicAPSinglePlayerResource aResourceId) const
{
return (iResourceId == aResourceId) ? 0 : 1;
}
*/
// @return return 0 if maching object
inline TInt FindByExternalId(TSmbRscMgrRsc aRscMgrRsc) const
{
return (aRscMgrRsc == iRscMgrRsc) ? 0 : 1;
}
inline void SetAlloctedState()
{
iState = ETrue;
}
inline void SetFreeState()
{
iState = EFalse;
}
inline TBool IsFreeState() const
{
return iState == EFalse;
}
public:
TSmbMusicAPSinglePlayerResource iResourceId; // internal resource ID
TSmbRscMgrRsc iRscMgrRsc; // controlled by the Simba resource controller
TInt iPriority;
TBool iState; // ETrue:Allocated, EFalse:Free
};
class CSmbMusicAPSinglePlayerRscController : public CBase,
public MSmbRscMgrRscCallback,
public MSmbRscMgrRscWatcher
{
enum TPanicCode
{
EInvalidArgument = 0 // 堷悢堎忢 (NULL 側偳)
};
public:
void ReleaseResourceReqL(CArrayFixFlat<TSmbRscMgrRsc>* aList); // 儕僜乕僗奐曻梫媮乮from)
void AllocationResourceResL(TSmbRscMgrRscResult aResult); // 儕僜乕僗棙梡尃妉摼墳摎
void ReallocationResourceResL(TSmbRscMgrRscResult aResult); // 儕僜乕僗棙梡尃忳搉墳摎
void CheckResourceCompetitionResL(TSmbRscMgrRscResult aResult); // 儕僜乕僗嫞崌妋擣墳摎
void ReleaseResourceNotifyL(); // 儕僜乕僗奐曻捠抦(儊儞僶偺抣傪偮偐偭偰夝曻偡傞儕僜乕僗傪巜掕)
void SetObserver(MSmbMusicAPSinglePlayerObserver* aObserver); // 僆僽僓乕僶愝掕
static CSmbMusicAPSinglePlayerRscController* NewL(); // 僼傽僋僩儕娭悢
~CSmbMusicAPSinglePlayerRscController(); // 僨僗僩儔僋僞
TBool IsAllocatedAllResource() const; // 庢摼偡傋偒儕僜乕僗傪偡傋偰庢摼嵪
TBool IsAllocatedSomeResource() const; // 壗偐儕僜乕僗傪庢摼偟偰偄傞
TBool IsAllocatedAudioPath() const; // 壒惡僷僗傪庢摼偟偰偄傞偐偳偆偐
void ReleaseResourceReqL();
void Cancel();
TBool RequestRscForPlayL();
TBool ReleaseRscForPauseL();
TBool ReleaseRscForExitPlayer();
TBool ReleaseRscForUserConfirmL(); //儐乕僓妋擣帪偺儕僜乕僗奐曻(BGRsc偼庢摼偟偨傑傑丄壒惡僷僗偺傒傪奐曻偡傞)(ADD For D_82400007238)
TBool IsConfirmRequestAudioRoutingL();
private:
CSmbMusicAPSinglePlayerRscController(); //僐儞僗僩儔僋僞
void ConstructL(); // 2nd僐儞僗僩儔僋僞
// TInt FindByInternalId(TSmbMusicAPSinglePlayerResource aResourceId) const; // 枹巊梡
TInt FindByExternalId(TSmbRscMgrRsc aRscMgrRsc) const;
void SetAllocatedResourceState(TInt aIndex);
void SetFreeResourceState(TInt aIndex);
TBool IsAllocatedMWPlayerControl() const;
TBool IsAllocatedMusicBG() const; // BGRsc庢摼妋擣(ADD For D_82400007238)
TBool IsAllocatedResource(TSmbRscMgrRsc aRscMgrRsc) const;
void AddAllocateResourceL(TSmbRscMgrRsc aRsc);
CArrayFixFlat<TSmbRscMgrRscAllocId>* iAllocatedResultRscList; ///< 偳偺儕僜乕僗傪妉摼偟偰偄傞偐
CArrayFixFlat<TSmbRscMgrRscPriority>* iPriorityList; ///< 偳傫側僾儔僀僆儕僥傿偱儕僜乕僗傪妉摼偡傞偐
RArray<TSmbRscMgrRsc> iPrepareReleaseRsc; ///< 偳偺儕僜乕僗偺奐曻弨旛傪偟偰偄傞偐
MSmbMusicAPSinglePlayerObserver* iObserver; ///< 堦嬋嵞惗僾儗僀儎僆僽僓乕僶
CSmbRscMgrRscClient* iRscClient; ///< 儕僜乕僗嫞崌娗棟僋儔僀傾儞僩
RArray<TResourceAllocatedState> iResourceStates;
TBool iPauseToPlayback; //
TSmbMusicAPSinglePlayerAppRscEvent iRscEvent;
};
SEMCJ_NAMESPACE_END
#endif //SMBMUSICAPSINGLEPLAYERRSCCONTROLLER_H_
//// end of SmbMusicAPSinglePlayerRscController.h
/* Copyright (C) 2005-2007 Sony Ericsson Mobile Communications Japan, Inc. */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -