⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smbmusicapmainplayerstatepause.cpp

📁 symbian
💻 CPP
📖 第 1 页 / 共 3 页
字号:
/* Copyright (C) 2007 Sony Ericsson Mobile Communications Japan, Inc. */
/*-------------------------------------------------------------------------*/
// FileName:
//	SmbMusicAPMainPlayerStatePause.cpp
//
// Description: 
//	儈儏乕僕僢僋僾儗僀儎乕嵞惗宯偺忬懺僋儔僗
/*------------------------------------------------------------------------*/
//曄峏棜楌
//擔晅			|曄峏幰 	|撪梕
//--------------+-----------+----------------------------------------------
//2006/06/07	|K3拞堜		| 弶斉儕儕乕僗

/// 忬懺僋儔僗
/**
 * @file SmbMusicAPMainPlayerStatePause.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 __SMBMUSICAPMAINPLAYERSTATEPAUSE_H__
#include "SmbMusicAPMainPlayerStatePause.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	KSmbMusicAPMainPlayerStateKeyPause[] =
	{
		{//  0.寛掕
		EWcdmaMpKeySelect,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStatePause::ProcKeyDecideL,		// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  1.僜僼僩1
		EWcdmaMpKeyMail,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStatePause::ShowSubMenuL,		// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  2.僜僼僩2
		EWcdmaMpKeyIMode,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStatePause::ChangePlayPictureL,	// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  3.僜僼僩3
		EWcdmaMpKeyMenu,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUnUse,					// 旕徚旓
		NULL,												// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  5.Clear
		EWcdmaMpKeyClear,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStatePause::ChangeFilterViewL,	// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  6.忋
		EWcdmaMpKeyUp,										// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStatePause::ProcKeyUpL,			// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  7.壓
		EWcdmaMpKeyDown,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStatePause::ProcKeyDownL,		// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  8.塃
		EWcdmaMpKeyRight,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStatePause::ProcKeyRight,		// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  9.嵍
		EWcdmaMpKeyLeft,									// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStatePause::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
#ifdef __SMBMUSICAP_PERFORMANCE_DEF__
//////////////////////////////////////////////////////////////////////
		},
		{//  7.'1'
		'1',												// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStatePause::ProcKeyOne,		// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  8.'2'
		'2',												// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStatePause::ProcKeyTwo,		// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  9.'3'
		'3',												// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStatePause::ProcKeyThree,	// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
		},
		{//  10.'4'
		'4',												// iKeyCode
		ESmbMusicAPMainPlayerStateKeyUse,					// 張棟偁傝
		CSmbMusicAPMainPlayerStatePause::ProcKeyFour,		// iShortPressFunc
		NULL,												// iLongPressFunc
		NULL												// iRepeatFunc
//////////////////////////////////////////////////////////////////////
#endif
		}
	};

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

	{

	}


/**
* 僨僗僩儔僋僞
*/
CSmbMusicAPMainPlayerStatePause::~CSmbMusicAPMainPlayerStatePause()
	{
	}
	
//==============================================================================================
//
// Query儊僜僢僪
//
//
//==============================================================================================

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



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

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


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

/**
 * 掆巭忬懺偱偺僉乕僀儀儞僩庴怣張棟
 *
 * @param[in] aKeyEvent 僉乕僀儀儞僩
 * @param[in] aType 僀儀儞僩僐乕僪
 * @return 僉乕偺徚旓(EKeyWasConsumed)丒旕徚旓(EKeyWasNotConsumed)傪曉媝偡傞丅
 */
TKeyResponse CSmbMusicAPMainPlayerStatePause::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(KSmbMusicAPMainPlayerStateKeyPause) / sizeof(KSmbMusicAPMainPlayerStateKeyPause[0]);
		response = KeyEventL(aKeyEvent, KSmbMusicAPMainPlayerStateKeyPause, num);
		}
	return response;
	}

/**
 * 掆巭忬懺偱偺寛掕僉乕張棟
 *   嵞惗奐巒張棟傪峴偆丅
 *
 * Y: public
 * Y: staic娭悢
 *
 */
void CSmbMusicAPMainPlayerStatePause::NSProcKeyDecideL()
	{
//	TBool failStatue = iView->iFailState;
	iView->iFailState = EFalse;

	if (iView->IsMovingSong() != EFalse)
		{
		// 嬋堏摦拞偺応崌
		iView->iPauseWaiting = ETrue;
		return;
		}
	
	if (iView->IsEnableDecideKey(*iView) != EFalse)
		{
		if (iView->IsProcStartPlay(iView->iProc) != EFalse)
			{
			// 嵞惗奐巒張棟拞偺応崌
			ProcKeyDecideInProcStartL();
			
			}
		else if (ESmbMusicAPMainPlayerPlayInitial != iView->ViewStatus())
			{
			if (EFalse ==  iView->iPlay2Start)
				{
				// 嵞惗價儏乕忬懺偑掆巭拞偺応崌偺張棟
				ProcKeyDecideInPauseL();
				}
			}
		}
	}

/**
 * 掆巭忬懺偱嵞惗奐巒張棟拞忬懺偺寛掕僉乕張棟
 *
 * Y: private 
 * Y: ProcKeyDecideL()偐傜屇偽傟傞
 * Y: 旕static娭悢
 *
 * @param[in] aKeyFunc 僉乕僀儀儞僩張棟僋儔僗
 */
void CSmbMusicAPMainPlayerStatePause::ProcKeyDecideInProcStartL()
	{
	//張棟忬懺忣曬偺庢摼
	iView->iCmd->GetRequestKind(iView->iProckind, iView->iInfokind);

	if (ESmbMusicAPMainPlayerReqNone          		!= iView->iProckind 
	    && ESmbMusicAPMainPlayerReqGetSoundLevel	!= iView->iProckind 
	    && ESmbMusicAPMainPlayerReqSetVolume		!= iView->iProckind)
		{//GetSoundLevel, SetVolume埲奜偺梫媮偑敪峴嵪傒偺応崌
		
		//掆巭梫媮偺梊栺
		iView->iPauseWaiting = ETrue;
		
		//掆巭夋柺偺昤夋
		iView->iDrawer->DrawStopPictureL(EFalse);
		}
	else if (ESmbMusicAPMainPlayerReqNone == iView->iProckind)
		{// 懠偵梫媮偑敪峴偝傟偰偄側偄忬懺偺応崌
		
		iView->ProcCancelAction();		// 2006.10.23  TRK:12007
		

⌨️ 快捷键说明

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