--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/idlefw/plugins/devicestatus/inc/aidevicestatusplugin.h Thu Dec 17 08:54:17 2009 +0200
@@ -0,0 +1,139 @@
+/*
+* Copyright (c) 2005-2006 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: Device status plugin interface.
+*
+*/
+
+
+#ifndef C_AIDEVICESTATUSPLUGIN_H
+#define C_AIDEVICESTATUSPLUGIN_H
+
+
+#include <aicontentpublisher.h>
+#include <aipropertyextension.h>
+#include <aicontentrequest.h>
+
+class MAiDeviceStatusPublisher;
+class CAiContentItemArrayIterator;
+class CAiDeviceStatusPluginEngine;
+class CAiMultiContentObserver;
+class CAiPublishPrioritizer;
+class CAiNetworkInfoListener;
+
+/**
+ * @ingroup group_devicestatusplugin
+ *
+ * Device status plugin interface.
+ *
+ * This class implements required active idle plugin API.
+ *
+ * @since S60 3.2
+ */
+class CAiDeviceStatusPlugin : public CAiContentPublisher,
+ public MAiPropertyExtension,
+ public MAiContentRequest
+ {
+public:
+
+ static CAiDeviceStatusPlugin* NewL();
+ static CAiDeviceStatusPlugin* NewLC();
+
+ virtual ~CAiDeviceStatusPlugin();
+
+protected:
+
+// from base class CAiContentPublisher
+ void Resume( TAiTransitionReason aReason );
+ void Suspend( TAiTransitionReason aReason );
+ void Stop( TAiTransitionReason aReason );
+ void SubscribeL(MAiContentObserver& aObserver);
+ TAny* Extension(TUid aUid);
+ void ConfigureL(RAiSettingsItemArray& aSettings);
+
+protected:
+
+// from base class MAiPropertyExtension
+ TAny* GetPropertyL(TInt aProperty);
+ void SetPropertyL(TInt aProperty, TAny* aValue);
+
+// from base class MAiContentRequest
+ TBool RefreshContent( TInt aContentId );
+
+
+private:
+
+ CAiDeviceStatusPlugin();
+ void ConstructL();
+
+ void AllocateResourcesL();
+ void FreeResources();
+ void DoResumeL( TAiTransitionReason aReason );
+ TBool IgnoreReason( TAiTransitionReason aReason );
+
+ /**
+ * Add device status publisher.
+ */
+ void AddPublisherL( MAiDeviceStatusPublisher* aPublisher );
+
+private: // data
+
+ /**
+ * Device Status Plug-in Engine.
+ * Own.
+ */
+ CAiDeviceStatusPluginEngine* iEngine;
+
+ /**
+ * Content observers.
+ * Own.
+ */
+ CAiMultiContentObserver* iContentObservers;
+
+ /**
+ * Device Status Plug-in content prioritizer.
+ * Own.
+ */
+ CAiPublishPrioritizer* iPrioritizer;
+
+ /**
+ * Content item array iterator.
+ * Own.
+ */
+ MAiContentItemIterator* iContent;
+
+ /**
+ * Content item array iterator for resources.
+ * Own.
+ */
+ MAiContentItemIterator* iResources;
+
+ /**
+ * Publisher info.
+ */
+ TAiPublisherInfo iInfo;
+
+ /**
+ * Offset of the loaded resource file.
+ */
+ TInt iResourceOffset;
+
+ /**
+ * Network info listener.
+ * Own.
+ */
+ CAiNetworkInfoListener* iListener;
+ };
+
+
+#endif // C_AIDEVICESTATUSPLUGIN_H