smbmusicapmainplayerstateff.cpp
来自「symbian」· C++ 代码 · 共 546 行 · 第 1/2 页
CPP
546 行
/* Copyright (C) 2006 Sony Ericsson Mobile Communications Japan, Inc. */
/*-------------------------------------------------------------------------*/
// FileName:
// SmbMusicAPMainPlayerStateFF.cpp
//
// Description:
// 儈儏乕僕僢僋僾儗僀儎乕嵞惗宯偺忬懺僋儔僗
// 憗憲傝忬懺
/*------------------------------------------------------------------------*/
//曄峏棜楌
//擔晅 |曄峏幰 |撪梕
//--------------+-----------+----------------------------------------------
//2006/06/07 |K3拞堜 | 弶斉儕儕乕僗
/// 忬懺僋儔僗
/**
* @file SmbMusicAPMainPlayerStateFF.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 __SMBMUSICAPMAINPLAYERSTATEFF_H__
#include "SmbMusicAPMainPlayerStateFF.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 KSmbMusicAPMainPlayerStateKeyFF[] =
{
{// 3.僜僼僩3
EWcdmaMpKeyMenu, // iKeyCode
ESmbMusicAPMainPlayerStateKeyUnUse, // 旕徚旓
NULL, // iShortPressFunc
NULL, // iLongPressFunc
NULL // iRepeatFunc
},
{// 13.廔榖
EWcdmaMpKeyOnHook, // iKeyCode
ESmbMusicAPMainPlayerStateKeyUnUse, // 旕徚旓
NULL, // iShortPressFunc
NULL, // iLongPressFunc
NULL // iRepeatFunc
}
};
/**
* 僀儞僗僞儞僗惗惉
* @param[in] aMusicAPMainPlayerEnv 儊僀儞僾儗僀儎乕娐嫬
* @param[in] aMusicSyncEngine 摨婜僄儞僕儞
* @param[in] aSelectView 専嶕宯價儏乕
*/
CSmbMusicAPMainPlayerStateFF::CSmbMusicAPMainPlayerStateFF(MSmbMusicAPMainPlayerEnv& aPlayerEnv,
RLog& aLog, RPGPropAgent& aPropAgent, CSmbMusicAPMainPlayerPlayView* aView
) : CSmbMusicAPMainPlayerStateBase(aPlayerEnv, aLog, aPropAgent, aView)
{
}
/**
* 僨僗僩儔僋僞
*/
CSmbMusicAPMainPlayerStateFF::~CSmbMusicAPMainPlayerStateFF()
{
}
//==============================================================================================
//
// Query儊僜僢僪
//
//
//==============================================================================================
/**
* 忬懺傪幆暿偡傞Enum抣偺庢摼
*
* @return 忬懺傪幆暿偡傞TSmbMusicAPMainPlayerPlayStatus宆偺抣
*/
TSmbMusicAPMainPlayerPlayStatus CSmbMusicAPMainPlayerStateFF::PlayStatus()
{
return ESmbMusicAPMainPlayerPlayPlayFF;
}
//==============================================================================================
//
// ViewActivated娭楢儊僜僢僪
//
//
//==============================================================================================
//==============================================================================================
//
// OfferKeyEvent娭楢儊僜僢僪
//
//
//==============================================================================================
/**
* 憗憲傝忬懺偱偺僉乕僀儀儞僩庴怣張棟
*
* @param[in] aKeyEvent 僉乕僀儀儞僩
* @param[in] aType 僀儀儞僩僐乕僪
* @return 僉乕偺徚旓(EKeyWasConsumed)丒旕徚旓(EKeyWasNotConsumed)傪曉媝偡傞丅
*/
TKeyResponse CSmbMusicAPMainPlayerStateFF::OfferKeyEventImplL(const TKeyEvent& aKeyEvent, TEventCode aType)
{
TInt num;
TKeyResponse response;
if (EEventKeyUp == aType)
{//僉乕傾僢僾偺応崌
//憗栠偟忬懺偱偼仼僉乕偺傾僢僾偑憗栠偟偺廔椆偲側傞偺偱Up僀儀儞僩傪僠僃僢僋偡傞丅
response = KeyUpEvent(aKeyEvent);
}
else if(iView->IsActiveKeyEvent(aType) != EFalse)
{//僉乕僀儀儞僩偱丄堦審嶍彍拞偱偼柍偄応崌
// 傾僾儕掅揹埑偵傛傞掆巭忬懺傪夝彍 2006.10.25
iView->iLowBatteryStoped = EFalse;
// 憗憲傝忬懺偺僉乕僥乕僽儖傪巊梡偟偰張棟傪僨傿僗僷僢僠偡傞丅
iView->iKeyEvent = aKeyEvent;
num = sizeof(KSmbMusicAPMainPlayerStateKeyFF) / sizeof(KSmbMusicAPMainPlayerStateKeyFF[0]);
response = KeyEventL(aKeyEvent, KSmbMusicAPMainPlayerStateKeyFF, num);
}
else
{//偦偺懠偺応崌(僉乕僟僂儞僀儀儞僩傑偨偼堦審嶍彍拞偺僉乕僀儀儞僩偺応崌)
//僀儀儞僩偼徚旓偟側偄
response = EKeyWasNotConsumed;
}
return response;
}
/**
* 憗憲傝忬懺偱偺僉乕傾僢僾庴怣張棟
*
* @param[in] aKeyEvent 僉乕僀儀儞僩
* @return 僉乕偺徚旓(EKeyWasConsumed)丒旕徚旓(EKeyWasNotConsumed)傪曉媝偡傞丅
*/
TKeyResponse CSmbMusicAPMainPlayerStateFF::KeyUpEvent(const TKeyEvent& aKeyEvent)
{
TKeyResponse response;
if (EStdKeyRightArrow == aKeyEvent.iScanCode)
{//仺僉乕偺応崌
//憗憲傝偺廔椆(憗憲傝忬懺偐傜嵞惗忬懺傊偺忬懺慗堏偺奐巒)
ProcKeyLongRightUp();
response = EKeyWasConsumed;
}
else
{//仺僉乕埲奜偺応崌
response = EKeyWasNotConsumed;
}
return response;
}
/**
* 憗憲傝夝彍張棟
*
*/
void CSmbMusicAPMainPlayerStateFF::ProcKeyLongRightUp()
{
if (ESmbMusicAPMainPlayerPlayProcCancelFF == iView->iProc ||
iView->IsHoldingCancelPlayFF() != EFalse
)
{//FF偺僉儍儞僙儖偑敪峴嵪傒傑偨偼FF僉儍儞僙儖偑儁儞僨傿儞僌偵側偭偰偄傞応崌
//壗傕偟側偄
return;
}
//Draw僞僀儅乕偺掆巭
iView->iDrawer->StopRedrawTimer();
// FF僉儍儞僙儖傪敪峴
iView->iCmd->CancelPlayFF();
if (ESmbMusicAPMainPlayerPlayProcNone == iView->iProc) // 2006.09.29 TRK:9995
{//懠偺梫媮偑敪峴偝傟偰偄側偄応崌
//張棟庬暿傪FF僉儍儞僙儖張棟偵愝掕偡傞
iView->iProc = ESmbMusicAPMainPlayerPlayProcCancelFF;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?