contacts_plat/contacts_services_api/inc/cntservicescontact.h
changeset 59 a642906a277a
parent 27 de1630741fbe
equal deleted inserted replaced
47:7cbcb2896f0e 59:a642906a277a
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:
    14 * Description: Data container & constants for "phonebookservices" Qt Highway services.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #ifndef CNTSERVICESCONTACT_H_
    18 #ifndef CNTSERVICESCONTACT_H_
    19 #define CNTSERVICESCONTACT_H_
    19 #define CNTSERVICESCONTACT_H_
    20 
    20 
    21 #include <QList>
    21 #include <QList>
    22 #include <QString>
    22 #include <QString>
    23 #include <xqserviceipcmarshal.h>
    23 #include <xqserviceipcmarshal.h>
    24 
    24 
    25 /*Supported actions*/
    25 //Action filter definitions:
       
    26 
       
    27 /// Action filter that DOES NOT filter away based on supported action.
    26 const QString KCntActionAll("all");
    28 const QString KCntActionAll("all");
       
    29 /// Action filter for showing only contacts that support calling.
    27 const QString KCntActionCall("call");
    30 const QString KCntActionCall("call");
       
    31 /// Action filter for showing only contacts that suppport SMS sending.
    28 const QString KCntActionSms("sms");
    32 const QString KCntActionSms("sms");
       
    33 // Action filter for showing only contacts that support emailing.
    29 const QString KCntActionEmail("email");
    34 const QString KCntActionEmail("email");
    30 
    35 
    31 /*Supported filters*/
       
    32 const QString KCntFilterDisplayAll("all");
       
    33 const QString KCntFilterDisplayFavorites("favorites");
       
    34 
    36 
    35 /*Supported Fetch Selection Modes*/
    37 /// Return values from editing service
    36 const QString KCntNoSelectionMode("No Selection");
    38 const int KCntServicesReturnValueContactSaved       = 1;
    37 const QString KCntSingleSelectionMode("SingleSelect");
    39 const int KCntServicesReturnValueContactDeleted     = -1;
    38 const QString KCntMultiSelectionMode("MultiSelect");
    40 const int KCntServicesReturnValueContactNotModified = 0;
       
    41 const int KCntServicesTerminated = -2;
    39 
    42 
       
    43 /**
       
    44  * A data container class to be used with "phonebookservices" Qt Highway services.
       
    45  */
    40 class CntServicesContact
    46 class CntServicesContact
    41 {
    47 {
    42 public:
    48 public:
    43     CntServicesContact() : mContactId(-1) {};
    49     CntServicesContact() : mContactId(-1) {};
    44     virtual ~CntServicesContact() {};
    50     virtual ~CntServicesContact() {};
    68     s >> mContactId;
    74     s >> mContactId;
    69 }
    75 }
    70 
    76 
    71 typedef QList<CntServicesContact> CntServicesContactList;
    77 typedef QList<CntServicesContact> CntServicesContactList;
    72 
    78 
       
    79 //-------------------------------------------------------------------
       
    80 // These are DEPRECATED and will be removed soon:
       
    81 
       
    82 /// @deprecated
       
    83 const QString KCntFilterDisplayAll("all");
       
    84 /// @deprecated
       
    85 const QString KCntFilterDisplayFavorites("favorites");
       
    86 
       
    87 /// @deprecated
       
    88 const QString KCntNoSelectionMode("No Selection");
       
    89 /// @deprecated
       
    90 const QString KCntSingleSelectionMode("SingleSelect");
       
    91 /// @deprecated
       
    92 const QString KCntMultiSelectionMode("MultiSelect");
       
    93 
       
    94 //-------------------------------------------------------------------
       
    95 
    73 Q_DECLARE_USER_METATYPE(CntServicesContact)
    96 Q_DECLARE_USER_METATYPE(CntServicesContact)
    74 Q_DECLARE_USER_METATYPE_NO_OPERATORS(CntServicesContactList)
    97 Q_DECLARE_USER_METATYPE_NO_OPERATORS(CntServicesContactList)
    75 
    98 
    76 #endif /* CNTSERVICESCONTACT_H_ */
    99 #endif /* CNTSERVICESCONTACT_H_ */