smbmusicapmainplayerstateresourcefail.cpp

来自「symbian」· C++ 代码 · 共 383 行

CPP
383
字号
/* Copyright (C) 2006 Sony Ericsson Mobile Communications Japan, Inc. */
/*-------------------------------------------------------------------------*/
// FileName:
//	SmbMusicAPMainPlayerStateResourceFail.cpp
//
// Description: 
//	儈儏乕僕僢僋僾儗僀儎乕嵞惗宯偺忬懺僋儔僗
//  儕僜乕僗嫞崌忬懺
/*------------------------------------------------------------------------*/
//曄峏棜楌
//擔晅			|曄峏幰 	|撪梕
//--------------+-----------+----------------------------------------------
//2006/06/07	|K3拞堜		| 弶斉儕儕乕僗

/// 忬懺僋儔僗
/**
 * @file SmbMusicAPMainPlayerStateResourceFail.cpp
 *
 * 儈儏乕僕僢僋僾儗僀儎乕嵞惗宯偺忬懺僋儔僗
 */


//////////////////////////////////////////////////////////
//#define __SKIP_GETIMAGE__			// 摦嶌晄椙偺偨傔僗僉僢僾
//#define __SKIP_NOTIFY_INDEX__		// 摦嶌晄椙偺偨傔僗僉僢僾
#define __SKIP_ASSERT__
//////////////////////////////////////////////////////////

#include "SmbMusicAPMainPlayerPlayDebug.h"

#ifndef FJAFENV_H__
#include <FjAfEnv.h>
#endif

#ifndef FJPGBASIC_H__
#include <FjpgBasic.h>
#endif

#ifndef FJPGBASICSTATUS_H__
#include <FjpgBasicStatus.h>
#endif

#ifndef FJPGBASICLASERVER_H__
#include <FjpgBasicLaServer.h>
#endif

#ifndef __SMBPGMENU_H__
#include <SmbPGMenu.h>
#endif

#ifndef FJPGKEYSOUNDBACKLIGHTS_H__
#include <FjpgKeySoundBackLight.h>
#endif

#ifndef FJLACOMMON_H__
#include <Fjlacommon.h>
#endif

#ifndef __SMBMUSICAPPLAYERCOMMONDEF_H__
#include "SmbMusicAPPlayerCommonDef.h"
#endif

#ifndef __SMBMUSICAPMAINPLAYEREXTERNALINTERFACE_H__
#include <SmbMusicAPMainPlayerExternalInterface.h>
#endif

#ifndef __SMBMUSICAPSONGINFOEXTERNALINTERFACE_H__
#include <SmbMusicAPSongInfoExternalInterface.h>
#endif

#ifndef __SMBMUSICAPMAINPLAYERSTATERESOURCEFAIL_H__
#include "SmbMusicAPMainPlayerStateResourceFail.h"
#endif

#ifndef __SMBMUSICAPMAINPLAYERUTILITY_H__
#include "SmbMusicAPMainPlayerUtility.h"
#endif

//#ifndef __SMBMUSICAPMAINPLAYERDIALOGMANAGER_H__
//#include "SmbMusicAPMainPlayerDialogManager.h"
//#endif

#ifndef __SMBMUSICAPMAINPLAYERAPPBASISPARTFUNCINTERFACE_H__
#include "SmbMusicAPMainPlayerBasisPartFuncInterface.h"
#endif

#ifndef __SMBMUSICAPMAINPLAYERAPPUI_H__
#include "SmbMusicAPMainPlayerAppUi.h"
#endif

#ifndef __SMBAFWORDING_RSG__
#include <SmbAfWording.rsg>
#endif

SEMCJ_NAMESPACE_BEGIN
USING_NAMESPACE_DCM

#include <SmbMusicAPMainPlayer.RSG>


#include <Music.mbg>


/**
 * 掆巭夋柺偺僉乕僀儀儞僩懳墳昞
 */
 
const TSmbMusicAPMainPlayerStateKeyEvent	KSmbMusicAPMainPlayerStateKeyResourceFail[] =
	{
		{//  0.寛掕
		EWcdmaMpKeySelect,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStateResourceFail::ProcKeyDecideL,		// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  1.僜僼僩1
		EWcdmaMpKeyMail,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStateResourceFail::ShowSubMenuL,		// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  2.僜僼僩2
		EWcdmaMpKeyIMode,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStateResourceFail::ChangePlayPictureL,	// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  3.僜僼僩3
		EWcdmaMpKeyMenu,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUnUse,					// 旕徚旓
		NULL,												// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  5.Clear
		EWcdmaMpKeyClear,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStateResourceFail::ChangeFilterViewL,	// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  6.忋
		EWcdmaMpKeyUp,										// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStateResourceFail::ProcKeyUpL,			// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  7.壓
		EWcdmaMpKeyDown,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStateResourceFail::ProcKeyDownL,		// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  8.塃
		EWcdmaMpKeyRight,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStateResourceFail::ProcKeyRight,		// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  9.嵍
		EWcdmaMpKeyLeft,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStateResourceFail::ProcKeyLeft,			// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{// 13.廔榖
		EWcdmaMpKeyOnHook,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUnUse,					// 旕徚旓
		NULL,												// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{// 28.儘僢僋
		EWcdmaMpKeyLock,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUnUse,					// 旕徚旓
		NULL,												// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		}
	};


/**
 * 僀儞僗僞儞僗惗惉
 * @param[in] aMusicAPMainPlayerEnv 儊僀儞僾儗僀儎乕娐嫬
 * @param[in] aMusicSyncEngine 摨婜僄儞僕儞
 * @param[in] aSelectView 専嶕宯價儏乕
 */
CSmbMusicAPMainPlayerStateResourceFail::CSmbMusicAPMainPlayerStateResourceFail(MSmbMusicAPMainPlayerEnv& aPlayerEnv,
								 RLog& aLog, RPGPropAgent& aPropAgent, CSmbMusicAPMainPlayerPlayView* aView
								  ) : CSmbMusicAPMainPlayerStatePause(aPlayerEnv, aLog, aPropAgent, aView)

	{

	}


/**
* 僨僗僩儔僋僞
*/
CSmbMusicAPMainPlayerStateResourceFail::~CSmbMusicAPMainPlayerStateResourceFail()
	{
	}

//==============================================================================================
//
// Query儊僜僢僪
//
//
//==============================================================================================

/**
 * 忬懺傪幆暿偡傞Enum抣偺庢摼
 *
 * @return 忬懺傪幆暿偡傞TSmbMusicAPMainPlayerPlayStatus宆偺抣
 */
TSmbMusicAPMainPlayerPlayStatus CSmbMusicAPMainPlayerStateResourceFail::PlayStatus()
	{
	return ESmbMusicAPMainPlayerPlayPlayResourceFail;
	}



//==============================================================================================
//
//  ViewActivated娭楢儊僜僢僪
//
//
//==============================================================================================

//價儏乕婲摦帪偺張棟偼懠偺嵞惗拞埲奜偺忬懺偲嫟捠

//==============================================================================================
//
//  OfferKeyEvent娭楢儊僜僢僪
//
//
//==============================================================================================

/**
 * 儕僜乕僗嫞崌忬懺偱偺僉乕僀儀儞僩庴怣張棟
 *
 * @param[in] aKeyEvent 僉乕僀儀儞僩
 * @param[in] aType 僀儀儞僩僐乕僪
 * @return 僉乕偺徚旓(EKeyWasConsumed)丒旕徚旓(EKeyWasNotConsumed)傪曉媝偡傞丅
 */
TKeyResponse CSmbMusicAPMainPlayerStateResourceFail::OfferKeyEventImplL(const TKeyEvent& aKeyEvent, TEventCode aType)
	{
	TInt num;
	TKeyResponse response(EKeyWasNotConsumed);

	if(iView->IsActiveKeyEvent(aType) != EFalse)
		{
		
		// 傾僾儕掅揹埑偵傛傞掆巭忬懺傪夝彍  2006.10.25
		iView->iLowBatteryStoped = EFalse;
		
		// 嵞惗價儏乕忬懺偐傜僉乕庴晅偗僥乕僽儖傪寛掕偡傞丅
		iView->iKeyEvent = aKeyEvent;
		num = sizeof(KSmbMusicAPMainPlayerStateKeyResourceFail) / sizeof(KSmbMusicAPMainPlayerStateKeyResourceFail[0]);
		response = KeyEventL(aKeyEvent, KSmbMusicAPMainPlayerStateKeyResourceFail, num);
		}
	return response;
	}


/**
 * 寛掕僉乕張棟\n
 *   嵞惗奐巒張棟傪峴偆丅
 *
 * Y: public
 * Y: staic娭悢
 *
 */
void CSmbMusicAPMainPlayerStateResourceFail::NSProcKeyDecideL()
	{
//	TBool failStatue = iView->iFailState;
	iView->iFailState = EFalse;
	
	if (iView->IsEnableDecideKey(*iView) != EFalse)
		{
		if (iView->IsProcStartPlay(iView->iProc) != EFalse)
			{
			// 嵞惗奐巒張棟拞偺応崌
			ProcKeyDecideInProcStartL();
			}
		else
			{
			if (EFalse ==  iView->iPlay2Start)
				{
				// 婛偵奐巒梫媮偑敪峴嵪傒偱側偄応崌
				ProcKeyDecideInPauseL();
				}
			}
		}

	}



/**
 * 僋儕傾僉乕張棟\n
 *   僼傿儖僞價儏乕傊愗懼偊傞丅
 * @param[in] aKeyFunc 僉乕僀儀儞僩張棟僋儔僗
 */
void CSmbMusicAPMainPlayerStateResourceFail::NSChangeFilterViewL()
	{
	//梫媮敪峴忬嫷偺庢摼
	iView->iCmd->GetRequestKind(iView->iProckind, iView->iInfokind);
	
	if (iView->IsEnableClearKey(*iView) != EFalse)
		{
		//忬懺傪弶婜忬懺偵愝掕
		iView->ChangeState(ESmbMusicAPMainPlayerPlayInitial);
		
		iView->iProcFail = ESmbMusicAPMainPlayerPlayProcNone;
		iView->iPlayComplete = EFalse;		// 2006.10.03  TRK 10842
		iView->iViewTop = EFalse;		// TRK:10795  2006.10.13


		// 僼傿儖僞乕價儏乕婲摦僷儔儊乕僞嶌惉
		TSmbMusicAPMainPlayerPrmDeleteOne param;
		param.iListHandle = iView->iPlayList.iListHandle;
		param.iIndex = iView->iPlayList.iIndex;

		TPckgBuf<TSmbMusicAPMainPlayerPrmDeleteOne> parambuf(param);
		
		// 僼傿儖僞乕價儏乕傊愗懼偊傞丅
		iView->iDrawer->DoMusicEnableL(EFalse);	// TRK:11398	2006.10.16
		iPlayerEnv.BasisPartFuncInterface().ChangeViewL(ESmbMusicAPMainPlayerFilterViewId,
		                                                         KSmbMusicAPMainPlayerChangeViewMsgUid, parambuf);
		}

	}

//==============================================================================================
//
//  旕摨婜屇傃弌偟偺墳摎張棟娭楢儊僜僢僪
//
//
//==============================================================================================


//==============================================================================================
//
//  嵞惗宯僀儀儞僩張棟娭楢儊僜僢僪
//
//
//==============================================================================================


//==============================================================================================
//
//  偦偺懠
//
//
//==============================================================================================

/**
 * 掆巭拞忬懺夋柺偺昤夋傪峴偆丅
 *
 * Y: public
 *
 * @param[in] aInit 弶婜夋柺昞帵乮ETrue:價僕儏傾儔僀僓乕夋柺昞帵乯
 */ 
void CSmbMusicAPMainPlayerStateResourceFail::RedrawL(TBool aInit)
	{
	iView->iDrawer->DrawStopPictureL(aInit);
	}


SEMCJ_NAMESPACE_END

// end of SmbMusicAPMainPlayerStateResourceFail.cpp
/* Copyright (C) 2006 Sony Ericsson Mobile Communications Japan, Inc. */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?