serviceproviders/sapi_contacts_vpbk/inc/contactinterface.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 14 Sep 2010 22:59:08 +0300
branchRCL_3
changeset 46 5146369cfdc9
parent 27 02682e02e51f
permissions -rw-r--r--
Revision: 201033 Kit: 201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     1
/*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     8
*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    11
*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    12
* Contributors:
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    13
*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    14
* Description:  Provides interface between the AIW FrameWork and Service Provider.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    15
*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    16
*/
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    17
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    18
#ifndef C_CCONTACTINTERFACE_H
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    19
#define C_CCONTACTINTERFACE_H
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    20
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    21
//System includes
23
50974a8b132e Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
    22
#include <liwvariant.h>
27
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    23
#include <centralrepository.h>
5
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    24
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    25
// User Includes
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    26
#include "contactinterface.hrh"
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    27
#include "singlecontact.h"
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    28
#include "contactcallbackmap.h"
27
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    29
const TInt KInitialStoreUriSize = 1;
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    30
const TUint32 KPhonebookDefaultSavingStoreUri               = 0x00000001;
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    31
const TUint32 KCRUidPhonebook = 0x101f8794;
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    32
const TUint32 KCRUidPhonebookStoreConfiguration             = 0x1020727f;
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    33
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    34
5
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    35
// Forward Declarations
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    36
class CContactService;
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    37
class CContactInterfaceCallback;
27
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    38
class CRepository;
5
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    39
/**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    40
 * CContactInterface - Provides interface between the AIW FrameWork
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    41
 * and Service Provider.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    42
 */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    43
class CContactInterface : public CBase, public MLiwInterface
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    44
    {
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    45
   	public:// Construction and destruction
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    46
        /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    47
         * Two-phased constructor.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    48
         * @return CCntactInterface*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    49
         */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    50
        IMPORT_C static CContactInterface* NewL();
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    51
        /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    52
         * Destructor
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    53
         */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    54
        virtual ~CContactInterface();
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    55
		/**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    56
         * Gets the max length of the field
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    57
         * @return TInt Max Length for the field.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    58
         */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    59
		static TInt GetFieldMaxLength( TInt aFieldKeyID, TDesC& aDbUri );
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    60
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    61
    private:
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    62
        /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    63
         * Default constructor.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    64
         */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    65
        CContactInterface();
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    66
        /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    67
         * Symbian OS constructor.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    68
         * @return void
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    69
         */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    70
        void ConstructL();
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    71
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    72
    public:
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    73
       /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    74
        * provides a concrete implementation for the supported service
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    75
        * command aCmdName.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    76
        *
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    77
        * @param aCmdName the name of the service command which the consumer wants to invoke
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    78
        * @param aInParamList the input parameter list, can be empty list
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    79
        * @param [in,out] aOutParamList the output parameter list.Return Code is
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    80
        * passed through this list
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    81
        * @param aCmdOptions Options for the command, see TLiwServiceCmdOptions in LiwCommon.hrh.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    82
        * @param aCallback callback to be registered by consumer application
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    83
        *
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    84
        *
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    85
        *
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    86
        * @see TLiwServiceCmdOptions
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    87
        * @see CLiwGenericParamList
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    88
        * @see MLiwNotifyCallback
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    89
        * @return void
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    90
        */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    91
        virtual void ExecuteCmdL(const TDesC8& aCmdName,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    92
                                 const CLiwGenericParamList& aInParamList,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    93
                                 CLiwGenericParamList& aOutParamList,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    94
                                 TUint aCmdOptions = 0,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    95
                                 MLiwNotifyCallback* aCallback = 0);
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    96
       /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    97
        * provides a concrete implementation
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    98
        * for this method.Deletes the interface handle.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    99
        * The consumer application should call this method if there
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   100
        * are no more service commands to be executed on the interface.        
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   101
        * @return void
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   102
        */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   103
        virtual void Close();
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   104
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   105
        /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   106
         * SapiError
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   107
         * This function maps sapi error.         
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   108
         * @param aSymbianErr symbian error code.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   109
         * @return integer error code.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   110
         */      		
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   111
		static TInt SapiError(TInt aSymbianErr);
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   112
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   113
	private:
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   114
		
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   115
	   /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   116
		 * ContactIDUTFToStream :Converts the UTF ID back to stream
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   117
		 * @param aContactIDUTF the id to be converted.		 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   118
	 	 */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   119
	 	HBufC8* ContactIDUTFToStreamL(TDesC& aContactIDUTF); 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   120
	   /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   121
		 * ProcessAddDataL : This function retrieves the data from the map and
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   122
		 * constructs singleContact
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   123
		 * @param aMap a map containing the contact data to be added.		 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   124
		 * @param aContact a CSingleContact class pointer which is to be constructed.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   125
	 	 */  
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   126
 		void ProcessAddDataL(const CLiwMap* aMap, 							  
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   127
 							 CSingleContact* aContact,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   128
 							 CLiwGenericParamList& aOutParamList);
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   129
	  /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   130
        * Processes the command and calls the corresponding service command.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   131
        *              
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   132
        * @param aCmdName the name of the service command which the consumer wants to invoke
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   133
        * @param aInParamList the input parameter list, can be empty list
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   134
        * @param [in,out] aOutParamList the output parameter list.Return Code is
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   135
        * passed through this list
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   136
        * @param aCmdOptions Options for the command, see TLiwServiceCmdOptions in LiwCommon.hrh.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   137
        * @param aCallback callback to be registered by consumer application        
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   138
        * @return void
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   139
        */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   140
		void ProcessCmdL(const TDesC8& aCmdName,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   141
                         const CLiwGenericParamList& aInParamList,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   142
                         CLiwGenericParamList& aOutParamList,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   143
                         TUint aCmdOptions,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   144
                         MLiwNotifyCallback* aCallback);
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   145
  
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   146
  /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   147
        * Parses  the input list and calls the Cancel on the given transaction id
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   148
        *                      
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   149
        * @param aInParamList the input parameter list, can be empty list
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   150
        * @param [in,out] aOutParamList the output parameter list.Return Code is
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   151
        * passed through this list
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   152
        * @param aCallback callback to be registered by consumer application. 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   153
        * @param aCmdOptions Options for the command, see TLiwServiceCmdOptions in LiwCommon.hrh.               
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   154
        * @param aTransId the transaction id for this call.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   155
        * @return void.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   156
        */                 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   157
        TInt CancelCommandL(const CLiwGenericParamList& aInParamList,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   158
			                CLiwGenericParamList& aOutParamList);                             
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   159
                       
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   160
       /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   161
        * Parses  the input list and calls the Getlist API.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   162
        *                      
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   163
        * @param aInParamList the input parameter list, can be empty list
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   164
        * @param [in,out] aOutParamList the output parameter list.Return Code is
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   165
        * passed through this list
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   166
        * @param aCallback callback to be registered by consumer application. 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   167
        * @param aCmdOptions Options for the command, see TLiwServiceCmdOptions in LiwCommon.hrh.               
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   168
        * @param aTransId the transaction id for this call.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   169
        * @return void.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   170
        */                 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   171
        void GetListCommandL(const CLiwGenericParamList& aInParamList,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   172
                             CLiwGenericParamList& aOutParamList,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   173
                             MLiwNotifyCallback* aCallback,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   174
                             TUint aCmdOptions,
10
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 5
diff changeset
   175
                             TInt aTransId,
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 5
diff changeset
   176
                             TCmdType aVal);
5
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   177
       /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   178
        * Parses  the input list and calls the Add API.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   179
        *                      
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   180
        * @param aInParamList the input parameter list, can be empty list        
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   181
        * passed through this list
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   182
        * @param aCallback callback to be registered by consumer application. 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   183
        * @param aCmdOptions Options for the command, see TLiwServiceCmdOptions in LiwCommon.hrh.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   184
        * @param aTransId the transaction id for this call.               
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   185
        * @return integer error code.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   186
        */  
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   187
        void AddCommandL(const CLiwGenericParamList& aInParamList,                         
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   188
                         CLiwGenericParamList& aOutParamList,                         
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   189
                         MLiwNotifyCallback* aCallback,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   190
                         TUint aCmdOptions,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   191
                         TInt aTransId);
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   192
       /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   193
        * Parses  the input list and calls the Import API.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   194
        *                      
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   195
        * @param aInParamList the input parameter list, can be empty list.                
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   196
        * @param aCallback callback to be registered by consumer application. 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   197
        * @param aCmdOptions Options for the command, see TLiwServiceCmdOptions in LiwCommon.hrh.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   198
        * @param aTransId the transaction id for this call.               
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   199
        * @return integer error code.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   200
        */                   
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   201
        void ImportCommandL(const CLiwGenericParamList& aInParamList,                           
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   202
                            CLiwGenericParamList& aOutParamList,                           
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   203
                            MLiwNotifyCallback* aCallback,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   204
                            TUint aCmdOptions,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   205
                            TInt aTransId);
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   206
       /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   207
        * Parses  the input list and calls the Export API.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   208
        *                      
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   209
        * @param aInParamList the input parameter list, can be empty list.                
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   210
        * @param aCallback callback to be registered by consumer application. 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   211
        * @param aCmdOptions Options for the command, see TLiwServiceCmdOptions in LiwCommon.hrh.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   212
        * @param aTransId the transaction id for this call.               
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   213
        * @return integer error code.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   214
        */                      
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   215
        void ExportCommandL(const CLiwGenericParamList& aInParamList,                            
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   216
                            CLiwGenericParamList& aOutParamList,                            
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   217
                            MLiwNotifyCallback* aCallback,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   218
                            TUint aCmdOptions,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   219
                            TInt aTransId);
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   220
        
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   221
       /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   222
        * Parses  the input list and calls the Organise API.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   223
        *                      
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   224
        * @param aInParamList the input parameter list, can be empty list.                
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   225
        * @param aCallback callback to be registered by consumer application. 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   226
        * @param aCmdOptions Options for the command, see TLiwServiceCmdOptions in LiwCommon.hrh.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   227
        * @param aTransId the transaction id for this call.               
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   228
        * @return integer error code.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   229
        */                      
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   230
        void OrganiseGroupCommandL(const CLiwGenericParamList& aInParamList,                                   
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   231
                                   CLiwGenericParamList& aOutParamList,                                    
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   232
                                   MLiwNotifyCallback* aCallback,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   233
                                   TUint aCmdOptions,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   234
                                   TInt aTransId);
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   235
       /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   236
        * Parses  the input list and calls the Delete API.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   237
        *                      
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   238
        * @param aInParamList the input parameter list, can be empty list                
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   239
        * @param aCallback callback to be registered by consumer application. 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   240
        * @param aCmdOptions Options for the command, see TLiwServiceCmdOptions in LiwCommon.hrh.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   241
        * @param aTransId the transaction id for this call.               
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   242
        * @return integer error code.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   243
        */                              
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   244
        void DeleteCommandL(const CLiwGenericParamList& aInParamList,                            
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   245
                            CLiwGenericParamList& aOutParamList,                            
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   246
                            MLiwNotifyCallback* aCallback,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   247
                            TUint aCmdOptions,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   248
                            TInt aTransId);                                                               
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   249
                                                                                                                                  
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   250
		MLiwNotifyCallback* Callback( TInt32 aTransactionId );                                 
27
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   251
	private:
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   252
	    TPtrC GetDefaultDBUri();
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   253
	private:
5
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   254
        // POINTER MEMBER
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   255
        /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   256
         * contact service implementation object.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   257
         * OWN.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   258
         */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   259
        CContactService* iContactService;
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   260
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   261
        /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   262
         * iCallbackMap
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   263
         * Array of objects.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   264
         */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   265
        RPointerArray<CContactCallbackMap> iCallbackMap;      
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   266
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   267
        HBufC* iErrorMess;
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   268
        //this is used only for add api due to reset problem with TLiwVariant
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   269
        HBufC* iDburi;
27
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   270
        
02682e02e51f Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   271
        CRepository *iRepository;
5
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   272
  
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   273
    };
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   274
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   275
#endif // C_CCONTACTINTERFACE_H