smf/smfservermodule/smfclient/client/smfcontactfetcher.cpp
changeset 7 be09cf1f39dd
equal deleted inserted replaced
6:c39a6cfd1fb9 7:be09cf1f39dd
       
     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 SmfContactFetcher class is for fetching SmfContact related info
       
    17  *
       
    18  */
       
    19 
       
    20 #include "smfcontactfetcher.h"
       
    21 #include "smfcontactfetcher_p.h"
       
    22 
       
    23 SmfContactFetcher::SmfContactFetcher(SmfProvider* baseProvider)
       
    24   {
       
    25   m_baseProvider = baseProvider;
       
    26   //creating private impl wrapper
       
    27   m_private = new SmfContactFetcherPrivate(this);
       
    28   }
       
    29 SmfContactFetcher::SmfContactFetcher(SmfProvider* baseProvider, SmfContact* contact)
       
    30 {
       
    31 	m_baseProvider = baseProvider;
       
    32 	m_frndContact = contact;
       
    33 	//creating private impl wrapper
       
    34 	m_private = new SmfContactFetcherPrivate(this);
       
    35 }
       
    36 SmfContactFetcher::~SmfContactFetcher()
       
    37 {
       
    38 	if(m_baseProvider)
       
    39 	{
       
    40 		delete m_baseProvider;
       
    41 		m_baseProvider = NULL;
       
    42 	}
       
    43 	if(m_frndContact)
       
    44 	{
       
    45 		delete m_frndContact;
       
    46 		m_frndContact = NULL;
       
    47 	}
       
    48 	//TODO:- Request to unload the plugin
       
    49 }
       
    50 bool  SmfContactFetcher::friends(int pageNum,int perPage)
       
    51 {
       
    52 m_private->friends(pageNum,perPage);
       
    53 }
       
    54 bool SmfContactFetcher::followers(int pageNum,int perPage)
       
    55 {
       
    56 	m_private->followers(pageNum,perPage);
       
    57 }
       
    58 void  SmfContactFetcher::search(SmfContact* contact,int pageNum,int perPage) 
       
    59 {
       
    60 	m_private->search(contact,pageNum,perPage);
       
    61 }
       
    62 bool  SmfContactFetcher::searchNear(SmfLocation* location,SmfLocationSearchBoundary proximity,int pageNum,int perPage) 
       
    63 {
       
    64 	//To be implemented
       
    65 }
       
    66 bool SmfContactFetcher::groups(int pageNum,int perPage) 
       
    67 {
       
    68 	m_private->groups(pageNum,perPage);
       
    69 }
       
    70 bool  SmfContactFetcher::searchInGroup(SmfGroup group,int pageNum,int perPage) 
       
    71 {
       
    72 	m_private->searchInGroup(group,pageNum,perPage);
       
    73 }
       
    74 void SmfContactFetcher::customRequest(const int& operationId,QByteArray* customData)
       
    75 {
       
    76 	//To be implemented
       
    77 }
       
    78 SmfProvider*  SmfContactFetcher::getProvider() 
       
    79 {
       
    80 	return m_baseProvider;
       
    81 }