serviceproviders/sapi_contacts_vpbk/contactservice/inc/singlecontactfield.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 24 Nov 2009 08:56:33 +0200
changeset 33 50974a8b132e
parent 22 fc9cf246af83
permissions -rw-r--r--
Revision: 200945 Kit: 200948
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19
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 utility functions
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
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    19
#ifndef SINGLECONTACTFIELD_H
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    20
#define SINGLECONTACTFIELD_H
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    21
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    22
/**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    23
 * CSingleContactField : Class that represents a field in a given contact Item.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    24
 * This class is used to create a contact item and add it to the database and also
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    25
 * it is used to return a contact from the database.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    26
 */ 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    27
class CSingleContactField:public CBase
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    28
{
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    29
    public:		
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    30
		/**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    31
         * NewL() Method for CSingleContactField class
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    32
         * @return CSingleContactField*
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    33
         */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    34
    IMPORT_C static CSingleContactField* NewL();
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    35
		
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    36
		/**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    37
         * Destructor - virtual and class not intended
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    38
         * for derivation, so not exported
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
    
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    41
    public:// General Functions - Meant for use within the dll
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
	    /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    44
         * Gets the Field Key, The Label and the Value of the field.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    45
         * @param aFieldkey A reference to hold the resultant field key.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    46
         * @param aLabel A reference to hold the resultant Label.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    47
         * @param aValue A reference to hold the resultant Value.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    48
         * @return None.
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 void GetFieldDataL(TPtrC8& aFieldkey,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    51
		                            TPtrC& aLabel,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    52
		                            TPtrC& aValue);
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
		/**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    55
         * Gets the Group Label and the array containing 
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    56
         * the contact id's of the group         
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    57
         * @param aGroupLabel A reference to hold the resultant Label.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    58
         * @param aArray A reference to array that contains the contact id's.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    59
         * @return None.
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
		IMPORT_C void GetFieldDataL(TPtrC& aGroupLabel,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    62
		                            RPointerArray<TDesC8>& aArray);
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    63
	 		
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
	     * Sets the Field Key, The Label and the Value of the field.         
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    66
         * @param aFieldkey A reference that holds the fieldkey.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    67
         * @param aLabel A reference that holds the Label.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    68
         * @param aValue A reference that holds the Value.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    69
         * @return None.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    70
         */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    71
		IMPORT_C void SetFieldParamsL(const TDesC8& Fieldkey,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    72
		                              const TDesC& aLabel,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    73
		                              const TDesC& aValue);
22
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    74
		IMPORT_C void SetUriFieldParamsL(const TDesC8& aFieldKey,
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    75
		                              const TDesC& aLabel,
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    76
		                              const RPointerArray<HBufC> aValue);
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    77
		    
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    78
		IMPORT_C void GetUriFieldParamL(RPointerArray<HBufC>& axspidArray);
19
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    79
	    /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    80
         * Sets the Label and the id arrray  of the group.                  
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    81
         * @param aGroupLabel A reference that holds the Label.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    82
         * @param aArray A reference to array that contains the contact id's.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    83
         * @return None.
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
	    void SetFieldParamsL(const TPtrC& aGroupLabel,
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    86
	                         RPointerArray<HBufC8>& aArray);
22
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    87
	    IMPORT_C void SetXspidDataL(const TDesC8& aFieldKey,
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    88
                const TDesC& aLabel,
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    89
                RPointerArray<HBufC>& axspidArray);
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    90
	    
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    91
	    IMPORT_C void GetXspidDataL(RPointerArray<HBufC>& axspidArray);
19
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    92
	    
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    93
	    /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    94
	     * Get Method for time.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    95
	     * @param none.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    96
	     * @return TTime.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    97
	     */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    98
		IMPORT_C TTime GetDateTime();	    
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
    99
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   100
	    /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   101
	     * Set Method for time.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   102
	     * @param TTime.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   103
	     * @return None.
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
	    IMPORT_C void SetDateTime(TTime aDateTime);
22
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
   106
	    IMPORT_C void SetUriData(TPtrC aUri);
19
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   107
	    		
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   108
		/**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   109
	     * CSingleContactField Destructor.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   110
	     * @param None.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   111
	     * @return None.
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
	    ~CSingleContactField();
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
    private:
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   116
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   117
        /**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   118
	     * Second phase Constructor.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   119
	     * @param None.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   120
	     * @return None.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   121
	     */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   122
		void ConstructL();
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   123
		/**
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   124
	     * Default Constructor.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   125
	     * @param None.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   126
	     * @return None.
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   127
	     */
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   128
		CSingleContactField();
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
    private: //Data Members
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
    //FieldKey, Label, and Value in a given field
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   133
    HBufC8* iFieldKey;
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   134
    HBufC* iLabel;
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   135
    HBufC* iValue;
22
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
   136
    RPointerArray<HBufC> iArrayValue;
19
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   137
    //In case the value is of type TTime
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   138
    TTime iDateAndTime;
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
    //In case we are iterating a group
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   141
    HBufC* iGroupLabel;
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   142
    RPointerArray<HBufC8> iContactIdArray;
22
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
   143
    RPointerArray<HBufC> iUriData;
fc9cf246af83 Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
   144
    RPointerArray<HBufC> iidArray;
19
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
989d2f495d90 Revision: 200923
Pat Downey <patrick.downey@nokia.com>
parents:
diff changeset
   148
#endif //SINGLECONTACTFIELD_H