smf/smfservermodule/smfclient/smfclient.h
changeset 18 013a02bf2bb0
child 26 83d6a149c755
equal deleted inserted replaced
17:106a4bfcb866 18:013a02bf2bb0
       
     1 /**
       
     2  * Copyright (c) 2010 Sasken Communication Technologies Ltd.
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the "Eclipse Public License v1.0" 
       
     6  * which accompanies  this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html"
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
       
    11  *
       
    12  * Contributors:
       
    13  * Manasij Roy, Nalina Hariharan
       
    14  * 
       
    15  * Description:
       
    16  * The SmfClient class provides a set of APIs to get list of service provider
       
    17  * who implement the given interface. Calling GetServices of the instance of this
       
    18  * class is mandatory before using any other interface.
       
    19  *
       
    20  */
       
    21 
       
    22 #ifndef SMFCLIENT_H
       
    23 #define SMFCLIENT_H
       
    24 
       
    25 #include <QObject>
       
    26 
       
    27 #include "smfclientglobal.h"
       
    28 #include "smfglobal.h"
       
    29 
       
    30 //Forward declarations
       
    31 class SmfProvider;
       
    32 class SmfClientPrivate;
       
    33 
       
    34 /**
       
    35  * @ingroup smf_client_group 
       
    36  * Interface for a base service provider. Other service provider classes contains 
       
    37  * implementation of this base class so that each has access to service provider 
       
    38  * information.
       
    39  * All of the functionality described here should be implemented by a service
       
    40  * specific plug-in object.
       
    41  */
       
    42 class  SMFCLIENT_EXPORT SmfClient
       
    43 	{
       
    44 public:
       
    45 	/**
       
    46 	 * Constructs SmfClient
       
    47 	 */
       
    48 	SmfClient();
       
    49 	
       
    50 	/**
       
    51 	 * Destructor
       
    52 	 */
       
    53 	~SmfClient();
       
    54 	
       
    55 	/**
       
    56 	 * Method to get the list of services for a given service (interface name)
       
    57 	 * @param serviceName The name of the service 
       
    58 	 * @return Service provider's list (ownership of memory is transferred 
       
    59 	 * to the calling party)
       
    60 	 */
       
    61 	QList<SmfProvider>* GetServices(const QString& serviceName);
       
    62 	
       
    63 	// ToDo :- More overloaded APIs will be provided later
       
    64 	//QList<SmfProvider>* GetServices(const QString& serviceName, const QString& providerName);
       
    65 	//QList<SmfProvider>* GetServices(const QString& serviceName, const SmfProvider& provider);
       
    66   
       
    67 	/**
       
    68 	 * This method returns the error message for the mentioned argument error code
       
    69 	 * @param aErrorCode The SmfError code for which the error string is required
       
    70 	 * @returns a QString object containing the required error message
       
    71 	 */
       
    72 	QString errorString ( const SmfError &aErrorCode ) const;
       
    73 
       
    74 private:
       
    75 	/**
       
    76 	 * Private impl wrapper.
       
    77 	 */
       
    78 	SmfClientPrivate* m_private;
       
    79 	
       
    80 	/**
       
    81 	 * List of SmfProvider to be returned to the requested code
       
    82 	 */
       
    83 	QList<SmfProvider>* m_providerList;
       
    84   
       
    85 	};
       
    86 
       
    87 #endif // SMFCLIENT_H