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

📄 smbmusicapmainplayerstatepause.cpp

📁 symbian
💻 CPP
📖 第 1 页 / 共 3 页
字号:
		//掆巭梫媮偺敪峴
		iView->iCmd->PlayStop();
		
		//儅僫乕儌乕僪嵞惗僼儔僌偺儕僙僢僩
		iView->iPlayerEnv.SetMannerModePlayingStateL(EFalse);	// 2006.09.29
		//掆巭張棟僼儔僌偺儕僙僢僩
		iView->iPauseState = ETrue;		// 2006.10.01  TRK:10167
		
		//掆巭夋柺偺昞帵
		iView->iDrawer->DrawStopPictureL(EFalse);
		}
	}

/**
 * 掆巭拞忬懺偺寛掕僉乕張棟
 *   嵞惗偺奐巒
 *
 * Y: private 
 * Y: ProcKeyDecideL()偐傜屇偽傟傞
 * Y: 旕static娭悢
 *
 * @param[in] aKeyFunc 僉乕僀儀儞僩張棟僋儔僗
 */
void CSmbMusicAPMainPlayerStatePause::ProcKeyDecideInPauseL()
	{
	if (EFalse != iPlayerEnv.BasisPartFuncInterface().PreCheckWhenStartPlayL(iView->iPlayList.iListHandle, iView->iPlayList.iIndex))
		{//儅僫乕儌乕僪嵞惗偺敾掕偱嵞惗OK偺応崌
		
		// 嵞惗壜擻 仺 嵞惗傪奐巒偡傞丅
		
		if (ESmbMusicAPMainPlayerPlayProcNone != iView->iProc)
			{//懠偺張棟梫媮敪峴拞偺応崌偵偼偦偺梫媮傪僉儍儞僙儖偡傞
			iView->ProcCancelAction();		// 2006.10.23  TRK:12007
			}
			
		//嵞惗奐巒梫媮偺敪峴
		if (EFalse == iView->iCmd->PlayStart(iPlayerEnv.MannerModePlayingState()))
			{//梫媮敪峴偺僄儔乕帪
			iView->iPlay2Start = ETrue;
			return;
			}
		
		// 嵞惗梫媮敪峴屻偺張棟
		
		if (EFalse == iView->iPlayComplete)		// 2006.08.05
			{
			// 儕僗僩嵞惗拞偺億乕僘忬懺偺応崌
			iView->iProc = ESmbMusicAPMainPlayerPlayProcPlayAction;
			}
		else
			{
			// 儕僗僩嵞惗姰椆帪
			iView->iProc = ESmbMusicAPMainPlayerPlayProcStartPlay;
			}
			
		iView->iPlay2Start = ETrue;
		
		}
	else 
		{//儅僫乕儌乕僪嵞惗偺敾掕偱嵞惗NG偺応崌
		
		//掆巭夋柺傪昞帵偡傞丅
		iView->iDrawer->DrawStopPictureL(EFalse);
		}
	}

/**
 * 塃僉乕抁墴偟張棟
 *   嬋憲傝張棟傪峴偆丅
 *
 * Y: public
 * Y: static娭悢
 *
 * @param[in] aKeyFunc 僉乕僀儀儞僩張棟僋儔僗
 */
void CSmbMusicAPMainPlayerStatePause::NSProcKeyRight()
	{
	// ADD-START
	// 07/09/05 SEMC 媑壀
	// 擮偺偨傔丄嬋憲傝僇僂儞僞乕嵞昤夋偺惂屼傪弶婜壔
	iView->iDrawer->SetIsSongTimerTmpStop(EFalse);
	// ADD-END
// PTX824懳墳
// Add 2007.03.23
	// 嬋憲傝曐棷悢偺峏怴
	if (UpdateHoldCount(ETrue) != EFalse)
		{
		// 峏怴偝傟偨
		return;
		}

	ClearSkipHoldCount();
// Add End 2007.03.23

	if (EFalse == iView->iBottomSong)
		{// 嵟廔嬋埲奜偺応崌
		
		//張棟忬懺忣曬偺庢摼
		iView->iCmd->GetRequestKind(iView->iProckind, iView->iInfokind);

		if (ESmbMusicAPMainPlayerReqNone == iView->iProckind)
			{//梫媮偑敪峴偝傟偰偄側偄応崌

// Add 2007.09.17
			if (ESmbMusicAPMainPlayerReqNone != iView->iInfokind)
				{// 嬋忣曬庢摼張棟拞偺応崌
					
				//嬋忣曬庢摼張棟傪僉儍儞僙儖偡傞
				iView->iCmd->CancelAction();
				iView->iProc = ESmbMusicAPMainPlayerPlayProcNone;
				iView->iCancelAction = ETrue;			// TRK:9802
				iView->iCancelKind   = iView->iInfokind;
				}
// Add End 2007.09.17

			if (ESmbMusicAPMainPlayerPlayProcNone == iView->iProc)
				{
				//嬋憲傝梫媮傪敪峴
				if (EFalse == iView->iCmd->PlayNext())
					{//梫媮敪峴偵幐攕偟偨応崌
					return;
					}

				// 嬋憲傝張棟忬懺
				iView->iProc = ESmbMusicAPMainPlayerPlayProcNextSong;
				}
			}
		}
	}

/**
 * 嵍僉乕抁墴偟張棟
 *   嬋栠偟張棟傪峴偆丅
 *
 *   嵞惗帪娫偑1昩枹枮偺応崌偼摢弌偟張棟傪峴偆丅
 * @param[in] aKeyFunc 僉乕僀儀儞僩張棟僋儔僗
 */
void CSmbMusicAPMainPlayerStatePause::NSProcKeyLeft()
	{
	// ADD-START
	// 07/09/05 SEMC 媑壀
	// 擮偺偨傔丄嬋憲傝僇僂儞僞乕嵞昤夋偺惂屼傪弶婜壔
	iView->iDrawer->SetIsSongTimerTmpStop(EFalse);
	// ADD-END
// PTX824懳墳
// Add 2007.03.23
	// 嬋栠偟曐棷悢偺峏怴
	if (UpdateHoldCount(EFalse) != EFalse)
		{
		// 峏怴偝傟偨
		return;
		}
	
	// PTX824 TRK:664 懳墳
	if (ESmbMusicAPMainPlayerPlayProcFailSong == iView->iProc ||
	    ESmbMusicAPMainPlayerPlayProcDelete   == iView->iProc
	   )
		{// 嵞惗晄壜嬋張棟拞丄1審嶍彍張棟拞偺応崌
		
		// 柍帇偡傞
		return;
		}

	ClearSkipHoldCount();
// Add End 2007.03.23

	//張棟忬懺忣曬偺庢摼
	iView->iCmd->GetRequestKind(iView->iProckind, iView->iInfokind);

// Add 2007.09.17
	if (ESmbMusicAPMainPlayerReqNone == iView->iProckind)
		{//梫媮偑敪峴偝傟偰偄側偄応崌
		if (ESmbMusicAPMainPlayerReqNone != iView->iInfokind)
			{// 嬋忣曬庢摼張棟拞偺応崌
			
			//嬋忣曬庢摼張棟傪僉儍儞僙儖偡傞
			iView->iCmd->CancelAction();
			iView->iProc = ESmbMusicAPMainPlayerPlayProcNone;
			iView->iCancelAction = ETrue;			// TRK:9802
			iView->iCancelKind   = iView->iInfokind;
			}
// Add End 2007.09.17
	

		//墘憈帪娫偺庢摼
		TInt curTime = iView->iDrawer->PlayTime();		// 2006.10.09

		if (ESmbMusicAPMainPlayerPlayProcNone == iView->iProc)
			{//懠偺張棟偑奐巒偝傟偰偄側偄応崌
// Change 2007.09.04
//			if (1 <= curTime)
// Change 2007.09.27
//			if (KSmbMusicAPMainPlayerStartTimerSec <= curTime)
			// 愭摢嬋偺応崌傕摢弌偟傪峴偆
			if (KSmbMusicAPMainPlayerStartTimerSec <= curTime || EFalse != iView->iTopSong)
// Change End 2007.09.27
				{// 嵞惗宱夁帪娫偑3昩埲忋偺応崌
				
				// 摢弌偟梫媮偺敪峴
				if (EFalse != iView->iCmd->PlaySongHead())
					{//梫媮敪峴偺僄儔乕帪
					
					//1昩僞僀儅乕偺僋儕傾
					delete iView->iPeriodicStart;
					iView->iPeriodicStart = NULL;
					return;
					}
				// 張棟庬暿傪摢弌偟張棟拞偵愝掕
				iView->iProc = ESmbMusicAPMainPlayerPlayProcPlaySongHead;
				//昤夋偺掆巭
				iView->iDrawer->StopRedrawTimer();
				iView->iDrawer->SetPlayTimeL(0, EFalse);		// 2006.10.17
				}
			else
				{// 嵞惗宱夁帪娫偑3昩枹枮偺応崌
// Change 2007.09.27
//				if (ESmbPGMusicAPRepeatSettingAll == iView->iSetdata.Repeat ||		// 慡嬋儕僺乕僩
//				     ESmbPGMusicAPPlayModeSettingShuffle == iView->iSetdata.PlayMode ||// 僾儗僀儌乕僪乮僔儍僢僼儖乯
//				     EFalse != iView->iReqPlayList.iShuffle ||							// 慡嬋僔儍僢僼儖
//				     0 != iView->iPlayList.iIndex)
					// 嵞惗宱夁帪娫偑1昩枹枮偱2嬋栚埲崀丄枖偼慡嬋儕僺乕僩偺応崌偼丄嬋栠偟傪峴偆丅
				if (EFalse == iView->iTopSong)
					// 愭摢嬋偱側偄応崌偼丄嬋栠偟傪峴偆丅
// Change End 2007.09.27
					{
					//嬋栠偟梫媮偺敪峴
					if (EFalse == iView->iCmd->PlayPrev())
						{//梫媮敪峴偺僄儔乕帪
						//3昩僞僀儅乕偺僋儕傾
						delete iView->iPeriodicStart;
						iView->iPeriodicStart = NULL;
						return;
						}
						
					// 張棟庬暿傪嬋栠偟張棟偵愝掕
					iView->iProc = ESmbMusicAPMainPlayerPlayProcPrevSong;
					//昤夋偺掆巭
					iView->iDrawer->StopRedrawTimer();
					}
				else if (EFalse != iView->iCancelAction)
					{
					// 尰嵼嬋偺嬋庢摼拞傪僉儍儞僙儖偟偨応崌
					iView->iNumJacket = 0;
					iView->iNumLyric = 0;
					iView->iProc = ESmbMusicAPMainPlayerPlayProcChangeSong;
					
					// 夋憸枃悢傪庢摼
					iView->DoCancelProc(*iView);
					}
				}
			}
		}
	//1昩僞僀儅乕偺僋儕傾
	delete iView->iPeriodicStart;
	iView->iPeriodicStart = NULL;

	}

/**
 * 僋儕傾僉乕張棟\n
 *   僼傿儖僞價儏乕傊愗懼偊傞丅
 * @param[in] aKeyFunc 僉乕僀儀儞僩張棟僋儔僗
 */
void CSmbMusicAPMainPlayerStatePause::NSChangeFilterViewL()
	{
	
	//張棟忬懺忣曬偺庢摼
	iView->iCmd->GetRequestKind(iView->iProckind, iView->iInfokind);
	
	if (iView->IsEnableClearKey(*iView) != EFalse)
		{//僋儕傾僉乕偑桳岠側応崌

		iView->iPlayComplete = EFalse;		// 2006.10.03  TRK 10842
		iView->iViewTop = EFalse;		// TRK:10795  2006.10.13

		//1嬋嶍彍梡偺尰嵼嬋偺僷儔儊乕僞傪嶌惉
		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);
		}

	}


//==============================================================================================
//
//  旕摨婜屇傃弌偟偺墳摎張棟娭楢儊僜僢僪
//
//
//==============================================================================================
/**
 * 摢弌偟墳摎張棟\n
 * 掆巭拞偱偁傟偽嵞惗嬋忣曬傪峏怴偡傞丅
 *
 * Y: public
 *
 * @param[in] aResult 張棟寢壥
 */
void CSmbMusicAPMainPlayerStatePause::RespPlaySongHeadL(TInt aResult)
	{
	if (KErrNone != aResult)
		{//堎忢廔椆帪

		// 枹張棟忬懺偵偡傞丅
		iView->iProc = ESmbMusicAPMainPlayerPlayProcNone;
		iView->iCancelAction = EFalse;
		}
	else
		{//惓忢廔椆帪

		// 嬋憲傝曐棷悢丄嬋栠偟曐棷悢偺僠僃僢僋
		if (iView->iPauseWaiting != EFalse)
			{
			// 摢弌偟拞偵掆巭僉乕偑墴偝傟偨
			iView->iPauseWaiting = EFalse;
			ClearSkipHoldCount();
			}
		else if (CheckHoldCount() != EFalse)
			{
			// 嬋憲傝枖偼嬋栠偟偑峴傢傟偨
			return;
			}
		
		iView->iDrawer->SetPlayTimeL(0, EFalse);		// 嵞惗宱夁帪娫偵0傪僙僢僩偡傞丅
		iView->iDrawer->DrawStopPictureL(EFalse);
		
		iView->iProc = ESmbMusicAPMainPlayerPlayProcNone;
		iView->iCancelAction = EFalse;
		}
	}



//==============================================================================================
//
//  嵞惗宯僀儀儞僩張棟娭楢儊僜僢僪
//
//
//==============================================================================================
/**
 * 嵞惗奐巒捠抦張棟\n
 *   捠抦偝傟偨嵞惗奐巒嬋偺嬋忣曬傪庢摼偟偰丄嵞惗拞夋柺傪昞帵偡傞丅
 *
 * Y: public
 *
 */
void CSmbMusicAPMainPlayerStatePause::NotifyStartPlayL()
	{
	
// (ADD-START 2007/08/31 SEMC 媑壀)
// 嬋帪娫僇僂儞僩僞僀儅傪嵞昤夋偡傞僼儔僌傪棫偰傞
	iView->iDrawer->SetIsSongTimerTmpStop(EFalse);
// (ADD-END)
	//嵞惗帪娫庢摼儕僩儔僀梡僞僀儅偺儕僙僢僩
	delete iView->iPeriodicTime;
	iView->iPeriodicTime = NULL;

	// 奺庬忬懺僼儔僌傪儕僙僢僩
	ResetAnyStatusFlags();

	if (EFalse != iView->iLowBattery)
		{// 掅揹埑偵傛傞掆巭梫媮傪庴偗晅偗偰偄傞応崌
		

⌨️ 快捷键说明

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