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

📄 smbmusicapsyncservercontentsserviceupdateitemavailable.cpp

📁 索爱相关代码。实现功能是server。很有参考价值。代码很难弄到。symbian。
💻 CPP
字号:
/* Copyright (C) 2006 Sony Ericsson Mobile Communications Japan, Inc. */
/*--------------------------------------------------------------------*/
// FileName:
//	SmbMusicAPSyncServerContentsServiceUpdateItemAvailable.cpp
//
// Description:
//	PTX810 Music傾僾儕 摨婜僒乕僶 僐儞僥儞僣僋儔僗
/*--------------------------------------------------------------------*/
//曄峏棜楌
//擔晅			|曄峏幰			|撪梕
//--------------+---------------+--------------------------------------
//2006/06/20	|SDNA 壀嶳			|怴婯嶌惉


#ifndef __SMBMUSICAPSYNCSERVERCONTENTSSERVICEUPDATEITEMAVAILABLE_H__
#include "SmbMusicAPSyncServerContentsServiceUpdateItemAvailable.h"
#endif

#ifndef __SMBMUSICAPSYNCSERVERUTIL_H__
#include "SmbMusicAPSyncServerUtil.h"
#endif

#ifndef __SMBMUSICAPSYNCSERVERCONTENTSLIST_H__
#include "SmbMusicAPSyncServerContentsList.h"
#endif

#ifndef __SMBMUSICAPSYNCSERVERCONTENTSITEM_H__
#include "SmbMusicAPSyncServerContentsItem.h"
#endif


USING_NAMESPACE_SEMCJ


/**
 僐儞僗僩儔僋僞
 * @param [in]		aRlog				RLog偺嶲徠
 * @param [in]		aModel				儌僨儖僋儔僗偺嶲徠
 * @param [in]		aObserver			僒乕價僗姰椆捠抦愭僋儔僗偺嶲徠
 * @param [in]		aFunc				僐儞僥儞僣僼傽儞僋儔僗偺嶲徠
 * @param [in]		aManagerInterface	奺儅僱乕僕儍傪娗棟偡傞僋儔僗偺嶲徠
 * @param [in]		aScreenData			夋柺慗堏僨乕僞娗棟僋儔僗偺嶲徠
 * @param [in,out]	aRMessage			RMessage偺億僀儞僞
 * @return								側偟
 */
CSmbMusicAPSyncServerContentsServiceUpdateItemAvailable::CSmbMusicAPSyncServerContentsServiceUpdateItemAvailable(DCM_NAMESPACE::RLog&								aRlog,
																												 CSmbMusicAPSyncServerModel& 						aModel,
																												 MSmbMusicAPSyncServerContentsAsyncObserver& 		aObserver,
																												 CSmbMusicAPSyncServerContentsFunc& 				aFunc,
																												 MSmbMusicAPSyncServerContentsManagerInterface&		aManagerInterface,
																												 CSmbMusicAPSyncServerContentsScreenTraceManager&	aScreenData,
																												 const RMessage2& 									aRMessage)
	:CSmbMusicAPSyncServerContentsServiceBase(aRlog,aModel,aObserver,aFunc,aManagerInterface,aScreenData,aRMessage,ETrue),
	iServiceState(ESmbMusicAPSyncServerContentsServiceUpdateItemAvailableState_Init)
	{
	}


/**
 僨僗僩儔僋僞
 * @param	側偟
 * @return	側偟
 */
CSmbMusicAPSyncServerContentsServiceUpdateItemAvailable::~CSmbMusicAPSyncServerContentsServiceUpdateItemAvailable()
	{
	}


/**
 僒乕價僗傪奐巒偡傞
 * @param	側偟
 * @return	僒乕價僗張棟忬懺
 */
TSmbMusicAPSyncServerContentsServiceState CSmbMusicAPSyncServerContentsServiceUpdateItemAvailable::StartServiceL()
	{
#ifdef __SMBMUSICAPSYNCSERVER_ENABLEALLLOG__
	_LIT(KContentsServiceUpdateItemAvailable00, "SyncServerContentsServiceUpdateItemAvailable::StartServiceL() ListHandle:0x%08x Index:%d ChangeItemState 0x%08x");
	SmbMusicAPSyncServerLog(iRLog,
							(EMusicAPSyncServerClassNumber_ContentsServiceUpdateItemAvailable|EMusicAPSyncServerLocationNumber00),
							ELogLevelLowest,
							KContentsServiceUpdateItemAvailable00,
							iParamListHandle,
							iParamIndex,
							iParamChangeItemState);
#endif

	if(ESmbMusicAPSyncServerContentsServiceUpdateItemAvailableState_ParamOK == iServiceState)
		{
		CSmbMusicAPSyncServerContentsList* list = iScreenData.GetList(iParamListHandle);
		if(list)
			{
			CSmbMusicAPSyncServerContentsItem* item = list->GetItem(iParamIndex);

			if(item)
				{
				ChangeAvailable(*item);
				return ESmbMusicAPSyncServerContetnsServiceStateEnd;
				}
			else
				{
				Complete();
				return ESmbMusicAPSyncServerContetnsServiceStateEnd;
				}
			}
		else
			{
			_LIT(KContentsServiceUpdateItemAvailable01, "SyncServerContentsServiceUpdateItemAvailable::StartServiceL() List Not Found %d");
			SmbMusicAPSyncServerLog(iRLog,
									(EMusicAPSyncServerClassNumber_ContentsServiceUpdateItemAvailable|EMusicAPSyncServerLocationNumber01),
									ELogLevelHigh,
									KContentsServiceUpdateItemAvailable01,
									iParamListHandle);

			CompleteErr();
			return ESmbMusicAPSyncServerContetnsServiceStateErr;
			}
		}
	else
		{
		_LIT(KContentsServiceUpdateItemAvailable02, "SyncServerContentsServiceUpdateItemAvailable::StartServiceL() Invalid State %d");
		SmbMusicAPSyncServerLog(iRLog,
								(EMusicAPSyncServerClassNumber_ContentsServiceUpdateItemAvailable|EMusicAPSyncServerLocationNumber02),
								ELogLevelHigh,
								KContentsServiceUpdateItemAvailable02,
								iServiceState);

		CompleteErr();
		return ESmbMusicAPSyncServerContetnsServiceStateErr;
		}
	}


/**
 僒乕價僗偺撪晹僐儅儞僪愝掕傪奐巒偡傞
 * @param [in]	aCommand	撪晹僐儅儞僪偺嶲徠
 * @return					側偟
 */
void CSmbMusicAPSyncServerContentsServiceUpdateItemAvailable::SetCommand(TSmbMusicAPSyncServerInternalCommandPkg& aCommand)
	{
	iParamListHandle		= aCommand.iParam.iUpdateItemAvailable.iListHandle;
	iParamIndex				= aCommand.iParam.iUpdateItemAvailable.iIndex;
	iParamChangeItemState	= aCommand.iParam.iUpdateItemAvailable.iItemState;

	if(0 < iParamIndex)
		{
		iServiceState		= ESmbMusicAPSyncServerContentsServiceUpdateItemAvailableState_ParamOK;
		}
	else
		{
		_LIT(KContentsServiceUpdateItemAvailable03, "SyncServerContentsServiceUpdateItemAvailable::SetCommand() Invalid Index %d");
		SmbMusicAPSyncServerLog(iRLog,
								(EMusicAPSyncServerClassNumber_ContentsServiceUpdateItemAvailable|EMusicAPSyncServerLocationNumber03),
								ELogLevelHigh,
								KContentsServiceUpdateItemAvailable03,
								iParamIndex);

		iServiceState		= ESmbMusicAPSyncServerContentsServiceUpdateItemAvailableState_ParamERR;
		}
	}


/**
 旕摨婜墳摎僄儔乕偺張棟傪峴偆
 * @param [in] aError	僄儔乕僐乕僪
 * @return				側偟
 */
TSmbMusicAPSyncServerContentsServiceState CSmbMusicAPSyncServerContentsServiceUpdateItemAvailable::ServiceErr(TInt aError)
	{
	_LIT(KContentsServiceUpdateItemAvailable04, "SyncServerContentsServiceUpdateItemAvailable::ServiceErr() Called %d");
	SmbMusicAPSyncServerLog(iRLog,
							(EMusicAPSyncServerClassNumber_ContentsServiceUpdateItemAvailable|EMusicAPSyncServerLocationNumber04),
							ELogLevelHigh,
							KContentsServiceUpdateItemAvailable04,
							aError);

	CompleteErr();
	return ESmbMusicAPSyncServerContetnsServiceStateErr;
	}


/**
 僒乕價僗偺僉儍儞僙儖張棟傪峴偆
 * @param	側偟
 * @return	側偟
 */
void CSmbMusicAPSyncServerContentsServiceUpdateItemAvailable::CancelService()
	{
	_LIT(KContentsServiceUpdateItemAvailable05, "SyncServerContentsServiceUpdateItemAvailable::CancelService() Called");
	SmbMusicAPSyncServerLog(iRLog,
							(EMusicAPSyncServerClassNumber_ContentsServiceUpdateItemAvailable|EMusicAPSyncServerLocationNumber05),
							ELogLevelHigh,
							KContentsServiceUpdateItemAvailable05);

	// 偙偺僒乕價僗偵僉儍儞僙儖偼側偄
	}


/**
 傾僀僥儉偺棙梡壜斲忣曬傪曄峏偡傞
 * @param [in] aItem	傾僀僥儉僋儔僗偺嶲徠
 * @return				側偟
 */
void CSmbMusicAPSyncServerContentsServiceUpdateItemAvailable::ChangeAvailable(CSmbMusicAPSyncServerContentsItem& aItem)
	{

	TInt available = aItem.GetAvailable();

	available |= iParamChangeItemState;

	aItem.SetAvailable(available);

	}


/**
 僒乕價僗傪惓忢偵姰椆偡傞
 * @param	側偟
 * @return	側偟
 */
void CSmbMusicAPSyncServerContentsServiceUpdateItemAvailable::Complete()
	{
	iServiceState = ESmbMusicAPSyncServerContentsServiceUpdateItemAvailableState_End;
	}


/**
 僒乕價僗傪僄儔乕偱姰椆偡傞
 * @param 	側偟
 * @return	側偟
 */
void CSmbMusicAPSyncServerContentsServiceUpdateItemAvailable::CompleteErr()
	{
	iServiceState = ESmbMusicAPSyncServerContentsServiceUpdateItemAvailableState_End;
	}



// end of SmbMusicAPSyncServerContentsServiceUpdateItemAvailable.cpp
/* Copyright (C) 2006 Sony Ericsson Mobile Communications Japan, Inc. */

⌨️ 快捷键说明

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