classicui_plat/extended_aiw_criteria_api/inc/AiwContactSelectionDataTypes.h
changeset 0 2f259fa3e83a
child 4 8ca85d2f0db7
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2005 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:     Defines types used in AIW contact selection.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef __AIWCONTACTSELECTIONDATATYPES_H__
       
    23 #define __AIWCONTACTSELECTIONDATATYPES_H__
       
    24 
       
    25 #include <aiwgenericparam.hrh>
       
    26 
       
    27 class RVPbkContactFieldDefaultPriorities;
       
    28 class CVPbkFieldTypeSelector;
       
    29 
       
    30 /**
       
    31  * Type of the contact selection.
       
    32  */
       
    33 enum TAiwContactSelectionDataType
       
    34     {
       
    35     EAiwContactSelectionDataTypeNotDefined,
       
    36     EAiwSingleEntrySelectionV1,
       
    37     EAiwMultipleEntrySelectionV1,
       
    38     EAiwSingleItemSelectionV1,
       
    39     EAiwSingleItemSelectionV2,
       
    40     EAiwSingleEntrySelectionV2,
       
    41     EAiwMultipleEntrySelectionV2,
       
    42     EAiwSingleItemSelectionV3,
       
    43     EAiwMultipleItemSelectionV1
       
    44     };
       
    45 
       
    46 /**
       
    47  * Type of the address select.
       
    48  */
       
    49 enum TAiwAddressSelectType
       
    50     {
       
    51     EAiwAllItemsSelect,
       
    52     EAiwPhoneNumberSelect,
       
    53     EAiwVideoNumberSelect,
       
    54     EAiwPOCNumberSelect,
       
    55     EAiwEMailSelect,
       
    56     EAiwMMSSelect,
       
    57     EAiwSMSEMailSelect,
       
    58     EAiwVOIPSelect,
       
    59     EAiwSIPSelect,
       
    60     EAiwSIPMSISDNSelect,
       
    61     EAiwThumbnailSelect,
       
    62     EAiwDTMFPhoneNumberSelect,  // includes DTMF and phone number field types
       
    63     EAiwCallItemSelect,         // like phone number select but uses 'Call' as LSK
       
    64     EAiwVoIPItemSelect          // like voip address select but uses 'Call' as LSK
       
    65     };
       
    66 
       
    67 /**
       
    68  * Type of the communication address select.
       
    69  */
       
    70 enum TAiwCommAddressSelectType
       
    71     {
       
    72     EAiwCommEmpty,
       
    73     EAiwCommVoiceCall,
       
    74     EAiwCommUniEditor,
       
    75     EAiwCommEmailEditor,
       
    76     EAiwCommInstantMessaging,
       
    77     EAiwCommVOIPCall,
       
    78     EAiwCommURL,
       
    79     EAiwCommVideoCall
       
    80     };
       
    81 
       
    82 /**
       
    83  * Parameter flags for selection service.
       
    84  */
       
    85 enum TSelectionFlags
       
    86     { 
       
    87     /**
       
    88      * Excludes group view from the fetch dialog, has no meaning elsewhere
       
    89      * than in multiple entry fetch context.
       
    90      */
       
    91     EExcludeGroupsView  = 0x0001,
       
    92     /**
       
    93      * If set the fetch dialog will use default provider title
       
    94      * ("Contacts", for example), otherwise client's current title is used.
       
    95      */
       
    96     EUseProviderTitle   = 0x0002,
       
    97     
       
    98     /**
       
    99      * If set the fetch dialog will NOT use default field even if it exists
       
   100      * for communication method, i.e. fetch dialog will be always shown if
       
   101      * there are 2 or more items to show.
       
   102      */
       
   103     EDoNotUseDefaultField   = 0x0004,
       
   104 
       
   105     /**
       
   106      * If set the fetch view will use custom filtering. When building the
       
   107      * view the client is asked with KAiwEventInParamCheck, for every contact,
       
   108      * does the contact belong to the view. This is rather slow.
       
   109      */
       
   110     EUseClientSideFiltering = 0x0008
       
   111     };
       
   112 
       
   113 /**
       
   114  * Base class for different versions of the contact selection data.
       
   115  */
       
   116 class TAiwContactSelectionDataBase
       
   117     {
       
   118     public: // Type checking
       
   119         /**
       
   120          * Function for checking the type of the contact selection
       
   121          * data in a data buffer.
       
   122          *
       
   123          * @param aBuffer A buffer containing an instance of a contact 
       
   124          *                selection data class derived from this class.
       
   125          * @return  Type of the data class that is in the buffer.
       
   126          */
       
   127         inline static TAiwContactSelectionDataType SelectionDataTypeFromBuffer(
       
   128                     const TDesC8& aBuffer );
       
   129                 
       
   130         /**
       
   131          * Public constructor.
       
   132          */
       
   133         explicit inline TAiwContactSelectionDataBase();
       
   134 
       
   135     protected: // Constructor
       
   136         /**
       
   137          * Constructor that sets the type of the data class.
       
   138          *
       
   139          * @param aSelectionDataType    Type of the contact selection data.
       
   140          */
       
   141         inline TAiwContactSelectionDataBase(
       
   142                 TAiwContactSelectionDataType aSelectionDataType );
       
   143         
       
   144     private: // Implementation 
       
   145         /**
       
   146          * Returns the type of the contact selection data class.
       
   147          *
       
   148          * @return  The type of the contact selection data class.
       
   149          */
       
   150         inline TAiwContactSelectionDataType SelectionDataType() const;
       
   151         
       
   152     private: // Data
       
   153         /// Own: Type of the contact selection data class.
       
   154         TAiwContactSelectionDataType iSelectionDataType;
       
   155     };
       
   156 
       
   157 /**
       
   158  * Version 1 of the single entry selection data.
       
   159  *
       
   160  * All setters return a reference to this object so that the setters
       
   161  * can be easily chained to produce more compact code, for example:
       
   162  *      selectionData.SetProperty(EAiwProperty)
       
   163  *                   .SetAnotherProperty(EAiwAnotherProperty)
       
   164  */
       
   165 class TAiwSingleEntrySelectionDataV1 : public TAiwContactSelectionDataBase
       
   166     {
       
   167     public: // Data type
       
   168         static const TAiwContactSelectionDataType
       
   169                 KSelectionDataType = EAiwSingleEntrySelectionV1;
       
   170         
       
   171     public: // Construction
       
   172         /**
       
   173          * Constructor.
       
   174          */
       
   175         explicit inline TAiwSingleEntrySelectionDataV1();
       
   176 
       
   177     public: // Setters for the data members
       
   178         /**
       
   179          * Sets selection flags, @see TSelectionFlags.
       
   180          *
       
   181          * @param aFlags    The flags to set.
       
   182          * @return  Reference to this object.
       
   183          */
       
   184         inline TAiwSingleEntrySelectionDataV1& SetFlags(
       
   185                 TUint aFlags );
       
   186 
       
   187     public: // Getters for the data members
       
   188         /**
       
   189          * Returns selection flags, @see TSelectionFlags.
       
   190          *
       
   191          * @return  Selection flags.
       
   192          */
       
   193         inline TUint Flags() const;
       
   194 
       
   195     private: // Data
       
   196         /// Own: Selection flags.
       
   197         TUint iFlags;
       
   198     };
       
   199 
       
   200 /**
       
   201  * Version 2 of the single entry selection data.
       
   202  *
       
   203  * All setters return a reference to this object so that the setters
       
   204  * can be easily chained to produce more compact code, for example:
       
   205  *      selectionData.SetProperty(EAiwProperty)
       
   206  *                   .SetAnotherProperty(EAiwAnotherProperty)
       
   207  */
       
   208 class TAiwSingleEntrySelectionDataV2 : public TAiwContactSelectionDataBase
       
   209     {
       
   210     public: // Data type
       
   211         static const TAiwContactSelectionDataType
       
   212                 KSelectionDataType = EAiwSingleEntrySelectionV2;
       
   213         
       
   214     public: // Construction
       
   215         /**
       
   216          * Constructor.
       
   217          */
       
   218         explicit inline TAiwSingleEntrySelectionDataV2();
       
   219 
       
   220     public: // Setters for the data members
       
   221         /**
       
   222          * Sets selection flags, @see TSelectionFlags.
       
   223          *
       
   224          * @param aFlags The flags to set.
       
   225          * @return Reference to this object.
       
   226          */
       
   227         inline TAiwSingleEntrySelectionDataV2& SetFlags(
       
   228                 TUint aFlags );
       
   229 
       
   230         /**
       
   231          * Sets field type filter for fetch. Only contacts having the
       
   232          * fields defined by the filter will be visible in the fetch view.
       
   233          * Use of NULL filter means nothing is filtered.
       
   234          * @see CVPbkFieldTypeSelector
       
   235          * @see VPbkContactViewFilterBuilder::BuildContactViewFilterL
       
   236          *
       
   237          * @param aFlags    The filter to set.
       
   238          * @return Reference to this object.
       
   239          */
       
   240         inline TAiwSingleEntrySelectionDataV2& SetFetchFilter(
       
   241                 CVPbkFieldTypeSelector* aFilter );
       
   242 
       
   243     public: // Getters for the data members
       
   244         /**
       
   245          * Returns selection flags, @see TSelectionFlags.
       
   246          *
       
   247          * @return  Selection flags.
       
   248          */
       
   249         inline TUint Flags() const;
       
   250 
       
   251         /**
       
   252          * Returns field type filter used in fetch.
       
   253          *
       
   254          * @return  Field type filter.
       
   255          */
       
   256         inline CVPbkFieldTypeSelector* FetchFilter() const;
       
   257 
       
   258     private: // Data
       
   259         /// Own: Selection flags.
       
   260         TUint iFlags;
       
   261         /// Ref: Field type filter.
       
   262         CVPbkFieldTypeSelector* iFetchFilter;
       
   263     };
       
   264     
       
   265 /**
       
   266  * Version 1 of the multiple entry selection data.
       
   267  *
       
   268  * All setters return a reference to this object so that the setters
       
   269  * can be easily chained to produce more compact code, for example:
       
   270  *      selectionData.SetProperty(EAiwProperty)
       
   271  *                   .SetAnotherProperty(EAiwAnotherProperty)
       
   272  */
       
   273 class TAiwMultipleEntrySelectionDataV1 : public TAiwContactSelectionDataBase
       
   274     {
       
   275     public: // Data type
       
   276         static const TAiwContactSelectionDataType
       
   277                 KSelectionDataType = EAiwMultipleEntrySelectionV1;
       
   278         
       
   279     public: // Construction
       
   280         /**
       
   281          * Constructor.
       
   282          */
       
   283         explicit inline TAiwMultipleEntrySelectionDataV1();
       
   284 
       
   285     public: // Setters for the data members
       
   286         /**
       
   287          * Sets selection flags, @see TSelectionFlags.
       
   288          *
       
   289          * @param aFlags The flags to set.
       
   290          * @return  Reference to this object.
       
   291          */
       
   292         inline TAiwMultipleEntrySelectionDataV1& SetFlags(
       
   293                 TUint aFlags );
       
   294 
       
   295     public: // Getters for the data members
       
   296         /**
       
   297          * Returns selection flags, @see TSelectionFlags.
       
   298          *
       
   299          * @return Selection flags.
       
   300          */
       
   301         inline TUint Flags() const;
       
   302 
       
   303     private: // Data
       
   304         /// Own: Selection flags.
       
   305         TUint iFlags;
       
   306     };
       
   307 
       
   308 /**
       
   309  * Version 2 of the multiple entry selection data.
       
   310  *
       
   311  * All setters return a reference to this object so that the setters
       
   312  * can be easily chained to produce more compact code, for example:
       
   313  *      selectionData.SetProperty(EAiwProperty)
       
   314  *                   .SetAnotherProperty(EAiwAnotherProperty)
       
   315  */
       
   316 class TAiwMultipleEntrySelectionDataV2 : public TAiwContactSelectionDataBase
       
   317     {
       
   318     public: // Data type
       
   319         static const TAiwContactSelectionDataType
       
   320                 KSelectionDataType = EAiwMultipleEntrySelectionV2;
       
   321         
       
   322     public: // Construction
       
   323         /**
       
   324          * Constructor.
       
   325          */
       
   326         explicit inline TAiwMultipleEntrySelectionDataV2();
       
   327 
       
   328     public: // Setters for the data members
       
   329         /**
       
   330          * Sets selection flags, @see TSelectionFlags.
       
   331          *
       
   332          * @param aFlags The flags to set.
       
   333          * @return  Reference to this object.
       
   334          */
       
   335         inline TAiwMultipleEntrySelectionDataV2& SetFlags(
       
   336                 TUint aFlags );
       
   337 
       
   338         /**
       
   339          * Sets field type filter for fetch. Only contacts having the fields
       
   340          * defined by the filter will be visible in the fetch view.
       
   341          * Use of NULL filter means nothing is filtered.
       
   342          * @see CVPbkFieldTypeSelector
       
   343          * @see VPbkContactViewFilterBuilder::BuildContactViewFilterL
       
   344          *
       
   345          * @param aFlags    The filter to set.
       
   346          * @return Reference to this object.
       
   347          */
       
   348         inline TAiwMultipleEntrySelectionDataV2& SetFetchFilter(
       
   349                 CVPbkFieldTypeSelector* aFilter );
       
   350 
       
   351     public: // Getters for the data members
       
   352         /**
       
   353          * Returns selection flags, @see TSelectionFlags.
       
   354          *
       
   355          * @return Selection flags.
       
   356          */
       
   357         inline TUint Flags() const;
       
   358 
       
   359         /**
       
   360          * Returns field type filter used in fetch.
       
   361          *
       
   362          * @return  Field type filter.
       
   363          */
       
   364         inline CVPbkFieldTypeSelector* FetchFilter() const;
       
   365 
       
   366     private: // Data
       
   367         /// Own: Selection flags.
       
   368         TUint iFlags;
       
   369         /// Ref: Field type filter.
       
   370         CVPbkFieldTypeSelector* iFetchFilter;
       
   371     };
       
   372 
       
   373 /**
       
   374  * Version 1 of the single item selection data.
       
   375  *
       
   376  * All setters return a reference to this object so that the setters
       
   377  * can be easily chained to produce more compact code, for example:
       
   378  *      selectionData.SetProperty(EAiwProperty)
       
   379  *                   .SetAnotherProperty(EAiwAnotherProperty)
       
   380  */
       
   381 class TAiwSingleItemSelectionDataV1 : public TAiwContactSelectionDataBase
       
   382     {
       
   383     public: // Data type
       
   384         static const TAiwContactSelectionDataType
       
   385                 KSelectionDataType = EAiwSingleItemSelectionV1;
       
   386         
       
   387     public: // Construction
       
   388         /**
       
   389          * Constructor.
       
   390          */
       
   391         explicit inline TAiwSingleItemSelectionDataV1();
       
   392         
       
   393     public: // Setters for the data members
       
   394         /**
       
   395          * Sets selection flags, @see TSelectionFlags.
       
   396          *
       
   397          * @param aFlags The flags to set.
       
   398          * @return Reference to this object.
       
   399          */
       
   400         inline TAiwSingleItemSelectionDataV1& SetFlags(
       
   401                 TUint aFlags );
       
   402 
       
   403         /**
       
   404          * Sets address select type.
       
   405          *
       
   406          * @param aAddressSelectType Address select type,
       
   407          *                           @see TAiwAddressSelectType.
       
   408          * @return  Reference to this object.
       
   409          */
       
   410         inline TAiwSingleItemSelectionDataV1& SetAddressSelectType(
       
   411                 TAiwAddressSelectType aAddressSelectType );
       
   412                 
       
   413         /**
       
   414          * Sets communication address select type.
       
   415          *
       
   416          * @param aCommAddressSelectType Communication address select type,
       
   417          *                           @see TAiwCommAddressSelectType.
       
   418          * @return  Reference to this object.
       
   419          */
       
   420         inline TAiwSingleItemSelectionDataV1& SetCommAddressSelectType(
       
   421                 TAiwCommAddressSelectType aCommAddressSelectType );
       
   422 
       
   423         /**
       
   424          * Sets address select default priorities.
       
   425          * The defaults to use should be placed in priority order in
       
   426          * to the array, the highest priority default should come first.
       
   427          * If no default priorities are set, defaults are not used in
       
   428          * address select.
       
   429          *
       
   430          * The caller can free the passed array right after HandleServiceCmdL
       
   431          * call, since the array is there externalized to a buffer.
       
   432          *
       
   433          * @param aDefaultPriorities Prioritized array of defaults to use,
       
   434          *                           @see RVPbkContactFieldDefaultPriorities.
       
   435          * @return  Reference to this object.
       
   436          */
       
   437         inline TAiwSingleItemSelectionDataV1& SetDefaultPriorities(
       
   438                 RVPbkContactFieldDefaultPriorities& aDefaultPriorities );
       
   439             
       
   440     public: // Getters for the data members
       
   441         /**
       
   442          * Returns selection flags, @see TSelectionFlags.
       
   443          *
       
   444          * @return  Selection flags.
       
   445          */
       
   446         inline TUint Flags() const;
       
   447 
       
   448         /**
       
   449          * Returns the type of the address select.
       
   450          *
       
   451          * @return  Type of the address select, @see TAiwAddressSelectType.
       
   452          */
       
   453         inline TAiwAddressSelectType AddressSelectType() const;
       
   454 
       
   455         /**
       
   456          * Returns the type of the communication address select.
       
   457          *
       
   458          * @return  Type of the communication address select,
       
   459          *          @see TAiwCommAddressSelectType.
       
   460          */
       
   461         inline TAiwCommAddressSelectType CommAddressSelectType() const;
       
   462         
       
   463         /**
       
   464          * Returns the address select default priorities
       
   465          *
       
   466          * @return  Prioritized array of defaults to use or NULL,
       
   467          *          @see RVPbkContactFieldDefaultPriorities.
       
   468          */
       
   469         inline RVPbkContactFieldDefaultPriorities* DefaultPriorities() const;
       
   470         
       
   471     private: // Data
       
   472         /// Own: Selection flags.
       
   473         TUint iFlags;
       
   474         /// Own: Address select type.
       
   475         TAiwAddressSelectType iAddressSelectType;
       
   476         
       
   477         /// Own: Communication address select type. If specified, used
       
   478         /// instead of iAddressSelectType.
       
   479         TAiwCommAddressSelectType iCommAddressSelectType;
       
   480 
       
   481         /// Ref: Prioritized array of defaults to use.
       
   482         RVPbkContactFieldDefaultPriorities* iDefaultPriorities;
       
   483         
       
   484         /// For future use. 
       
   485         TInt32 iReserved[4];
       
   486     };
       
   487     
       
   488 /**
       
   489  * Version 2 of the single item selection data. Deprecated, do not use!!
       
   490  *
       
   491  * @deprecated
       
   492  */
       
   493 class TAiwSingleItemSelectionDataV2 : public TAiwContactSelectionDataBase
       
   494     {
       
   495     public: // Data type
       
   496         static const TAiwContactSelectionDataType
       
   497                 KSelectionDataType = EAiwSingleItemSelectionV2;
       
   498         
       
   499     public: // Construction
       
   500         /**
       
   501          * Constructor.
       
   502          *
       
   503          * @deprecated
       
   504          */
       
   505         explicit inline TAiwSingleItemSelectionDataV2();
       
   506         
       
   507     public: // Setters for the data members
       
   508         /**
       
   509          * Sets selection flags, @see TSelectionFlags.
       
   510          *
       
   511          * @param aFlags The flags to set.
       
   512          * @return  Reference to this object.
       
   513          * @deprecated
       
   514          */
       
   515         inline TAiwSingleItemSelectionDataV2& SetFlags(
       
   516                 TUint aFlags );
       
   517 
       
   518         /**
       
   519          * Sets resource ID for the address select dialog.
       
   520          * @see PBK2_ADDRESS_SELECT resource struct.
       
   521          * 
       
   522          *
       
   523          * @param aAddressSelectResourceId  Address select resource id.
       
   524          * @return  Reference to this object.
       
   525          * @deprecated
       
   526          */
       
   527         inline TAiwSingleItemSelectionDataV2& SetAddressSelectResourceId(
       
   528                 TInt aAddressSelectResourceId );
       
   529 
       
   530         /**
       
   531          * Sets address select default priorities.
       
   532          * The defaults to use should be placed in priority order in
       
   533          * to the array, the highest priority default should come first.
       
   534          * If no default priorities are set, defaults are not used in
       
   535          * address select.
       
   536          *
       
   537          * The caller can free the passed array right after HandleServiceCmdL
       
   538          * call, since the array is there externalized to a buffer.
       
   539          *
       
   540          * @param aDefaultPriorities Prioritized array of defaults to use,
       
   541          *                           @see RVPbkContactFieldDefaultPriorities.
       
   542          * @return  Reference to this object.
       
   543          * @deprecated
       
   544          */
       
   545         inline TAiwSingleItemSelectionDataV2& SetDefaultPriorities(
       
   546                 RVPbkContactFieldDefaultPriorities& aDefaultPriorities );
       
   547             
       
   548             
       
   549     public: // Getters for the data members
       
   550         /**
       
   551          * Returns selection flags, @see TSelectionFlags.
       
   552          *
       
   553          * @return  Selection flags.
       
   554          * @deprecated
       
   555          */
       
   556         inline TUint Flags() const;
       
   557 
       
   558         /**
       
   559          * Returns the address select resource id.
       
   560          *
       
   561          * @return  Address select resource id.
       
   562          * @deprecated
       
   563          */
       
   564         inline TInt AddressSelectResourceId() const;
       
   565         
       
   566         /**
       
   567          * Returns the address select default priorities
       
   568          *
       
   569          * @return  Prioritized array of defaults to use or NULL,
       
   570          *          @see RVPbkContactFieldDefaultPriorities.
       
   571          * @deprecated
       
   572          */
       
   573         inline RVPbkContactFieldDefaultPriorities* DefaultPriorities() const;
       
   574         
       
   575     private: // Data
       
   576         /// Own: Selection flags.
       
   577         TUint iFlags;
       
   578         /// Own: Address select resource id.
       
   579         TInt iAddressSelectResourceId;
       
   580         /// Ref: Prioritized array of defaults to use.
       
   581         RVPbkContactFieldDefaultPriorities* iDefaultPriorities;
       
   582     };
       
   583 
       
   584 /**
       
   585  * Version 3 of the single item selection data.
       
   586  *
       
   587  * All setters return a reference to this object so that the setters
       
   588  * can be easily chained to produce more compact code, for example:
       
   589  *      selectionData.SetProperty(EAiwProperty)
       
   590  *                   .SetAnotherProperty(EAiwAnotherProperty)
       
   591  */
       
   592 class TAiwSingleItemSelectionDataV3 : public TAiwContactSelectionDataBase
       
   593     {
       
   594     public: // Data type
       
   595         static const TAiwContactSelectionDataType
       
   596                 KSelectionDataType = EAiwSingleItemSelectionV3;
       
   597         
       
   598     public: // Construction
       
   599         /**
       
   600          * Constructor.
       
   601          */
       
   602         explicit inline TAiwSingleItemSelectionDataV3();
       
   603         
       
   604     public: // Setters for the data members
       
   605         /**
       
   606          * Sets selection flags, @see TSelectionFlags.
       
   607          *
       
   608          * @param aFlags The flags to set.
       
   609          * @return  Reference to this object.
       
   610          */
       
   611         inline TAiwSingleItemSelectionDataV3& SetFlags(
       
   612                 TUint aFlags );
       
   613 
       
   614         /**
       
   615          * Sets address select type.
       
   616          *
       
   617          * @param aAddressSelectType Address select type,
       
   618          *                           @see TAiwAddressSelectType.
       
   619          * @return  Reference to this object.
       
   620          */
       
   621         inline TAiwSingleItemSelectionDataV3& SetAddressSelectType(
       
   622                 TAiwAddressSelectType aAddressSelectType );
       
   623 
       
   624         /**
       
   625          * Sets communication address select type.
       
   626          *
       
   627          * @param aCommAddressSelectType Communication address select type,
       
   628          *                           @see TAiwCommAddressSelectType.
       
   629          * @return  Reference to this object.
       
   630          */
       
   631         inline TAiwSingleItemSelectionDataV3& SetCommAddressSelectType(
       
   632                 TAiwCommAddressSelectType aCommAddressSelectType );
       
   633 
       
   634         /**
       
   635          * Sets address select default priorities.
       
   636          * The defaults to use should be placed in priority order in
       
   637          * to the array, the highest priority default should come first.
       
   638          * If no default priorities are set, defaults are not used in
       
   639          * address select.
       
   640          *
       
   641          * The caller can free the passed array right after HandleServiceCmdL
       
   642          * call, since the array is there externalized to a buffer.
       
   643          *
       
   644          * @param aDefaultPriorities Prioritized array of defaults to use,
       
   645          *                           @see RVPbkContactFieldDefaultPriorities.
       
   646          * @return  Reference to this object.
       
   647          */
       
   648         inline TAiwSingleItemSelectionDataV3& SetDefaultPriorities(
       
   649                 RVPbkContactFieldDefaultPriorities& aDefaultPriorities );
       
   650 
       
   651         /**
       
   652          * Sets field type filter for fetch. Only contacts having the fields
       
   653          * defined by the filter will be visible in the fetch view.
       
   654          * Use of NULL filter means nothing is filtered.
       
   655          * @see CVPbkFieldTypeSelector
       
   656          * @see VPbkContactViewFilterBuilder::BuildContactViewFilterL
       
   657          *
       
   658          * @param aFlags    The filter to set.
       
   659          * @return Reference to this object.
       
   660          */
       
   661         inline TAiwSingleItemSelectionDataV3& SetFetchFilter(
       
   662                 CVPbkFieldTypeSelector* aFilter );
       
   663             
       
   664     public: // Getters for the data members
       
   665         /**
       
   666          * Returns selection flags, @see TSelectionFlags.
       
   667          *
       
   668          * @return  Selection flags.
       
   669          */
       
   670         inline TUint Flags() const;
       
   671 
       
   672         /**
       
   673          * Returns the type of the address select.
       
   674          *
       
   675          * @return  Type of the address select, @see TAiwAddressSelectType.
       
   676          */
       
   677         inline TAiwAddressSelectType AddressSelectType() const;
       
   678         
       
   679         /**
       
   680          * Returns the type of the communication address select.
       
   681          *
       
   682          * @return  Type of the communication address select,
       
   683          *          @see TAiwCommAddressSelectType.
       
   684          */
       
   685         inline TAiwCommAddressSelectType CommAddressSelectType() const;
       
   686         
       
   687         /**
       
   688          * Returns the address select default priorities.
       
   689          *
       
   690          * @return  Prioritized array of defaults to use or NULL,
       
   691          *          @see RVPbkContactFieldDefaultPriorities.
       
   692          */
       
   693         inline RVPbkContactFieldDefaultPriorities* DefaultPriorities() const;
       
   694 
       
   695         /**
       
   696          * Returns field type filter used in fetch.
       
   697          *
       
   698          * @return  Field type filter.
       
   699          */
       
   700         inline CVPbkFieldTypeSelector* FetchFilter() const;
       
   701         
       
   702     private: // Data
       
   703         /// Own: Selection flags.
       
   704         TUint iFlags;
       
   705         /// Own: Address select type.
       
   706         TAiwAddressSelectType iAddressSelectType;
       
   707         /// Own: Communication address select type. If specified, used
       
   708         /// instead of iAddressSelectType.
       
   709         TAiwCommAddressSelectType iCommAddressSelectType;
       
   710 
       
   711         /// Ref: Prioritized array of defaults to use.
       
   712         RVPbkContactFieldDefaultPriorities* iDefaultPriorities;
       
   713         /// Ref: Field type filter.
       
   714         CVPbkFieldTypeSelector* iFetchFilter;
       
   715         
       
   716         /// For future use. 
       
   717         TInt32 iReserved[4];
       
   718     };
       
   719 /**
       
   720  * Version 1 of the multiple item selection data.
       
   721  *
       
   722  * All setters return a reference to this object so that the setters
       
   723  * can be easily chained to produce more compact code, for example:
       
   724  *      selectionData.SetProperty(EAiwProperty)
       
   725  *                   .SetAnotherProperty(EAiwAnotherProperty)
       
   726  */
       
   727 class TAiwMultipleItemSelectionDataV1 : public TAiwContactSelectionDataBase
       
   728     {
       
   729     public: // Data type
       
   730         static const TAiwContactSelectionDataType
       
   731                 KSelectionDataType = EAiwMultipleItemSelectionV1;
       
   732         
       
   733     public: // Construction
       
   734         /**
       
   735          * Constructor.
       
   736          */
       
   737         explicit inline TAiwMultipleItemSelectionDataV1();
       
   738         
       
   739     public: // Setters for the data members
       
   740         /**
       
   741          * Sets selection flags, @see TSelectionFlags.
       
   742          *
       
   743          * @param aFlags The flags to set.
       
   744          * @return  Reference to this object.
       
   745          */
       
   746         inline TAiwMultipleItemSelectionDataV1& SetFlags(
       
   747                 TUint aFlags );
       
   748 
       
   749         /**
       
   750          * Sets address select type.
       
   751          *
       
   752          * @param aAddressSelectType Address select type,
       
   753          *                           @see TAiwAddressSelectType.
       
   754          * @return  Reference to this object.
       
   755          */
       
   756         inline TAiwMultipleItemSelectionDataV1& SetAddressSelectType(
       
   757                 TAiwAddressSelectType aAddressSelectType );
       
   758 
       
   759         /**
       
   760          * Sets address select default priorities.
       
   761          * The defaults to use should be placed in priority order in
       
   762          * to the array, the highest priority default should come first.
       
   763          * If no default priorities are set, defaults are not used in
       
   764          * address select.
       
   765          *
       
   766          * The caller can free the passed array right after HandleServiceCmdL
       
   767          * call, since the array is there externalized to a buffer.
       
   768          *
       
   769          * @param aDefaultPriorities Prioritized array of defaults to use,
       
   770          *                           @see RVPbkContactFieldDefaultPriorities.
       
   771          * @return  Reference to this object.
       
   772          */
       
   773         inline TAiwMultipleItemSelectionDataV1& SetDefaultPriorities(
       
   774                 RVPbkContactFieldDefaultPriorities& aDefaultPriorities );
       
   775 
       
   776         /**
       
   777          * Sets field type filter for fetch. Only contacts having the fields
       
   778          * defined by the filter will be visible in the fetch view.
       
   779          * Use of NULL filter means nothing is filtered.
       
   780          * @see CVPbkFieldTypeSelector
       
   781          * @see VPbkContactViewFilterBuilder::BuildContactViewFilterL
       
   782          *
       
   783          * @param aFlags    The filter to set.
       
   784          * @return Reference to this object.
       
   785          */
       
   786         inline TAiwMultipleItemSelectionDataV1& SetFetchFilter(
       
   787                 CVPbkFieldTypeSelector* aFilter );
       
   788             
       
   789     public: // Getters for the data members
       
   790         /**
       
   791          * Returns selection flags, @see TSelectionFlags.
       
   792          *
       
   793          * @return  Selection flags.
       
   794          */
       
   795         inline TUint Flags() const;
       
   796 
       
   797         /**
       
   798          * Returns the type of the address select.
       
   799          *
       
   800          * @return  Type of the address select, @see TAiwAddressSelectType.
       
   801          */
       
   802         inline TAiwAddressSelectType AddressSelectType() const;
       
   803         
       
   804         /**
       
   805          * Returns the address select default priorities.
       
   806          *
       
   807          * @return  Prioritized array of defaults to use or NULL,
       
   808          *          @see RVPbkContactFieldDefaultPriorities.
       
   809          */
       
   810         inline RVPbkContactFieldDefaultPriorities* DefaultPriorities() const;
       
   811 
       
   812         /**
       
   813          * Returns field type filter used in fetch.
       
   814          *
       
   815          * @return  Field type filter.
       
   816          */
       
   817         inline CVPbkFieldTypeSelector* FetchFilter() const;
       
   818         
       
   819     private: // Data
       
   820         /// Own: Selection flags.
       
   821         TUint iFlags;
       
   822         /// Own: Address select type.
       
   823         TAiwAddressSelectType iAddressSelectType;
       
   824         /// Ref: Prioritized array of defaults to use.
       
   825         RVPbkContactFieldDefaultPriorities* iDefaultPriorities;
       
   826         /// Ref: Field type filter.
       
   827         CVPbkFieldTypeSelector* iFetchFilter;
       
   828 
       
   829     };
       
   830     
       
   831 typedef TPckgBuf<TAiwContactSelectionDataBase>      TAiwContactSelectionDataBasePckg;
       
   832 typedef TPckgBuf<TAiwSingleEntrySelectionDataV1>    TAiwSingleEntrySelectionDataV1Pckg;
       
   833 typedef TPckgBuf<TAiwSingleEntrySelectionDataV2>    TAiwSingleEntrySelectionDataV2Pckg;
       
   834 typedef TPckgBuf<TAiwMultipleEntrySelectionDataV1>  TAiwMultipleEntrySelectionDataV1Pckg;
       
   835 typedef TPckgBuf<TAiwMultipleEntrySelectionDataV2>  TAiwMultipleEntrySelectionDataV2Pckg;
       
   836 typedef TPckgBuf<TAiwSingleItemSelectionDataV1>     TAiwSingleItemSelectionDataV1Pckg;
       
   837 typedef TPckgBuf<TAiwSingleItemSelectionDataV2>     TAiwSingleItemSelectionDataV2Pckg;
       
   838 typedef TPckgBuf<TAiwSingleItemSelectionDataV3>     TAiwSingleItemSelectionDataV3Pckg;
       
   839 typedef TPckgBuf<TAiwMultipleItemSelectionDataV1>   TAiwMultipleItemSelectionDataV1Pckg;
       
   840     
       
   841 #include <aiwcontactselectiondatatypes.inl>
       
   842 
       
   843 #endif // __AiwContactSelectionDataTypes_H__
       
   844 
       
   845 // End of File