phoneengine/PhoneCntFinder/ContactService/inc/tphcntservicerequestparams.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Classes for service requests made to CPhCntService
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TPHCNTSERVICEREQUESTPARAMS_H
       
    20 #define TPHCNTSERVICEREQUESTPARAMS_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <AiwCommon.hrh>
       
    24 #include <RVPbkContactFieldDefaultPriorities.h>
       
    25 
       
    26 #include "mphcntservicerequestparam.h"
       
    27 #include "CPhCntSingleItemFetch.h"
       
    28 
       
    29 class CAiwGenericParamList;
       
    30 class MPhCntContactManager;
       
    31 class MVPbkContactLinkArray;
       
    32 
       
    33 /**
       
    34  *  Base class for service request params.
       
    35  *
       
    36  *  @lib PhoneCntFinder
       
    37  *  @since S60 v3.1
       
    38  */
       
    39 NONSHARABLE_CLASS( CPhCntServiceRequestParams ) : 
       
    40     public CBase, 
       
    41     public MPhCntServiceRequestParam
       
    42     {
       
    43 
       
    44 public:
       
    45 
       
    46     /** 
       
    47      * Destructor.
       
    48      *
       
    49      * @since S60 v3.1
       
    50      */
       
    51     ~CPhCntServiceRequestParams();
       
    52     
       
    53 // From base class MPhCntServiceRequestParam
       
    54 
       
    55     /**
       
    56      * From base class MPhCntServiceRequestParam
       
    57      * 
       
    58      * @since S60 v3,1
       
    59      * @see MPhCntServiceRequestParam
       
    60      */
       
    61     TAiwServiceCommands Command() const;
       
    62     
       
    63     /**
       
    64      * From base class MPhCntServiceRequestParam
       
    65      * 
       
    66      * @since S60 v3,1
       
    67      * @see MPhCntServiceRequestParam
       
    68      */
       
    69     const CAiwGenericParamList& InParamList() const;
       
    70     
       
    71 protected:
       
    72     
       
    73     /**
       
    74      * Constructor.
       
    75      *
       
    76      * @since S60 v3.1
       
    77      * @param aAiwCommand AIW command.
       
    78      */
       
    79     CPhCntServiceRequestParams( TAiwServiceCommands aAiwCommand );
       
    80     
       
    81     void BaseConstructL();
       
    82     
       
    83 
       
    84 private: // data
       
    85 
       
    86     /**
       
    87      * Command used with aiw.
       
    88      */
       
    89     TAiwServiceCommands iAiwCommand;
       
    90     
       
    91 protected:
       
    92 
       
    93     /**
       
    94      * Param list used with AIW.
       
    95      * Own.
       
    96      */
       
    97     CAiwGenericParamList* iGenericParamList;
       
    98     
       
    99     /**
       
   100      * Default numbers.
       
   101      * Own.
       
   102      */
       
   103     RVPbkContactFieldDefaultPriorities iDefaultPriorities; 
       
   104     };
       
   105     
       
   106 /**
       
   107  *  Request parameters for creating new contact.
       
   108  *
       
   109  *  @lib PhoneCntFinder
       
   110  *  @since S60 v3.1
       
   111  */
       
   112 NONSHARABLE_CLASS( CPhCntCreateNewContactParams ) 
       
   113     : public CPhCntServiceRequestParams
       
   114     {
       
   115 public:
       
   116     
       
   117     /**
       
   118      * Static constructor.
       
   119      * 
       
   120      * @since S60 v3.1
       
   121      * @param aPhoneNumber Phone number of the new contact.
       
   122      */
       
   123     static CPhCntCreateNewContactParams* NewL( 
       
   124         const TDesC& aPhoneNumber );  
       
   125     
       
   126     /**
       
   127      * Static constructor.
       
   128      * 
       
   129      * @since S60 v3.1
       
   130      * @param aPhoneNumber Phone number of the new contact.
       
   131      */
       
   132     static CPhCntCreateNewContactParams* NewLC(
       
   133         const TDesC& aPhoneNumber );  
       
   134     
       
   135 private:
       
   136     
       
   137     CPhCntCreateNewContactParams( const TDesC& aPhoneNumber );
       
   138     
       
   139     void ConstructL();
       
   140     
       
   141 private:
       
   142     
       
   143     /**
       
   144      * Phone number set to created contact.
       
   145      * Not own.
       
   146      */
       
   147     const TDesC& iPhoneNumber;
       
   148     
       
   149     };
       
   150     
       
   151 /**
       
   152  *  Request parameters for updating existing contact.
       
   153  *
       
   154  *  @lib PhoneCntFinder
       
   155  *  @since S60 v3.1
       
   156  */
       
   157 NONSHARABLE_CLASS( CPhCntUpdateExistingContact ) 
       
   158     : public CPhCntServiceRequestParams
       
   159     {
       
   160 public:
       
   161     
       
   162     /**
       
   163      * Static constructor.
       
   164      * 
       
   165      * @since S60 v3.1
       
   166      * @param aPhoneNumber Phone number to be added to existing contact..
       
   167      */
       
   168     static CPhCntUpdateExistingContact* NewL( 
       
   169         const TDesC& aPhoneNumber );  
       
   170     
       
   171     /**
       
   172      * Static constructor.
       
   173      * 
       
   174      * @since S60 v3.1
       
   175      * @param aPhoneNumber Phone number to be added to existing contact..
       
   176      */
       
   177     static CPhCntUpdateExistingContact* NewLC(
       
   178         const TDesC& aPhoneNumber );  
       
   179     
       
   180 private:
       
   181     
       
   182     CPhCntUpdateExistingContact( const TDesC& aPhoneNumber );
       
   183     
       
   184     void ConstructL();
       
   185     
       
   186 private:
       
   187     
       
   188     /**
       
   189      * Phone number set to created contact.
       
   190      * Not own.
       
   191      */
       
   192     const TDesC& iPhoneNumber;
       
   193     
       
   194     };
       
   195 class CVPbkFieldTypeSelector;
       
   196     
       
   197 /**
       
   198  *  Request parameter for getting user selected phone number link.
       
   199  *
       
   200  *  @lib PhoneCntFinder.lib
       
   201  *  @since  v3.2
       
   202  */
       
   203 NONSHARABLE_CLASS( CPhCntGetUserSelectedPhoneNumberLink ) : 
       
   204     public CPhCntServiceRequestParams
       
   205     {
       
   206 public:
       
   207 
       
   208     /**
       
   209      * Static constructor.
       
   210      * 
       
   211      * @since S60 v3.1
       
   212      * @param aCallUsedWithLSK ETrue - Left softkey is 'Call'
       
   213      *                   EFalse - Left softkey is 'Select'
       
   214      * @param aContactManager Reference to contact manager.
       
   215      */
       
   216     static CPhCntGetUserSelectedPhoneNumberLink* NewLC( TBool aCallUsedWithLSK,
       
   217                                         MPhCntContactManager& aContactManager );
       
   218     
       
   219     ~CPhCntGetUserSelectedPhoneNumberLink();
       
   220 
       
   221 private:
       
   222     
       
   223     CPhCntGetUserSelectedPhoneNumberLink();
       
   224     
       
   225     void ConstructL( TBool aCallUsedWithLSK, 
       
   226                      MPhCntContactManager& aContactManager );
       
   227 
       
   228 private: // data
       
   229 
       
   230 	/**
       
   231      * Filter
       
   232      * Own.
       
   233      */
       
   234     CVPbkFieldTypeSelector* iContactViewFilter; 
       
   235     };
       
   236     
       
   237 /**
       
   238  *  Request parameter for getting user selected voip address link.
       
   239  *
       
   240  *  @lib PhoneCntFinder.lib
       
   241  *  @since  v3.2
       
   242  */
       
   243 NONSHARABLE_CLASS( CPhCntGetUserSelectedVoIPAddressLink ) : 
       
   244     public CPhCntServiceRequestParams
       
   245     {
       
   246 public:
       
   247 
       
   248     /**
       
   249      * Static constructor.
       
   250      * 
       
   251      * @since S60 v3.1
       
   252      */
       
   253     static CPhCntGetUserSelectedVoIPAddressLink* NewLC(
       
   254         MPhCntContactManager& aContactManager,
       
   255         TBool aCallUsedWithLSK = ETrue );
       
   256     
       
   257 private:
       
   258     
       
   259     CPhCntGetUserSelectedVoIPAddressLink();
       
   260     
       
   261     void ConstructL(
       
   262         MPhCntContactManager& aContactManager,
       
   263         TBool aCallUsedWithLSK );
       
   264 
       
   265 private:
       
   266         
       
   267     /**
       
   268      * Filter
       
   269      * Own.
       
   270      */
       
   271     CVPbkFieldTypeSelector* iContactViewFilter; 
       
   272     };
       
   273 
       
   274 /**
       
   275  * Request parameter for getting user selected dtmf number link.
       
   276  *
       
   277  * @lib PhoneCntFinder.lib
       
   278  * @since v3.2
       
   279  */
       
   280 NONSHARABLE_CLASS( CPhCntGetUserSelectedDtmfNumberLink ) : 
       
   281     public CPhCntServiceRequestParams
       
   282     {
       
   283 public:
       
   284 
       
   285     /**
       
   286      * Static constructor.
       
   287      *
       
   288      * @since S60 v3.2
       
   289      * @param aContactManager Reference to contact manager.
       
   290      */
       
   291     static CPhCntGetUserSelectedDtmfNumberLink* NewLC(
       
   292         MPhCntContactManager& aContactManager );
       
   293         
       
   294     ~CPhCntGetUserSelectedDtmfNumberLink();
       
   295     
       
   296 private:
       
   297 
       
   298     CPhCntGetUserSelectedDtmfNumberLink();
       
   299     
       
   300     void ConstructL( MPhCntContactManager& aContactManager );
       
   301     
       
   302 private:
       
   303 
       
   304     /**
       
   305      * Filter
       
   306      * Own.
       
   307      */
       
   308     CVPbkFieldTypeSelector* iContactViewFilter; 
       
   309     };
       
   310 
       
   311 
       
   312 
       
   313 /**
       
   314  * Request parameter for getting a phone number from a contact link.
       
   315  *
       
   316  * @lib PhoneCntFinder.lib
       
   317  * @since v3.2
       
   318  */
       
   319 NONSHARABLE_CLASS( CPhCntGetPhoneNumberReqParam ) : 
       
   320     public CPhCntServiceRequestParams
       
   321     {
       
   322 public:
       
   323 
       
   324     /**
       
   325      * Static constructor.
       
   326      *
       
   327      * @since S60 v3.2
       
   328      * @param aContactLink Contact link
       
   329      */
       
   330     static CPhCntGetPhoneNumberReqParam* NewL(
       
   331     	MPhCntContactManager& aContactManager,
       
   332     	MVPbkContactLinkArray& aLinkArray,
       
   333     	const CPhCntSingleItemFetch::TCallType aCallType
       
   334         );
       
   335         
       
   336     ~CPhCntGetPhoneNumberReqParam();
       
   337     
       
   338 private:
       
   339 
       
   340     CPhCntGetPhoneNumberReqParam();
       
   341     
       
   342     void ConstructL( 
       
   343     	MPhCntContactManager& aContactManager, 
       
   344     	MVPbkContactLinkArray& aLinkArray, 
       
   345     	const CPhCntSingleItemFetch::TCallType aCallType
       
   346     	);
       
   347     
       
   348 private: // data
       
   349 
       
   350 	/**
       
   351      * Filter
       
   352      * Own.
       
   353      */
       
   354     CVPbkFieldTypeSelector* iContactViewFilter; 
       
   355     };
       
   356 
       
   357 #endif // TPHCNTSERVICEREQUESTPARAMS_H