voipplugins/accountcreationplugin/engine/inc/acpproviderfield.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  Declarition of CAcpProviderField
       
    15 *
       
    16 */
       
    17 
       
    18  
       
    19 #ifndef ACPPROVIDERFIELD_H
       
    20 #define ACPPROVIDERFIELD_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 /**
       
    25  *  CAcpProviderField class
       
    26  *  Declarition of CAcpProviderField.
       
    27  *
       
    28  *  @lib accountcreationplugin.lib
       
    29  *  @since S60 v3.2
       
    30  */
       
    31 class CAcpProviderField : public CBase
       
    32     {
       
    33 public:
       
    34 
       
    35     /**
       
    36      * Different kind of field types supported by ACP.
       
    37      */
       
    38     enum TFieldTypes
       
    39         {
       
    40         ETextual = 0, // default
       
    41         ENumeric,
       
    42         EPassword
       
    43         };    
       
    44 
       
    45     /**
       
    46      * Two-phased constructor.
       
    47      */
       
    48     static CAcpProviderField* NewL();
       
    49 
       
    50     /**
       
    51      * Two-phased constructor.
       
    52      */
       
    53     static CAcpProviderField* NewLC();
       
    54 
       
    55     /**
       
    56      * Destructor.
       
    57      */
       
    58     virtual ~CAcpProviderField();
       
    59 
       
    60     /**
       
    61      * Copies provider fields data from given parameter to member data.
       
    62      *
       
    63      * @since S60 v3.2
       
    64      * @param aProviderField for provider fields to be copied
       
    65      */ 
       
    66     void CopyL( const CAcpProviderField& aProviderField );
       
    67 
       
    68     /**
       
    69      * Returns name of the field.
       
    70      *
       
    71      * @since S60 v3.2
       
    72      * @return name of the field
       
    73      */ 
       
    74     TPtrC FieldName() const;
       
    75 
       
    76     /**
       
    77      * Sets name of the field.
       
    78      *
       
    79      * @since S60 v3.2
       
    80      * @param aFieldName for field name
       
    81      */ 
       
    82     void SetFieldNameL( const TDesC& aFieldName );
       
    83 
       
    84     /**
       
    85      * Returns type of the field.
       
    86      *
       
    87      * @since S60 v3.2
       
    88      * @return type of the field
       
    89      */ 
       
    90     CAcpProviderField::TFieldTypes FieldType() const;
       
    91 
       
    92     /**
       
    93      * Sets type of the field.
       
    94      *
       
    95      * @since S60 v3.2
       
    96      * @param aType for field type
       
    97      */ 
       
    98     void SetFieldType( CAcpProviderField::TFieldTypes aType );
       
    99 
       
   100     /**
       
   101      * Returns data of the field.
       
   102      *
       
   103      * @since S60 v3.2
       
   104      * @return data of the field
       
   105      */ 
       
   106     TPtrC FieldData() const;
       
   107 
       
   108     /**
       
   109      * Sets data of the field.
       
   110      *
       
   111      * @since S60 v3.2
       
   112      * @param aFieldData for field data
       
   113      */ 
       
   114     void SetFieldDataL( const TDesC& aFieldData );
       
   115 
       
   116 private:
       
   117 
       
   118     CAcpProviderField();
       
   119 
       
   120 private: // data
       
   121 
       
   122     /**
       
   123      * Name of the field.
       
   124      * Own.
       
   125      */
       
   126     HBufC* iFieldName;
       
   127 
       
   128     /**
       
   129      * Type of the field.
       
   130      */  
       
   131     TFieldTypes iType;
       
   132 
       
   133     /**
       
   134      * Data of the field.
       
   135      * Own.
       
   136      */
       
   137     HBufC* iFieldData;
       
   138     };
       
   139 
       
   140 #endif // ACPPROVIDERFIELD_H
       
   141 
       
   142 // End of file.