phonebookui/Phonebook2/ccapplication/ccacontactorservice/inc/ccacontactorserviceoperator.h
branchRCL_3
changeset 63 f4a778e096c2
child 64 c1e8ba0c2b16
child 74 6b5524b4f673
equal deleted inserted replaced
62:5b6f26637ad3 63:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Class for handling service logic.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CCACONTACTORSERVICEHANDLER_H
       
    20 #define C_CCACONTACTORSERVICEHANDLER_H
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 
       
    25 //FORWARD DECLERATIONS
       
    26 class CCCAContactorPopupHandler;
       
    27 
       
    28 /**
       
    29  *  CCCAContactorServiceOperator
       
    30  *  Handling logic of service.
       
    31  *
       
    32  *  @code
       
    33  *
       
    34  *  @endcode
       
    35  *
       
    36  *  @lib ccacontactorservice
       
    37  *  @since S60 v5.0
       
    38  */
       
    39 NONSHARABLE_CLASS(CCCAContactorServiceOperator) : public CBase
       
    40     {
       
    41 
       
    42 public:
       
    43 
       
    44     /**
       
    45      * Two-phased constructor.
       
    46      */
       
    47     static CCCAContactorServiceOperator* NewLC();
       
    48 
       
    49     static CCCAContactorServiceOperator* NewL();
       
    50 
       
    51     /**
       
    52      * Destructor.
       
    53      */
       
    54     virtual ~CCCAContactorServiceOperator();
       
    55 
       
    56 public:
       
    57     //new methods
       
    58 
       
    59     /**
       
    60      * Start service.
       
    61      * All leaves are trapped.
       
    62      *
       
    63      * @since S60 5.0
       
    64      */
       
    65     void Execute(const CCAContactorService::TCSParameter& aParameter);
       
    66     
       
    67     /**
       
    68      * Is call item selected
       
    69      * 
       
    70      * @since S60 5.0
       
    71      */
       
    72     TBool IsSelected();
       
    73 private:
       
    74     /**
       
    75      * Constructor.
       
    76      */
       
    77     CCCAContactorServiceOperator();
       
    78 
       
    79     void ConstructL();
       
    80 
       
    81 private: //new methods
       
    82     /**
       
    83      * Helper class for handling special cases.
       
    84      * Currently VOIP ServiceID implemented.
       
    85      *
       
    86      * @param aFieldData: Selected field.
       
    87      * @since S60 5.0
       
    88      */
       
    89     void ResolveSpecialCasesL(const TDesC& aFieldData);
       
    90 
       
    91     /**
       
    92      * Helper class for searching ServiceID
       
    93      *
       
    94      * @param aFieldData: Selected field.
       
    95      * @return ServiceId
       
    96      * @since S60 5.0
       
    97      */
       
    98     TUint32 ResolveServiceIdL(const TDesC& aFieldData);
       
    99 
       
   100     /**
       
   101      * Helper class for parsing xSP identification.
       
   102      *
       
   103      * @param aFieldData: Selected field.
       
   104      * @param aXSPId: Found xSP ID.
       
   105      * @return boolean if xSP is found.
       
   106      * @since S60 5.0
       
   107      */
       
   108     TBool ExtractServiceL(const TDesC& aFieldData, TPtrC& aXSPId);
       
   109 
       
   110     /**
       
   111      * Helper class for searching ServiceId from spsettings
       
   112      *
       
   113      * @param aFieldData: Selected field.
       
   114      * @return ServiceId
       
   115      * @since S60 5.0
       
   116      */
       
   117     TUint32 SearchServiceIdL(const TDesC& aFieldData);
       
   118 
       
   119     /**
       
   120      * Helper class for checking if MSISDN addressing is supported.
       
   121      *
       
   122      * @return ServiceId
       
   123      * @since S60 5.0
       
   124      */
       
   125     TUint32 ResolveMSISDNAddressingSupportedL();
       
   126 
       
   127     /**
       
   128      * Helper class for starting communication method.
       
   129      *
       
   130      * @param aFieldData: Selected field.
       
   131      * @since S60 5.0
       
   132      */
       
   133     void LaunchCommunicationMethodL(const TDesC& aFieldData);
       
   134 
       
   135     /**
       
   136      * Helper class for mapping AIW enum & selector factory enums together.
       
   137      *
       
   138      * @param aCommTypeSelector: Selector factory enum.
       
   139      * @return AIW communication enum.
       
   140      * @since S60 5.0
       
   141      */
       
   142     TAiwCommAddressSelectType CommunicationEnumMapper(
       
   143         VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aCommTypeSelector);
       
   144 
       
   145 
       
   146 private:
       
   147     // data
       
   148 
       
   149     /**
       
   150      * Pointer to popup handler class
       
   151      * Own.
       
   152      */
       
   153     CCCAContactorPopupHandler* iPopupHandler;
       
   154 
       
   155     /**
       
   156      * Reference to the launch parameter.
       
   157      * Not own.
       
   158      */
       
   159     const CCAContactorService::TCSParameter* iParameter;
       
   160 
       
   161     /**
       
   162      * ServiceId for VOIP service.
       
   163      * Own.
       
   164      */
       
   165     TUint32 iServiceId;
       
   166     
       
   167     /**
       
   168      * Is call item selected
       
   169      * Own
       
   170      */
       
   171     TBool isSelected;
       
   172     };
       
   173 
       
   174 #endif // C_CCACONTACTORSERVICEHANDLER_H
       
   175 
       
   176 // End of File