smf/smfservermodule/smfclient/client/smfrelationmgr_p.h
changeset 14 a469c0e6e7fb
equal deleted inserted replaced
13:b5d63d5fc252 14:a469c0e6e7fb
       
     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  *
       
    17  */
       
    18 #include "smfprovider.h"
       
    19 #include "SmfClientGlobal.h"
       
    20 #include "smfGlobal.h"
       
    21 #include "SmfObserver.h"
       
    22 
       
    23 #include <QStringList>
       
    24 #include "smfrelationmgr.h"
       
    25 class SmfProvider;
       
    26 #ifdef Q_OS_SYMBIAN
       
    27 class CSmfClientSymbian;
       
    28 #else
       
    29 class SmfClientQt;
       
    30 #endif
       
    31 class SmfRelationMgrPrivate
       
    32 	{
       
    33 public:
       
    34 	SmfRelationMgrPrivate(SmfRelationMgr* relnMngr);
       
    35 	~SmfRelationMgrPrivate();
       
    36 	//create a relation with first contact (id optional)
       
    37 	SmfRelationId create(SmfProvider *provider=NULL, SmfContact *contact=NULL);
       
    38 	/** assign contact to a relation */
       
    39 	SmfError associate( const SmfRelationId& relation,
       
    40 						const SmfContact* contact,
       
    41 						SmfProvider* provider);
       
    42 
       
    43 	/** remove contact from a relation */
       
    44 	SmfError remove(SmfRelationId& relation,
       
    45 					const SmfContact* conact);
       
    46 
       
    47 	/** returns first relation item in the relation when exists, NULL otherwise */
       
    48 	SmfRelationItem searchById(const SmfRelationId& relation);
       
    49 
       
    50 	/** returns relation Id for a given contacts if exists, NULL otherwise */
       
    51 	SmfRelationId searchByContact( SmfContact contact);
       
    52 
       
    53 	/** returns number of contacts in a relation*/
       
    54 	uint count(SmfRelationId relation);
       
    55 
       
    56 	/** contacts and their provider */
       
    57 	SmfRelationItem get(SmfRelationId& relation, quint32 index);
       
    58 
       
    59 	/** list of contacts and their provider */
       
    60 	QList<SmfRelationItem> getAll(SmfRelationId& relation);
       
    61 
       
    62 	/** list of all relations */
       
    63 	QList<SmfRelationId> getAllRelations();
       
    64 
       
    65 	/** delete a particular relation*/
       
    66 	SmfError Delete(SmfRelationId& relation);
       
    67 private:
       
    68 #ifdef Q_OS_SYMBIAN
       
    69   CSmfClientSymbian* m_SmfClientPrivate;
       
    70   friend class CSmfClientSymbian;
       
    71   int m_xtraInfoFlag;
       
    72   int m_pageInfoFlag;
       
    73 #else
       
    74   SmfClientQt* m_SmfClientPrivate;
       
    75   friend class SmfClientQt;
       
    76 #endif
       
    77   QByteArray m_dataForDSM;
       
    78   QByteArray m_dataFromDSM;
       
    79 	};