--- a/localconnectivityservice/generichid/src/hidparser.cpp Fri Sep 03 18:38:04 2010 +0800
+++ b/localconnectivityservice/generichid/src/hidparser.cpp Thu Sep 09 18:17:36 2010 +0800
@@ -1272,7 +1272,8 @@
iGlobal.iCount = aItem.Data();
if (aItem.Data() == 0)
{
- retVal = EZeroReportCount;
+ TRACE_INFO((_L("Global report count zero\n")));
+
}
iItemsDefined |= EReportCount;
--- a/mtpdataproviders/mtpimagedp/mediasyncserver/src/cmediasyncdatabase.cpp Fri Sep 03 18:38:04 2010 +0800
+++ b/mtpdataproviders/mtpimagedp/mediasyncserver/src/cmediasyncdatabase.cpp Thu Sep 09 18:17:36 2010 +0800
@@ -440,8 +440,8 @@
RDbView view;
CleanupClosePushL(view);
- view.Prepare(iDatabase, TDbQuery(KSQLQuery));
- view.EvaluateAll();
+ User::LeaveIfError(view.Prepare(iDatabase, TDbQuery(KSQLQuery)));
+ User::LeaveIfError(view.EvaluateAll());
//goto the last fetch position
if (iSavePosition)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mtptransports/mtpcontroller/locodinc/locodbearer.h Thu Sep 09 18:17:36 2010 +0800
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 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: Defines the LCD Bearer Plugin identifier.
+*
+*/
+
+
+#ifndef T_LOCODBEARER_H
+#define T_LOCODBEARER_H
+
+#include <e32base.h>
+
+/** bearer value in LC */
+enum TLocodBearer
+ {
+ ELocodBearerBT = 0x0001,
+ ELocodBearerIR = 0x0010,
+ ELocodBearerUSB = 0x0100,
+ };
+
+#endif // T_LOCODBEARER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mtptransports/mtpcontroller/locodinc/locodplugin.hrh Thu Sep 09 18:17:36 2010 +0800
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 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: Definitions for plugin resource registration.
+*
+*/
+
+
+#ifndef LOCODPLUGIN_HRH
+#define LOCODPLUGIN_HRH
+
+/**
+ * This file contains the defintions for plugin resource registration.
+ *
+ * All plugins should use version 2 registration resource file and set the
+ * rom_only field to 1 to prevent it from being overridden by RAM-based plugins.
+ *
+ * All bearer plugins should use KLOCODBEARERINTERFACEUID as the interface UID.
+ *
+ * A bearer plugin should use its corresponding feature ID (from features.hrh) as the
+ * implementation UID, that is,
+ * Implementation UID of IR bearer is KFeatureIdIrda,
+ * Implementation UID of BT bearer is KFeatureIdBt,
+ * Implementation UID of USB bearer is KFeatureIdUsb.
+ *
+ * All service plugins should use KLOCODSERVICEINTERFACEUID as the interface UID.
+ *
+ * A service plugin should use its corresponding feature ID (from features.hrh) as the
+ * implementation UID, that is,
+ * Implementation UID of Dun is KFeatureIdDun, (not exist yet, CR created)
+ * Implementation UID of Obex is KFeatureIdSrcs,
+ *
+ */
+
+// Interface UID of bearer plugins
+#define KLOCODBEARERINTERFACEUID 0x20002771
+
+// Interface UID of service plugins
+#define KLOCODSERVICEINTERFACEUID 0x20002772
+
+#endif // LOCODPLUGIN_HRH
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mtptransports/mtpcontroller/locodinc/locodserviceplugin.h Thu Sep 09 18:17:36 2010 +0800
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 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: This is the LCD Service Plugin base class declaration.
+*
+*/
+
+
+#ifndef C_LOCODSERVICEPLUGIN_H
+#define C_LOCODSERVICEPLUGIN_H
+
+#include <e32base.h>
+
+#include "locodservicepluginparams.h"
+#include "locodbearer.h"
+
+/**
+ * Service Plugin base class
+ *
+ * This is the base class from which service plugins inherit.
+ *
+ * When a service plugin is constructed, it should not start any service by default.
+ * A service is started on demand when the bearer is available.
+ *
+ * @euser.lib
+ * @since S60 v3.2
+ */
+class CLocodServicePlugin : public CBase
+ {
+public:
+
+ static CLocodServicePlugin* NewL(TLocodServicePluginParams& aParams);
+
+ virtual ~CLocodServicePlugin();
+
+ /**
+ * Tell service plugin which service should be enabled or disabled according to
+ * specified bearer and its status.
+ *
+ * On completion, the plugin should call
+ * MLocodServicePluginObserver::ManageServiceCompleted() to inform the result.
+ *
+ * @since S60 v3.2
+ * @param aBearer the bearer identification
+ * @param aStatus the status of this bearer, ETrue if it is available;
+ * EFalse otherwise.
+ */
+ virtual void ManageService(TLocodBearer aBearer, TBool aStatus) = 0;
+
+ TUid ImplementationUid() const;
+
+protected:
+
+ CLocodServicePlugin(TLocodServicePluginParams& aParams);
+
+ /**
+ * Gets the observer interface object associated with this plugin
+ *
+ * @since S60 v3.2
+ * @return The observer object
+ */
+ MLocodServicePluginObserver& Observer() const;
+
+private: // data
+
+ /**
+ * UID set by ECOM when the instance is created. Used when the instance
+ * is destroyed.
+ */
+ TUid iInstanceUid;
+
+ /**
+ * Implementation UID of the concrete instance.
+ */
+ const TUid iImplementationUid;
+
+ /**
+ * Holds the observer object which will be notified when the operations
+ * complete
+ * Not own.
+ */
+ MLocodServicePluginObserver& iObserver;
+
+ };
+
+#include <locodserviceplugin.inl>
+
+#endif // C_LOCODSERVICEPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mtptransports/mtpcontroller/locodinc/locodserviceplugin.inl Thu Sep 09 18:17:36 2010 +0800
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 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: This is the LCD Service Plugin construction parameters
+* declaration
+*
+*/
+
+
+#include <ecom.h>
+
+// -----------------------------------------------------------------------------
+// Constructor method, just saves the arguments into member variables
+// -----------------------------------------------------------------------------
+//
+inline CLocodServicePlugin* CLocodServicePlugin::NewL(TLocodServicePluginParams& aParams)
+ {
+ CLocodServicePlugin* self = reinterpret_cast<CLocodServicePlugin*>(
+ REComSession::CreateImplementationL(
+ aParams.ImplementationUid(),
+ _FOFF(CLocodServicePlugin, iInstanceUid),
+ (TAny*)&aParams)
+ );
+
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// Service plug ins destructor
+// -----------------------------------------------------------------------------
+//
+inline CLocodServicePlugin::~CLocodServicePlugin()
+ {
+ REComSession::DestroyedImplementation(iInstanceUid);
+ }
+
+// -----------------------------------------------------------------------------
+// returns the implementation UID
+// -----------------------------------------------------------------------------
+//
+inline TUid CLocodServicePlugin::ImplementationUid() const
+ {
+ return iImplementationUid;
+ }
+
+// -----------------------------------------------------------------------------
+// CLocodServicePlugin C++ constructor
+// -----------------------------------------------------------------------------
+//
+inline CLocodServicePlugin::CLocodServicePlugin(TLocodServicePluginParams& aParams)
+ : iImplementationUid(aParams.ImplementationUid()),
+ iObserver(aParams.Observer())
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// return the observer class
+// -----------------------------------------------------------------------------
+//
+inline MLocodServicePluginObserver& CLocodServicePlugin::Observer() const
+ {
+ return iObserver;
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mtptransports/mtpcontroller/locodinc/locodservicepluginobserver.h Thu Sep 09 18:17:36 2010 +0800
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 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: This is the LCD Service Plugin observer interface definition.
+*
+*/
+
+
+#ifndef M_LOCODSERVICEPLUGINOBSERVER_H
+#define M_LOCODSERVICEPLUGINOBSERVER_H
+
+#include "locodbearer.h"
+
+/**
+ * LCD Service Plugin Observer interface class
+ *
+ * This is the service plugin observer interface definition used by LCD
+ * Service Plugins to inform the daemon when an action is complete.
+ *
+ * @lib
+ * @since S60 v3.2
+ */
+class MLocodServicePluginObserver
+ {
+public:
+
+ /**
+ * This is a callback function used by the plugins to inform when
+ * managing the service have completed. The parameters passed should be
+ * identical to the ones used when the plugin's ManageService() was called,
+ * plus this service plugin's implemnetation UID and the completion status.
+ *
+ * @since S60 v3.2
+ * @param aBearer the bearer identification passed in ManageService()
+ * @param aStatus the status of this bearer passed in ManageService()
+ * @param aServiceImplUid, the implementation UID of this service plugin.
+ * @param err KErrNone if the operation succeeded; otherwise a Symbian
+ * error code.
+ */
+ virtual void ManageServiceCompleted(
+ TLocodBearer aBearer,
+ TBool aStatus,
+ TUid aServiceImplUid,
+ TInt err) = 0;
+ };
+
+#endif // M_LOCODSERVICEPLUGINOBSERVER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mtptransports/mtpcontroller/locodinc/locodservicepluginparams.h Thu Sep 09 18:17:36 2010 +0800
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 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: This is the LCD Service Plugin construction parameters
+* declaration
+*
+*/
+
+
+#ifndef T_LOCODSERVICEPLUGINPARAMS_H
+#define T_LOCODSERVICEPLUGINPARAMS_H
+
+class MLocodServicePluginObserver;
+
+/**
+ * LCD Service Plugin Callback construction parameters
+ *
+ * This interface class is used to pass construction parameters to the
+ * plugins. These parameters include the callback interface (usually
+ * implemented by the LCD) and the ECOM plugin implementation UID
+ *
+ * @lib ?library
+ * @since S60 v3.2
+ */
+class TLocodServicePluginParams
+ {
+public:
+ /**
+ * Constructor.
+ *
+ * @since S60 v3.2
+ * @param aUid Implementation UID of the plugin being constructed
+ * @param aObserver Callback interface object
+ */
+ TLocodServicePluginParams(TUid aUid, MLocodServicePluginObserver& aObserver);
+
+ /**
+ * Gets the implementation UID of the plugin
+ *
+ * @since S60 v3.2
+ * @return Implementaion UID
+ */
+ TUid ImplementationUid() const;
+
+ /**
+ * Gets the observer interface object
+ *
+ * @since S60 v3.2
+ * @return The observer object
+ */
+ MLocodServicePluginObserver& Observer() const;
+
+private: // data
+
+ /**
+ * The implementation UID
+ */
+ const TUid iImplementationUid;
+
+ /**
+ * Reference to the observer object
+ */
+ MLocodServicePluginObserver& iObserver;
+
+ };
+
+#include "locodservicepluginparams.inl"
+
+#endif // T_LOCODSERVICEPLUGINPARAMS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mtptransports/mtpcontroller/locodinc/locodservicepluginparams.inl Thu Sep 09 18:17:36 2010 +0800
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 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: This is the LCD Service Plugin construction parameters
+* declaration
+*
+*/
+
+
+// -----------------------------------------------------------------------------
+// Constructor method, just saves the arguments into member variables
+// -----------------------------------------------------------------------------
+//
+inline TLocodServicePluginParams::TLocodServicePluginParams(TUid aUid, MLocodServicePluginObserver& aObserver)
+ : iImplementationUid(aUid),
+ iObserver(aObserver)
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// Returns the implementation UID
+// -----------------------------------------------------------------------------
+//
+inline TUid TLocodServicePluginParams::ImplementationUid() const
+ {
+ return iImplementationUid;
+ }
+
+// -----------------------------------------------------------------------------
+// return the observer class
+// -----------------------------------------------------------------------------
+//
+inline MLocodServicePluginObserver& TLocodServicePluginParams::Observer() const
+ {
+ return iObserver;
+ }