diff -r 000000000000 -r b497e44ab2fc terminalsecurity/SCP/DmEventNotifier/inc/JavaApplicationService.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/terminalsecurity/SCP/DmEventNotifier/inc/JavaApplicationService.h Thu Dec 17 09:07:52 2009 +0200 @@ -0,0 +1,106 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This header contains the class for Java (un)install service +* +*/ +#ifndef __JAVAPPLICATIONSERVICE__H_ +#define __JAVAPPLICATIONSERVICE__H_ + +// System Includes +#include +#include //Publish subscribe key +#include //Java installer +#include //Java Installer defined here +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS +#include +#else +#include +#include +#endif + +//User includes +#include "DmEventServiceBase.h" + +//The publish subscribe key with condition. Do not alter this unless absolutely needed! +const TPSKeyCondition KJavaPSKeyCondition(KUidSystemCategory,KPSUidJavaLatestInstallation, 0, TTaskSchedulerCondition::EGreaterThan); + +//The task name for this service. Do not alter this unless absolutely needed! +_LIT(KJavaTaskName, "JavaTask"); + +/** + * Derives the base service and implementes service for Java installation + * + * @since S60 v5.2 + */ +NONSHARABLE_CLASS(CJavaApplicationService) : public CDmEventServiceBase + { + + public: + + /** Two phase construction **/ + static CJavaApplicationService* CJavaApplicationService::NewL(); + + static CJavaApplicationService* CJavaApplicationService::NewLC(); + + /** Virtual destructor **/ + virtual ~CJavaApplicationService(); + + /** + * Waits until any Java operation is complete + * + * @since S60 v5.2 + * @return None. Can leave with system wide error + */ + void WaitForRequestCompleteL(); + + /** + * This functions tells if the publish subscribe key exists or not. It is called + * before registering the condition schedule. + * + * @since S60 v5.2 + * @return ETrue if exists, otherwise EFalse + */ + TBool IsKeyValid(); + + /** + * Returns the task name of the service, which should be unique in this application. + * + * @since S60 v5.2 + * @return task name + */ + const TDesC& TaskName(); + + private: + + /** Constructors **/ + CJavaApplicationService(); + + CJavaApplicationService(const TPSKeyCondition& aPSKeyCondition); + + private: + /** Initializes the members of the class **/ + void ConstructL(); + + /** + * Checks if no operation is ongoing + * + * @since S60 v5.2 + * @param aValue - value of the publish subscribe key + * @return ETrue if idle, otherwise EFalse + */ + TBool IsSwInIdle(TInt aValue); + }; + +#endif // __JAVAPPLICATIONSERVICE__H_ +// End of File