example/clientapi/smf/smffcontactfetcher.h
author cgandhi <chandradeep.gandhi@sasken.com>
Tue, 02 Mar 2010 16:24:32 +0530
changeset 0 5d2360e70d9f
permissions -rw-r--r--
Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     1
/*
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     2
* Copyright (c) 2010 Sasken Communication Technologies Ltd.
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     3
* All rights reserved.
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     5
* under the terms of the "{License}"
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     6
* which accompanies  this distribution, and is available
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     7
* at the URL "{LicenseUrl}".
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     8
*
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
     9
* Initial Contributors:
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    10
* Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    11
*
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    12
* Contributors:
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    13
*
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    14
* Description:
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    15
* Interface spefication for list of contacts from a site
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    16
*
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    17
*/
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    18
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    19
#ifndef SMFCONTACTHETCHER_H
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    20
#define SMFCONTACTHETCHER_H
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    21
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    22
class SmfProvider; //base-class for service provider
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    23
class SmfContact; //class for Contact in a social network
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    24
class SmfGroup; //class for a group in social network
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    25
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    26
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    27
/**
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    28
 * Interface to search for contacts/connections from a service provider. This class
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    29
 * provides basic functionality to allow applications to obtain list of
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    30
 * contacts or friends in a social networking service.
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    31
 *
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    32
 * Note that branding information for the particular service implementation
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    33
 * is available from base-class functions. See also:
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    34
 * SmfProvider::serviceName(), SmfProvider::serviceIcon(), SmfProvider::description()
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    35
 *
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    36
 * All of the functionality described here should be implemented by a service
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    37
 * specific plug-in object.
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    38
 */
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    39
class SmfContactFetcher : public SmfProvider
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    40
{
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    41
  Q_OBJECT;
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    42
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    43
public:
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    44
  // Seeing as this is a plug-in implementation, these will realistically
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    45
  // be generated by SMF factory of some kind
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    46
  SmfContactFetcher(QObject* parent = 0);
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    47
  ~SmfContactFetcher();
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    48
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    49
public:
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    50
  // Get the friend listing - might be made asynchrnous later
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    51
  virtual QList<SmfContact> friends() = 0; // list of contact objects
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    52
  virtual QList<SmfContact> followers() = 0; // list of contact objects
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    53
  virtual QList<SmfContact> search(SmfContact) = 0; // list of contact objects
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    54
  virtual QList<SmfGroup>   groups() = 0; // list of group objects
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    55
  virtual QList<SmfContact> searchInGroup(SmfGroup) = 0; // list of contact objects
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    56
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    57
  virtual SmfContactModel   model() = 0; // maybe we can make a QItemModel-derived model?
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    58
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    59
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    60
slots:
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    61
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    62
signals:
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    63
  // Notification of remote changes to the contactlist,
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    64
  // probably should be done through model
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    65
  virtual void friendsChanged() = 0;
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    66
  virtual void followersChanged() = 0;
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    67
  virtual void groupChanged() = 0;
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    68
};
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    69
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    70
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    71
5d2360e70d9f Application level use cases to illustrate the goal of SMF. Pushing the draft header files for SMF client and one sample application cpp
cgandhi <chandradeep.gandhi@sasken.com>
parents:
diff changeset
    72
#endif // SMFCONTACTHETCHER_H