📄 smbmusicapsyncservercontentsserviceincrementplaysongtimes.cpp
字号:
{
TUint32 logCode = EMusicAPSyncServerClassNumber_ContentsServiceIncrementPlaySongTime|EMusicAPSyncServerLocationNumber07;
_LIT(KContentsServiceIncrementPlaySongTime07, "SyncServerContentsServiceIncrementPlaySongTimes::ContinueServiceL() Invalid State %d");
SmbMusicAPSyncServerLog(iRLog, logCode, ELogLevelHigh, KContentsServiceIncrementPlaySongTime07, iServiceState);
// 僒乕價僗傪僄儔乕偱姰椆偡傞
CompleteErr();
}
break;
}
return ret;
}
/**
* 旕摨婜墳摎僄儔乕偺張棟傪峴偆
* @param[in] aError 僄儔乕僐乕僪
* @return 僒乕價僗張棟忬懺
**/
TSmbMusicAPSyncServerContentsServiceState CSmbMusicAPSyncServerContentsServiceIncrementPlaySongTimes::ServiceErr(TInt aError)
{
TUint32 logCode = EMusicAPSyncServerClassNumber_ContentsServiceIncrementPlaySongTime|EMusicAPSyncServerLocationNumber08;
_LIT(KContentsServiceIncrementPlaySongTime08, "SyncServerContentsServiceIncrementPlaySongTimes::ServiceErr() State:%d Error:%d");
SmbMusicAPSyncServerLog(iRLog, logCode, ELogLevelHigh, KContentsServiceIncrementPlaySongTime08, iServiceState, aError);
// ADD-S [D_82400004466]僄儔乕帪傕張棟宲懕偡傞傛偆廋惓
switch(iServiceState)
{
case ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateWaitItem: // 僒乕價僗傾僀僥儉庢摼懸偪
break;
case ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateWaitUpdatePlayReport: // 僒乕價僗傾僀僥儉棙梡棜楌峏怴懸偪
// 嵞惗夞悢峏怴(傛偔挳偔50審梡)
return IncrementPlayCount();
// break;
case ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateWaitUpdateCount: // 僒乕價僗傾僀僥儉嵞惗夞悢峏怴懸偪
// 嵟廔嵞惗擔峏怴(嵟嬤挳偄偨50審梡)
return UpdateLastPlayTime();
// break;
case ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateWaitUpdateDate: // 僒乕價僗傾僀僥儉嵞惗擔帪峏怴懸偪
Complete();
return ESmbMusicAPSyncServerContetnsServiceStateEnd;
// break;
default:
{
TUint32 logCode = EMusicAPSyncServerClassNumber_ContentsServiceIncrementPlaySongTime|EMusicAPSyncServerLocationNumber09;
_LIT(KContentsServiceIncrementPlaySongTime09, "SyncServerContentsServiceIncrementPlaySongTimes::ContinueServiceL() Invalid State %d");
SmbMusicAPSyncServerLog(iRLog, logCode, ELogLevelHigh, KContentsServiceIncrementPlaySongTime09, iServiceState);
}
break;
}
// ADD-E [D_82400004466]僄儔乕帪傕張棟宲懕偡傞傛偆廋惓
// 僒乕價僗傪僄儔乕偱姰椆偡傞
CompleteErr();
return ESmbMusicAPSyncServerContetnsServiceStateErr;
}
/**
* 僒乕價僗偺僉儍儞僙儖張棟傪峴偆
**/
void CSmbMusicAPSyncServerContentsServiceIncrementPlaySongTimes::CancelService()
{
#ifdef __SMBMUSICAPSYNCSERVER_ENABLEALLLOG__
TUint32 logCode = EMusicAPSyncServerClassNumber_ContentsServiceIncrementPlaySongTime|EMusicAPSyncServerLocationNumber10;
_LIT(KContentsServiceIncrementPlaySongTime10, "SyncServerContentsServiceIncrementPlaySongTimes::CancelService() state:%d");
SmbMusicAPSyncServerLog(iRLog, logCode, ELogLevelLowest, KContentsServiceIncrementPlaySongTime10, iServiceState);
#endif
switch(iServiceState)
{
case ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateWaitItem: // 僒乕價僗傾僀僥儉庢摼懸偪
iList->CancelCreateNewItem();
CompleteErr();
break;
case ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateWaitUpdatePlayReport: // 僒乕價僗傾僀僥儉棙梡棜楌峏怴懸偪
#ifndef __SMBMUSICAPSYNCSERVER_ENABLE_PTX810__
iTempSongItem->CancelRecordPlayReport();
#endif // __SMBMUSICAPSYNCSERVER_ENABLE_PTX810__
CompleteErr();
break;
case ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateWaitUpdateCount: // 僒乕價僗傾僀僥儉嵞惗夞悢峏怴懸偪
iTempSongItem->CancelIncrementPlayCount();
CompleteErr();
break;
case ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateWaitUpdateDate: // 僒乕價僗傾僀僥儉嵞惗擔帪峏怴懸偪
iTempSongItem->CancelUpdateLastPlayTime();
CompleteErr();
break;
default:
// 壗傕偟側偄
break;
}
Cancel();
}
/**
* 僒乕價僗傪惓忢偵姰椆偡傞
**/
void CSmbMusicAPSyncServerContentsServiceIncrementPlaySongTimes::Complete()
{
iServiceState = ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateEnd;
//// DEL-S [D_82400015202]390MHz傪傗傔傞曽岦偱廋惓
// // 廔椆偟偨傜CPU懍搙傪僨僼僅儖僩偵栠偡
// iLauncherSession.ControlCPUSpeed(DCM_NAMESPACE::ELaCpuSpeedDefault);
//// DEL-E [D_82400015202]390MHz傪傗傔傞曽岦偱廋惓
}
/**
* 僒乕價僗傪僄儔乕偱姰椆偡傞
**/
void CSmbMusicAPSyncServerContentsServiceIncrementPlaySongTimes::CompleteErr()
{
iServiceState = ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateEnd;
//// DEL-S [D_82400015202]390MHz傪傗傔傞曽岦偱廋惓
// // 廔椆偟偨傜CPU懍搙傪僨僼僅儖僩偵栠偡
// iLauncherSession.ControlCPUSpeed(DCM_NAMESPACE::ELaCpuSpeedDefault);
//// DEL-E [D_82400015202]390MHz傪傗傔傞曽岦偱廋惓
}
// ADD-S [D_82400004466]僄儔乕帪傕張棟宲懕偡傞傛偆廋惓
/**
* 僒僽僗僋儕僾僔儑儞梡嵞惗夞悢峏怴丒壒妝棙梡棜楌忣曬偺婰榐
*
* @return 張棟宲懕忬懺
**/
TSmbMusicAPSyncServerContentsServiceState CSmbMusicAPSyncServerContentsServiceIncrementPlaySongTimes::RecordPlayReport()
{
ASSERT(iTempSongItem != NULL);
// 僒僽僗僋儕僾僔儑儞梡嵞惗夞悢峏怴 & 壒妝棙梡棜楌忣曬偺婰榐
TUint pattern = (ESmbMusicMWLibRecordPlayReportPatternPlayCount | ESmbMusicMWLibRecordPlayReportPatternPlayHistory);
TInt result = iTempSongItem->RecordPlayReport(pattern, iStatus);
// 僒乕價僗僋儔僗傪傾僋僥傿僽偵偡傞
Start();
// 傾僀僥儉棙梡棜楌峏怴懸偪忬懺偵偡傞
iServiceState = ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateWaitUpdatePlayReport;
if (result != KErrNone)
{ // RecordPlayReport偑僄儔乕偩偭偨応崌
TUint32 logCode = EMusicAPSyncServerClassNumber_ContentsServiceIncrementPlaySongTime|EMusicAPSyncServerLocationNumber11;
_LIT(KContentsServiceIncrementPlaySongTime11, "SyncServerContentsServiceIncrementPlaySongTimes::RecordPlayReport() RecordPlayReport(%08x) Error = %d");
SmbMusicAPSyncServerLog(iRLog, logCode, ELogLevelHigh, KContentsServiceIncrementPlaySongTime11, pattern, result);
// 僄儔乕帪傕張棟宲懕偡傞偨傔偵帺暘偱Complete偡傞丅
TRequestStatus* status = &iStatus;
User::RequestComplete(status, result);
}
else
{
TUint32 logCode = EMusicAPSyncServerClassNumber_ContentsServiceIncrementPlaySongTime|EMusicAPSyncServerLocationNumber12;
_LIT(KContentsServiceIncrementPlaySongTime12, "SyncServerContentsServiceIncrementPlaySongTimes::RecordPlayReport() RecordPlayReport(%08x) Called");
SmbMusicAPSyncServerLog(iRLog, logCode, ELogLevelNormal, KContentsServiceIncrementPlaySongTime12, pattern);
}
// 昁偢張棟宲懕
return ESmbMusicAPSyncServerContetnsServiceStateContinue;
}
/**
* 嵞惗夞悢峏怴(傛偔挳偔50審梡)
*
* @return 張棟宲懕忬懺
**/
TSmbMusicAPSyncServerContentsServiceState CSmbMusicAPSyncServerContentsServiceIncrementPlaySongTimes::IncrementPlayCount()
{
ASSERT(iTempSongItem != NULL);
TInt result = iTempSongItem -> IncrementPlayCount(iStatus);
// 僒乕價僗僋儔僗傪傾僋僥傿僽偵偡傞
Start();
// 傾僀僥儉嵞惗夞悢峏怴懸偪偵偡傞
iServiceState = ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateWaitUpdateCount;
if (result != KErrNone)
{ // IncrementPlayCount偑僄儔乕偺応崌
TUint32 logCode = EMusicAPSyncServerClassNumber_ContentsServiceIncrementPlaySongTime|EMusicAPSyncServerLocationNumber13;
_LIT(KContentsServiceIncrementPlaySongTime13, "SyncServerContentsServiceIncrementPlaySongTimes::IncrementPlayCount() IncrementPlayCount() Error = %d");
SmbMusicAPSyncServerLog(iRLog, logCode, ELogLevelHigh, KContentsServiceIncrementPlaySongTime13, result);
// 僄儔乕帪傕張棟宲懕偡傞偨傔偵帺暘偱Complete偡傞丅
TRequestStatus* status = &iStatus;
User::RequestComplete(status, result);
}
#ifdef __SMBMUSICAPSYNCSERVER_ENABLEALLLOG__
else
{
TUint32 logCode = EMusicAPSyncServerClassNumber_ContentsServiceIncrementPlaySongTime|EMusicAPSyncServerLocationNumber14;
_LIT(KContentsServiceIncrementPlaySongTime14, "SyncServerContentsServiceIncrementPlaySongTimes::IncrementPlayCount() IncrementPlayCount() Called");
SmbMusicAPSyncServerLog(iRLog, logCode, ELogLevelLow, KContentsServiceIncrementPlaySongTime14);
}
#endif
// 昁偢張棟宲懕
return ESmbMusicAPSyncServerContetnsServiceStateContinue;
}
/**
* 嵟廔嵞惗擔峏怴(嵟嬤挳偄偨50審梡)
*
* @return 張棟宲懕忬懺
**/
TSmbMusicAPSyncServerContentsServiceState CSmbMusicAPSyncServerContentsServiceIncrementPlaySongTimes::UpdateLastPlayTime()
{
ASSERT(iTempSongItem != NULL);
TInt result = iTempSongItem -> UpdateLastPlayTime(iStatus);
// 僒乕價僗僋儔僗傪傾僋僥傿僽偵偡傞
Start();
// 傾僀僥儉嵞惗擔帪峏怴懸偪忬懺偵偡傞
iServiceState = ESmbMusicAPSyncServerContentsServiceIncrementPlaySongTimesStateWaitUpdateDate;
if (result != KErrNone)
{ // UpdateLastPlayTime偑僄儔乕偺応崌
TUint32 logCode = EMusicAPSyncServerClassNumber_ContentsServiceIncrementPlaySongTime|EMusicAPSyncServerLocationNumber15;
_LIT(KContentsServiceIncrementPlaySongTime15, "SyncServerContentsServiceIncrementPlaySongTimes::UpdateLastPlayTime() UpdateLastPlayTime() Error = %d");
SmbMusicAPSyncServerLog(iRLog, logCode, ELogLevelHigh, KContentsServiceIncrementPlaySongTime15, result);
// 僄儔乕帪傕張棟宲懕偡傞偨傔偵帺暘偱Complete偡傞丅
TRequestStatus* status = &iStatus;
User::RequestComplete(status, result);
}
#ifdef __SMBMUSICAPSYNCSERVER_ENABLEALLLOG__
else
{
TUint32 logCode = EMusicAPSyncServerClassNumber_ContentsServiceIncrementPlaySongTime|EMusicAPSyncServerLocationNumber16;
_LIT(KContentsServiceIncrementPlaySongTime16, "SyncServerContentsServiceIncrementPlaySongTimes::UpdateLastPlayTime() UpdateLastPlayTime() Called");
SmbMusicAPSyncServerLog(iRLog, logCode, ELogLevelNormal, KContentsServiceIncrementPlaySongTime16);
}
#endif // __SMBMUSICAPSYNCSERVER_ENABLEALLLOG__
// 昁偢張棟宲懕
return ESmbMusicAPSyncServerContetnsServiceStateContinue;
}
// ADD-E [D_82400004466]僄儔乕帪傕張棟宲懕偡傞傛偆廋惓
// ADD-S [D_82400004466][D_82400004710] 僉儍儞僙儖晄壜側僒乕價僗偵懳墳
/**
* 僉儍儞僙儖弌棃側偄僒乕價僗偐偳偆偐偺敾掕
*
* @return 敾掕寢壥(EFalse:僉儍儞僙儖壜擻丄ETrue:僉儍儞僙儖晄壜)
**/
TBool CSmbMusicAPSyncServerContentsServiceIncrementPlaySongTimes::DisableCancelService()
{
// 杮僒乕價僗偼僉儍儞僙儖傪峴傢側偄偙偲偲偡傞丅
return ETrue;
}
// ADD-E [D_82400004466][D_82400004710] 僉儍儞僙儖晄壜側僒乕價僗偵懳墳
// end of CSmbMusicAPSyncServerContentsServiceIncrementPlaySongTimes.cpp
/* Copyright (C) 2006 Sony Ericsson Mobile Communications Japan, Inc. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -