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

📄 smbmusicapsingleplayersonginfo.cpp

📁 symbian代码
💻 CPP
字号:
/*----------------------------------------------------------------------------*/
// Copyright (c) 2004 Sony Ericsson Mobile Communications Japan, Inc.
// All rights reserved.
/*----------------------------------------------------------------------------*/
// FileName:
//  SmbMusicAPSinglePlayerSongInfo.cpp
//   
// Description:
//	嵞惗拞忣曬庢摼僋儔僗(AO)
//
// Modify:
//	2006-08-17	RunL偺僄儔乕抣傪丄昡壙偟側偄傛偆曄峏
//	2006-07-18	僄儔乕張棟捛壛	K3Hirono
//
//	2007-02-01	PTX824Start
//	2007-07-03	D_82400005096(徻嵶忣曬曇廤帪偺忣曬嵞庢摼偵娭偡傞晄旛)廋惓
/*------------------------------------------------------------------------*/
// $NoKeywords: $

#ifndef SMBMUSICAPSINGLEPLAYERSONGINFO_H_
#include "SmbMusicAPSinglePlayerSongInfo.h"	//	堦嬋嵞惗僾儗僀儎乕嵞惗忣曬庢摼僋儔僗
#endif	//SMBMUSICAPSINGLEPLAYERSONGINFO_H_

#ifndef SMBMUSICAPSINGLEPLAYERMODEL_H_
#include "SmbMusicAPSinglePlayerModel.h"	//	堦嬋嵞惗僾儗僀儎乕model僋儔僗
#endif //SMBMUSICAPSINGLEPLAYERMODEL_H_

#ifndef __SMBMUSICMWLIBCLIENT_H__
#include <SmbMusicMWLibClient.h>	//	MW僾儗僀儎乕惂屼儔僀僽儔儕
#endif //__SMBMUSICMWLIBCLIENT_H__

#ifndef SMBMUSICAPSINGLEPLAYERLOG_H_
#include "SmbMusicAPSinglePlayerLog.h"	//	儘僌
#endif	//SMBMUSICAPSINGLEPLAYERLOG_H_

SEMCJ_NAMESPACE_BEGIN

#if defined(_DEBUG)
_LIT(KPanicCategory, "SMBMUSICSINGLEPLAYERSONGINFO");
#endif

_LIT(KSongInfo, "SmbMusicAPSinglePlayerSongInfo");

/**
 * 僐儞僗僩儔僋僞
 *
 * @param[in] aSongItem 嬋傾僀僥儉
 * @param[in] aModel 堦嬋嵞惗僾儗僀儎乕儌僨儖
 */
CSmbMusicAPSinglePlayerSongInfo::CSmbMusicAPSinglePlayerSongInfo(CSmbMusicMWLibSongItem* aSongItem	,
 								CSmbMusicAPSinglePlayerModel* aModel)
	: CActive(EPriorityStandard),
	 iSongItem(aSongItem),
	 iModel(aModel)
	{
	__ASSERT_DEBUG(aSongItem != NULL, 
					User::Panic(KPanicCategory, EInvalidArgument));
	__ASSERT_DEBUG(aModel != NULL, 
					User::Panic(KPanicCategory, EInvalidArgument));
	CActiveScheduler::Add(this);
	}

/**
 *	僨僗僩儔僋僞
 *
 *	@param	側偟
 */
CSmbMusicAPSinglePlayerSongInfo::~CSmbMusicAPSinglePlayerSongInfo()
	{
	Cancel();
	}


/**
 * 僼傽僋僩儕娭悢
 *
 * @param aSongItem 嬋傾僀僥儉
 * @param aModel 堦嬋嵞惗僾儗僀儎乕儌僨儖
 * @return CSmbMusicAPSinglePlayerSongInfo偺僀儞僗僞儞僗
 */
CSmbMusicAPSinglePlayerSongInfo*  CSmbMusicAPSinglePlayerSongInfo::NewL(CSmbMusicMWLibSongItem* aSongItem,
									CSmbMusicAPSinglePlayerModel* aModel)
	{
	CSmbMusicAPSinglePlayerSongInfo* self = new(ELeave) CSmbMusicAPSinglePlayerSongInfo(aSongItem	, aModel);
	return self;
	}

/**
 * 昞帵梡嬋忣曬庢摼
 *
 * @param[out] 昞帵梡嬋忣曬庢摼
 */
void CSmbMusicAPSinglePlayerSongInfo::DispSongInfoL(CSmbMusicMWLibPlayingDispInfo& aDispInformation)
	{
	__ASSERT_DEBUG(&aDispInformation != NULL, 
					User::Panic(KPanicCategory, EInvalidArgument));

	//ADD-S D_82400005096
	TInt err = iSongItem->Update();
	if(KErrNone != err)
		{
		SmbMusicAPSinglePlayerLog::OutputLog(KSongInfo, ESongInfo, ELogLevelHigh,_L("DispSongInfoL Update Err:%d"), err);
		User::Leave(err);
		}
	//ADD-E D_82400005096
		
	TInt ret = iSongItem->PlayingDispInformation(aDispInformation, iStatus);

	if(KErrNone == ret)
		{
		SetActive();
		}
	else if(KErrNotReady != ret && KErrArgument != ret)
		{
		SmbMusicAPSinglePlayerLog::OutputLog(KSongInfo, ESongInfo, ELogLevelHigh,_L("DispSongInfoL Err:%d"), ret);
		User::Leave(ret);
		}
	//	aDispInformation偵婛偵忣曬偑奿擺偝傟偰偄偨応崌偼丄KErrArgument偑曉傞

	}

/**
 *	旕摨婜張棟廔椆屻
 *
 *	@param	側偟
 *	@return void
 */
void CSmbMusicAPSinglePlayerSongInfo::RunL()
	{
	TInt ret = iStatus.Int();

	if(KErrNone != ret)
		{
		SmbMusicAPSinglePlayerLog::OutputLog(KSongInfo, ESongInfo, ELogLevelNormal,_L("DispSongInfo(RunL) Err:%d"), ret);		
		}
	iModel->DispSongInfoCompleteL();
	}

/**
 *	旕摨婜梫媮僉儍儞僙儖張棟
 *	
 *	@param	側偟
 *	@return void
 */
void CSmbMusicAPSinglePlayerSongInfo::DoCancel()
	{
	iSongItem->CancelGetInfo();
	}

SEMCJ_NAMESPACE_END
// end of SmbMusicAPSinglePlayerSongInfo.cpp
/* Copyright (C) 2007 Sony Ericsson Mobile Communications Japan, Inc. */

⌨️ 快捷键说明

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