📄 smbmusicapsonginfocreateapiitem.cpp
字号:
/* Copyright (C) 2006 Sony Ericsson Mobile Communications Japan, Inc. */
/*-------------------------------------------------------------------------*/
// FileName:
// SmbMusicAPSongInfoCreateAPIItem.cpp
//
// Description:
// 儈儏乕僕僢僋梡徻嵶忣曬昞帵嬋傾僀僥儉惗惉梡傾僋僥傿僽僆僽僕僃僋僩僋儔僗
/*-------------------------------------------------------------------------*/
//曄峏棜楌
//擔晅 |曄峏幰 |撪梕
//---------------------------------------------------------------------------
//2006/04/17 |SEMCJ嬥岝 |怴婯嶌惉
//2006/10/25 |SEMCJ憊 |屇傃弌偡旕摨婜梫媮娭悢偺摨婜栠傝抣偑堎忢偺応崌偼丄偦偺捈屻偵SetActive()傪屇偽側偄傛偆偵廋惓偡傞(i-keeper TRK No.12070懳墳)
#include "SmbMusicAPSongInfoCreateAPIItem.h"
USING_NAMESPACE_SEMCJ
///////////////////////////////////////////////////////////////////////////////
/**
* 僐儞僗僩儔僋僞
*
* @param[in] aSession MW儔僀僽儔儕偲偺僙僢僔儑儞
* @param[in] aModel 儈儏乕僕僢僋梡徻嵶忣曬昞帵儌僨儖僋儔僗
* @param[in] aLog 儘僌僒乕僶偺僙僢僔儑儞
*/
CSmbMusicAPSongInfoCreateAPIItem::CSmbMusicAPSongInfoCreateAPIItem(RSmbMusicMWLibSession& aSession, CSmbMusicAPSongInfoModel& aModel, RLog& aLog)
:CActive(EPriorityStandard), iSession(aSession), iModel(aModel), iLog(aLog)
{
//帺恎傪傾僋僥傿僽僗働僕儏乕儔偵捛壛偡傞
CActiveScheduler::Add(this);
}
/**
* 僨僗僩儔僋僞
*/
CSmbMusicAPSongInfoCreateAPIItem::~CSmbMusicAPSongInfoCreateAPIItem()
{
//梫媮傪僉儍儞僙儖偡傞
Cancel();
}
/**
* API奐巒梫媮
*
* @param[in] aSongId 嬋ID
* @param[out] aSongItem 嬋傾僀僥儉
* @return 僄儔乕張棟
*/
TInt CSmbMusicAPSongInfoCreateAPIItem::Start(TUint64 aSongId, CSmbMusicMWLibSongItem& aSongItem)
{
//嬋傾僀僥儉偺惗惉傪奐巒偡傞
TInt result = iSession.CreateSongItem(aSongId, aSongItem, iStatus);
//CHG-S 憊 TRK12070
//惓忢偱偁傟偽丄帺恎傪傾僋僥傿僽偵愝掕偡傞
if(KErrNone == result || KErrArgument == result)
{
SetActive();
}
//堷悢aSongItem偵婛偵僴儞僪儖偑彂偒崬傑傟偰偄傞働乕僗(KErrArgument)傪嫋梕偡傞
if(KErrArgument == result)
{
TRequestStatus *pstat = &iStatus;
User::RequestComplete(pstat,KErrNone);
return KErrNone;
}
//CHG-E
return result;
}
/**
* 梫媮僀儀儞僩僴儞僪儔
*/
void CSmbMusicAPSongInfoCreateAPIItem::RunL()
{
//MODIFY-S MAEJI KErrArgument傪嫋梕
if(KErrNone != iStatus.Int())
// if((KErrNone != iStatus.Int())&&(KErrArgument != iStatus.Int()))
//MODIFY-E
{
//儘僌弌椡
SmbMusicAPSongInfoLog::OutputLog(iLog, ESongInfoLogNo063, ELogLevelHighest, iStatus.Int(), KSmbMusicAPSongInfoLogCreateSongItemCompleteErr);
//儕乕僽張棟
User::Leave(iStatus.Int());
}
//儌僨儖偵梫媮偑枮椆偟偨偙偲傪捠抦偡傞
iModel.APIRequestCompleteL(ECreateAPI);
}
/**
* 梫媮僉儍儞僙儖
*/
void CSmbMusicAPSongInfoCreateAPIItem::DoCancel()
{
//嬋傾僀僥儉惗惉傪僉儍儞僙儖偡傞
iSession.CancelCreateItem();
}
// end of SmbMusicAPSongInfoCreateAPIItem.cpp
/* Copyright (C) 2006 Sony Ericsson Mobile Communications Japan, Inc. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -