📄 smbmusicapsyncservermodel.cpp
字号:
case KPGSOMtpModeStatusUidValue: // MTP儌乕僪堏峴忣曬
CheckMtpModeL(); // MTP儌乕僪忬懺僠僃僢僋
break;
// ADD-E [D_82400006419] MTP儌乕僪曄峏張棟偑嶍彍偝傟偰偄偨偺偱暅妶丒張棟捛壛
// ADD-S 婜尷愗傟僒僽僗僋儕僾僔儑儞偺僌儗乕傾僂僩懳墳
case KPGSOMusicMWLibLicenceUpdateEventUidValue: // 僒僽僗僋儕僾僔儑儞尃棙忣曬峏怴捠抦
DeleteCacheItemL(); // 傾僀僥儉僉儍僢僔儏傪攋婞偟傑偡
break;
// MODIFY-S [D_82400014107]婜尷愗傟僒僽僗僋儕僾僔儑儞僌儗乕傾僂僩懳墳(娔帇PA曄峏)
case KPGSOMusicMWRtcInfoUidValue: // MusicMW梡RTC忣曬
DeleteCacheItemL(); // 傾僀僥儉僉儍僢僔儏傪攋婞偟傑偡
break;
// MODIFY-E [D_82400014107]婜尷愗傟僒僽僗僋儕僾僔儑儞僌儗乕傾僂僩懳墳(娔帇PA曄峏)
// ADD-E 婜尷愗傟僒僽僗僋儕僾僔儑儞偺僌儗乕傾僂僩懳墳
// ADD-E PTX824 k3-sugimoto
default:
break;
}
/** PA曄峏捠抦梫媮 */
aWatcher.RequestNotifyEventL();
}
/**
奜晹儊儌儕儅僂儞僩姰椆捠抦
* @param[in] aType丗儊儌儕庬暿
* @return 側偟
*/
void CSmbMusicAPSyncServerModel::NotifyMountedExtMemL(CSmbExtMemWatcher::TType aType)
{
TInt log = EMusicAPSyncServerClassNumber01 | EMusicAPSyncServerLocationNumber01;
_LIT(KSyncServerModel01, "SyncServerModel::NotifyMountedExtMemL Type = %d");
SmbMusicAPSyncServerLog(iLog, log, ELogLevelLowest, KSyncServerModel01, aType);
//@@TRK9519,9520懳墳 Start
//儊儌儕忬懺偺Temp
// TSmbMusicAPSyncServerExtMemState memState = iExtMemState;
TInt memState = iExtMemState;
//奜晹儊儌儕忬懺曄壔乮憓擖傪専弌乯
SetExtMemState(aType, ETrue);
if(iExtMemState != memState)
{
//儊儌儕忬懺曄峏僐儅儞僪敪峴
// SendExtMemCommand(memState);
SendExtMemCommand(aType, ETrue);
}
//@@TRK9519,9520懳墳 End
}
/**
奜晹儊儌儕儅僂儞僩奐巒捠抦
* @param[in] aType丗儊儌儕庬暿
* @return 側偟
*/
void CSmbMusicAPSyncServerModel::NotifyMountingExtMemL(CSmbExtMemWatcher::TType aType)
{
TInt log = EMusicAPSyncServerClassNumber01 | EMusicAPSyncServerLocationNumber02;
_LIT(KSyncServerModel02, "SyncServerModel::NotifyMountingExtMemL type = %d");
SmbMusicAPSyncServerLog(iLog, log, ELogLevelLowest, KSyncServerModel02, aType);
//@@TRK9519,9520懳墳 Start
//儊儌儕忬懺偺Temp
// TSmbMusicAPSyncServerExtMemState memState = iExtMemState;
TInt memState = iExtMemState;
//奜晹儊儌儕忬懺曄壔乮憓擖傪専弌乯
SetExtMemState(aType, ETrue);
if(iExtMemState != memState)
{
//儊儌儕忬懺曄峏僐儅儞僪敪峴
SendExtMemCommand(aType, ETrue);
}
//@@TRK9519,9520懳墳 End
}
/**
奜晹儊儌儕傾儞儅僂儞僩姰椆捠抦
* @param[in] aType丗儊儌儕庬暿
* @return 側偟
*/
void CSmbMusicAPSyncServerModel::NotifyUnMountedExtMemL(CSmbExtMemWatcher::TType aType )
{
TInt log = EMusicAPSyncServerClassNumber01 | EMusicAPSyncServerLocationNumber03;
_LIT(KSyncServerModel03, "SyncServerModel::NotifyUnMountedExtMemL type = %d");
SmbMusicAPSyncServerLog(iLog, log, ELogLevelLowest, KSyncServerModel03, aType);
//@@TRK9519,9520懳墳 Start
//儊儌儕忬懺偺Temp
// TSmbMusicAPSyncServerExtMemState memState = iExtMemState;
TInt memState = iExtMemState;
// iExtMemState = ESmbMsuicAPSyncServerExtMemNone;
//奜晹儊儌儕忬懺曄壔乮敳嫀傪専弌乯
SetExtMemState(aType, EFalse);
// //奜晹儊儌儕忬懺偺庢摼
// CSmbExtMemWatcher::TType type;
// type = iMemWatcher->CardTypeL(iPropAgent);
//奜晹儊儌儕忬懺曄壔
// SetExtMemState(type);
if(iExtMemState != memState)
{
//儊儌儕忬懺曄峏僐儅儞僪敪峴
SendExtMemCommand(aType, EFalse);
}
//@@TRK9519,9520懳墳 End
}
/**
奜晹儊儌儕僄儔乕捠抦
* @param[in] aType丗儊儌儕庬暿
* @return 側偟
*/
void CSmbMusicAPSyncServerModel::NotifyErrorExtMemL(CSmbExtMemWatcher::TType aType, TInt aError )
{
TInt log = EMusicAPSyncServerClassNumber01 | EMusicAPSyncServerLocationNumber04;
_LIT(KSyncServerModel04, "SyncServerModel::NotifyErrorExtMemL type = %d, Error = %d");
SmbMusicAPSyncServerLog(iLog, log, ELogLevelLowest, KSyncServerModel04, aType, aError);
//@@TRK9519,9520懳墳 Start
//儊儌儕乕儅僂儞僩僄儔乕偼壗傕偟傑偣傫乮敳嫀専弌偵偼側傝傑偣傫乯
// //儊儌儕忬懺偺Temp
// TSmbMusicAPSyncServerExtMemState memState = iExtMemState;
// //奜晹儊儌儕忬懺曄壔
// //奜晹儊儌儕忬懺偺庢摼
// CSmbExtMemWatcher::TType type;
// type = iMemWatcher->CardTypeL(iPropAgent);
// //奜晹儊儌儕忬懺愝掕
// SetExtMemState(type, );
//
// SetExtMemState(aType);
// //儊儌儕僄儔乕帪偼奜晹儊儌儕側偟忬懺偵偡傞
// iExtMemState = ESmbMsuicAPSyncServerExtMemNone;
// if(iExtMemState != memState)
// {
// //儊儌儕忬懺曄峏僐儅儞僪敪峴
// SendExtMemCommand(memState);
// }
//@@TRK9519,9520懳墳 End
}
/**
Iterator僴儞僪儖仺Index傊偺曄姺梫媮
* @param aIHandle Iterator僴儞僪儖
* @return 巜掕偝傟偨Iterator僴儞僪儖偵懳墳偡傞Index
* @panic 240000 index偑晄惓
*/
TInt CSmbMusicAPSyncServerModel::IsIndexFromIHandle(TInt aIHandle)
{
TSmbMusicAPSyncServerInternalCommandPkg commandPkg;
TInt index(-1);
commandPkg.iCommand = ESmbMsuicAPSyncServerIndexFromIHandle;
commandPkg.iParam.iIndexFromIHandle.iIteratorHandle = aIHandle;
commandPkg.iParam.iIndexFromIHandle.iIndex = &index;
//Iterator僴儞僪儖偐傜Index傊偺曄姺梫媮僐儅儞僪傪敪峴偡傞
iDispatcher->CommandL(commandPkg);
if (index < 0)
{
TInt log = EMusicAPSyncServerClassNumber01 | EMusicAPSyncServerLocationNumber05;
_LIT(KSyncServerModel05, "SyncServerModel::IsIndexFromIHandle index is illegal = %d");
SmbMusicAPSyncServerLog(iLog, log, ELogLevelHighest, KSyncServerModel05, index);
PANIC(ESmbMusicAPSyncServerPanicNumber00);
}
return index;
}
/**
Index仺Iterator僴儞僪儖傊偺曄姺梫媮
* @param aIndex Index
* @param aListHandle 儕僗僩僴儞僪儖
* @return 巜掕偝傟偨Index偵懳墳偡傞Iterator僴儞僪儖
* @panic 240001 iteratorhandle偑晄惓
*/
TInt CSmbMusicAPSyncServerModel::IsHandleFromIndex(TInt aIndex, TInt aListHandle)
{
TSmbMusicAPSyncServerInternalCommandPkg commandPkg;
TInt itemHandle(NULL);
commandPkg.iCommand = ESmbMsuicAPSyncServerHandleFromIndex;
commandPkg.iParam.iHandleFromIndex.iListHandle = aListHandle;
commandPkg.iParam.iHandleFromIndex.iIndex = aIndex;
commandPkg.iParam.iHandleFromIndex.iItemHandle = &itemHandle;
//Index偐傜Iterator僴儞僪儖傊偺曄姺梫媮僐儅儞僪傪敪峴偡傞
iDispatcher->CommandL(commandPkg);
if (itemHandle == NULL)
{
TInt log = EMusicAPSyncServerClassNumber01 | EMusicAPSyncServerLocationNumber06;
_LIT(KSyncServerModel06, "SyncServerModel::IsHandleFromIndex IteratorHandle is null");
SmbMusicAPSyncServerLog(iLog, log, ELogLevelHighest, KSyncServerModel06);
PANIC(ESmbMusicAPSyncServerPanicNumber01);
}
return itemHandle;
}
/**
奜晹儊儌儕忬懺偺栤偄崌傢偣
* @param 側偟
* @return 奜晹儊儌儕忬懺
*/
//TSmbMusicAPSyncServerExtMemState CSmbMusicAPSyncServerModel::CheckExtMem()
// {
// return iExtMemState;
// }
/**
奜晹儊儌儕忬懺偺愝掕
* @param [in] aType 奜晹儊儌儕忬懺
* @param [in] aAvailabule ETrue丗桳岠/EFalse丗柍岠
* @return 側偟
*/
//@@TRK9519,9520懳墳 Start
void CSmbMusicAPSyncServerModel::SetExtMemState(CSmbExtMemWatcher::TType aType, TBool aAvailable)
{
switch(aType)
{
//MS偵曄壔偑偁偭偨応崌
case CSmbExtMemWatcher::EMs:
if(EFalse != aAvailable)
{
//MS傪憓擖
iExtMemState = iExtMemState | aType;
}
else
{
//MS傪敳嫀傞
if(iExtMemState | aType)
{
iExtMemState = iExtMemState - aType;
}
}
break;
//SD憓擖忬懺
case CSmbExtMemWatcher::ESd:
if(EFalse != aAvailable)
{
//MS傪憓擖
iExtMemState = iExtMemState | aType;
}
else
{
//MS傪敳嫀傞
if(iExtMemState | aType)
{
iExtMemState = iExtMemState - aType;
}
}
break;
//MassStorage忬懺
case CSmbExtMemWatcher::EMass:
if(EFalse != aAvailable)
{
//MS傪憓擖
iExtMemState = iExtMemState | aType;
}
else
{
//MS傪敳嫀傞
if(iExtMemState | aType)
{
iExtMemState = iExtMemState - aType;
}
}
break;
//奜晹儊儌儕側偟忬懺
case CSmbExtMemWatcher::ENone:
// iExtMemState = ESmbMsuicAPSyncServerExtMemNone;
break;
default:
//偲傝偁偊偢奜晹儊儌儕側偟忬懺偵偡傞
iExtMemState = ESmbMsuicAPSyncServerExtMemNone;
// 儘僌弌椡
TInt log = EMusicAPSyncServerClassNumber01 | EMusicAPSyncServerLocationNumber07;
_LIT(KSyncServerModel07, "SyncServerModel::SetExtMemState = %d");
SmbMusicAPSyncServerLog(iLog, log, ELogLevelHighest, KSyncServerModel07, aType);
break;
}
//@@TRK9519,9520懳墳 End
}
/**
専嶕梡偺嵞惗夞悢傪峏怴偡傞
* @param [in] aListHandle 儕僗僩僴儞僪儖
* @param [in] aIndex Index
* @return 側偟
*/
void CSmbMusicAPSyncServerModel::IncrementPlaySongTimes(TInt aListHandle, TInt aIndex)
{
TSmbMusicAPSyncServerInternalCommandPkg commandPkg;
commandPkg.iCommand = ESmbMsuicAPSyncServerIncrementPlaySongTimes;
commandPkg.iParam.iIncrementPlaySongTimes.iListHandle = aListHandle;
commandPkg.iParam.iIncrementPlaySongTimes.iIndex = aIndex;
iDispatcher->CommandL(commandPkg);
}
/**
儅僫乕儌乕僪偺忬懺傪挷傋傞
* @param [in] 側偟
* @return 側偟
*/
void CSmbMusicAPSyncServerModel::CheckMannerMode()
{
// 儅僫乕儌乕僪傪尒傑偡
DCM_NAMESPACE::TPGMannerMode mannerMode;
DCM_NAMESPACE::PGPropAgentMannerMode::GetDataL(iPropAgent, mannerMode);
// 儅僫乕儌乕僪偑愝掕拞偐
if (DCM_NAMESPACE::EPGMannerModeOn == mannerMode.iMannerModeSetting)
{
// 儅僫乕儌乕僪ON忬懺
iLineOutState.iMannerMode = ETrue;
//TRK8572 DEL-S 暯壀
// //儅僫乕儌乕僪偺庬暿傪妋擣
// if(DCM_NAMESPACE::EPGMannerTypeManner == mannerMode.iMannerModeType)
// {
// // 儅僫乕儌乕僪ON忬懺
// iLineOutState.iMannerMode = ETrue;
// }
// else
// {
// //僒僀儗儞僩儌乕僪丄僆儕僕僫儖儅僫乕儌乕僪偺応崌偼
// // 儅僫乕儌乕僪OFF忬懺
// iLineOutState.iMannerMode = EFalse;
// }
//TRK8572 DEL-E
}
else
{
// 儅僫乕儌乕僪OFF忬懺
iLineOutState.iMannerMode = EFalse;
//TRK10338 ADD-S 娵壀
//儅僫乕儌乕僪夝彍帪偵偼儅僫乕儌乕僪妋擣僼儔僌傪OFF偵偡傞
iLineOutState.iPlayWithManner = EFalse;
//TRK10338 ADD-S 娵壀
}
}
/**
奜晹婡婍乮僀儎僼僅儞乯偺忬懺傪挷傋傞
* @param [in] 側偟
* @return 側偟
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -