phoneengine/PhoneCntFinder/ContactService/inc/MPhCntPhonebookServices.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "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 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Interface for phonebook services.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPHCNTPHONEBOOKSERVICES_H
       
    20 #define MPHCNTPHONEBOOKSERVICES_H
       
    21 
       
    22 #include <e32std.h>
       
    23 #include "CPhCntSingleItemFetch.h"
       
    24 
       
    25 class CPhCntContactId;
       
    26 class MPhCntServiceRequestParam;
       
    27 class CPhCntContact;
       
    28 
       
    29 
       
    30 /**
       
    31  *  Interface for phonebook services.
       
    32  *
       
    33  *  @lib PhoneCntFinder.lib
       
    34  *  @since S60 v3.2
       
    35  */
       
    36 NONSHARABLE_CLASS( MPhCntPhonebookServices )
       
    37     {
       
    38 
       
    39 public:
       
    40 
       
    41     /**
       
    42      * Virtual destructor.
       
    43      * 
       
    44      * @since S60 v3.2
       
    45      */
       
    46     virtual ~MPhCntPhonebookServices() {};
       
    47 
       
    48     /**
       
    49      * Gets user selected phone number and contact id.
       
    50      *
       
    51      * @since S60 v3.2
       
    52      * @param aContactId Contact id of the contact, may be null
       
    53      * @param aPhoneNumber Phone number, may be null.
       
    54      * @leaves KErrCancel - User canceled the fetch
       
    55      *         Other system wide error codes.
       
    56      */
       
    57     virtual void GetUserSelectedPhoneNumberL( 
       
    58         CPhCntContactId*& aContactId, 
       
    59         HBufC*& aPhoneNumber ) = 0;
       
    60 
       
    61     /**
       
    62      * Gets user selected voip address and contact id.
       
    63      *
       
    64      * @since S60 v5.0
       
    65      * @param aContactId Contact id of the contact, may be null
       
    66      * @param aVoIPAddress voip address, may be null.
       
    67      * @leaves KErrCancel - User canceled the fetch
       
    68      *         Other system wide error codes.
       
    69      */
       
    70     virtual void GetUserSelectedVoIPAddressL( 
       
    71         CPhCntContactId*& aContactId, 
       
    72         HBufC*& aVoIPAddress ) = 0;
       
    73     
       
    74     /**
       
    75      * Gets user selected dtmf number and contact id.
       
    76      *
       
    77      * @since S60 v3.2
       
    78      * @param aContactId Contact id of the contact, may be null
       
    79      * @param aDtmfNumber Dtmf number, may be null.
       
    80      * @leaves KErrCancel - User canceled the fetch
       
    81      *         Other system wide error codes.
       
    82      */    
       
    83     virtual void GetUserSelectedDtmfNumberL(
       
    84         CPhCntContactId*& aContactId,
       
    85         HBufC*& aDtmfNumber ) = 0;
       
    86         
       
    87     /**
       
    88      * Create new contact to phonebook.
       
    89      *
       
    90      * @since S60 v3.2
       
    91      * @param aPhoneNumber Number of the new contact.
       
    92      */
       
    93     virtual void CreateNewContactL( const TDesC& aPhoneNumber ) = 0;
       
    94     
       
    95     /**
       
    96      * Adds phonenumber to existing contact.
       
    97      *
       
    98      * @since S60 v3.2
       
    99      * @param aPhoneNumber Phone number to be added to existing contact.
       
   100      */
       
   101     virtual void UpdateExistingContactL( const TDesC& aPhoneNumber ) = 0;  
       
   102 
       
   103 	/**
       
   104 	 * Gets a phone number from the contact.
       
   105 	 * @param aContactLink Contact link.
       
   106 	 * @param aCallType Number type.
       
   107 	 * @param aNumber User selected phone number.
       
   108 	 * @param aFieldLink Contact link (field link) to the number selected by user.
       
   109 	 */
       
   110 	virtual void GetPhoneNumberL(
       
   111 		const TDesC8& aContactLink, 
       
   112 		const CPhCntSingleItemFetch::TCallType aCallType,
       
   113     	HBufC*& aNumber,
       
   114     	HBufC8*& aFieldLink ) = 0;
       
   115     	
       
   116     /**
       
   117      * Gets contact selected by user. 
       
   118      *
       
   119      * @since S60 v3.2
       
   120      * @param aParam Parameters passed to AIW.
       
   121      * @return Contact, selected by user. Ownership contact.
       
   122      */   
       
   123     virtual CPhCntContact* GetUserSelectedContactLC( 
       
   124         MPhCntServiceRequestParam& aParam ) = 0;   
       
   125     
       
   126     /**
       
   127 	 * Cancels outstanding request.
       
   128 	 *
       
   129 	 * @since S60 v3.2
       
   130 	 */
       
   131     virtual void CancelRequest() = 0;
       
   132 
       
   133 protected:
       
   134 
       
   135     };
       
   136 
       
   137 
       
   138 #endif // MPHCNTPHONEBOOKSERVICES_H