smf/smfservermodule/smfclient/smfcontactfetcher.cpp
changeset 18 013a02bf2bb0
child 25 a180113055cb
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 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 	
       
    27 	//creating private impl wrapper
       
    28 	m_private = new SmfContactFetcherPrivate(this);
       
    29 	}
       
    30 
       
    31 SmfContactFetcher::SmfContactFetcher(SmfProvider* baseProvider, SmfContact* contact)
       
    32 	{
       
    33 	m_baseProvider = baseProvider;
       
    34 	m_frndContact = contact;
       
    35 	
       
    36 	//creating private impl wrapper
       
    37 	m_private = new SmfContactFetcherPrivate(this);
       
    38 	}
       
    39 
       
    40 SmfContactFetcher::~SmfContactFetcher()
       
    41 	{
       
    42 	if(m_baseProvider)
       
    43 		{
       
    44 		delete m_baseProvider;
       
    45 		m_baseProvider = NULL;
       
    46 		}
       
    47 	if(m_frndContact)
       
    48 		{
       
    49 		delete m_frndContact;
       
    50 		m_frndContact = NULL;
       
    51 		}
       
    52 	/** @TODO:- Request to unload the plugin*/
       
    53 	}
       
    54 
       
    55 bool SmfContactFetcher::friends(int pageNum,int perPage)
       
    56 	{
       
    57 	return m_private->friends(pageNum,perPage);
       
    58 	}
       
    59 
       
    60 bool SmfContactFetcher::followers(int pageNum,int perPage)
       
    61 	{
       
    62 	return m_private->followers(pageNum,perPage);
       
    63 	}
       
    64 
       
    65 void  SmfContactFetcher::search(SmfContact* contact,int pageNum,int perPage) 
       
    66 	{
       
    67 	m_private->search(contact,pageNum,perPage);
       
    68 	}
       
    69 
       
    70 bool  SmfContactFetcher::searchNear(SmfLocation* location,SmfLocationSearchBoundary proximity,int pageNum,int perPage) 
       
    71 	{
       
    72 	return m_private->searchNear(location, proximity, pageNum, perPage);
       
    73 	}
       
    74 
       
    75 bool SmfContactFetcher::groups(int pageNum,int perPage) 
       
    76 	{
       
    77 	return m_private->groups(pageNum,perPage);
       
    78 	}
       
    79 
       
    80 bool  SmfContactFetcher::searchInGroup(SmfGroup group,int pageNum,int perPage) 
       
    81 	{
       
    82 	return m_private->searchInGroup(group,pageNum,perPage);
       
    83 	}
       
    84 
       
    85 void SmfContactFetcher::customRequest(const int& operationId,QByteArray* customData)
       
    86 	{
       
    87 	m_private->customRequest(operationId, customData);
       
    88 	}
       
    89 
       
    90 SmfProvider* SmfContactFetcher::getProvider() const
       
    91 	{
       
    92 	return m_baseProvider;
       
    93 	}