speechsrv_plat/vas_api/inc/vasmbasepbkhandler.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     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:  Abstract base class for phonebook data access
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef VASMBASEPBKHANDLER_H
       
    20 #define VASMBASEPBKHANDLER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <cntdef.h>
       
    24 
       
    25 // CONSTANTS
       
    26 
       
    27 // DATA TYPES
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class MNssTag;
       
    31 class MVasContactObserver;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 * Abstract base class for phonebook data access
       
    37 *
       
    38 * @since 3.2
       
    39 */
       
    40 class MVasBasePbkHandler
       
    41     {
       
    42     public:  // Constructors and destructor
       
    43     
       
    44         /**
       
    45         * Destructor. Defined here so that client can use M-class pointer to destroy
       
    46         * the concrete C-object
       
    47         *
       
    48         * @since 3.2
       
    49         */
       
    50         virtual ~MVasBasePbkHandler() {};
       
    51    
       
    52     public: // New functions
       
    53 
       
    54         /**
       
    55         * Opens phonebook connection and contact stores
       
    56         *
       
    57         * @since 3.2
       
    58         */
       
    59         virtual void InitializeL() = 0;
       
    60         
       
    61         /**
       
    62         * Creates the contact change notifier and sets observer as a listener
       
    63         *
       
    64         * @since 3.2
       
    65         * @param aObserver Contact change listener
       
    66         */
       
    67         virtual void CreateContactObserverL( MVasContactObserver* aObserver ) = 0;
       
    68         
       
    69         /**
       
    70         * Compresses database
       
    71         *
       
    72         * @since 3.2
       
    73         */
       
    74         virtual void CompressL() = 0;
       
    75         
       
    76         /**
       
    77         * Returns all contact ids from database
       
    78         *
       
    79         * @since 3.2
       
    80         * @return Contact id array
       
    81         */
       
    82         virtual CContactIdArray* ContactIdArrayLC() = 0;
       
    83         
       
    84         /**
       
    85         * Finds a contact from phonebook
       
    86         *
       
    87         * @since 3.2
       
    88         * @param aTag Tag that is used as a search parameter
       
    89         */
       
    90         virtual void FindContactL( MNssTag* aTag ) = 0;
       
    91         
       
    92         /**
       
    93         * Finds a contact from phonebook
       
    94         *
       
    95         * @since 3.2
       
    96         * @param aContactId Id of the contact that should be found
       
    97         * @param aReadOnly ETrue if contact will not be edited else EFalse
       
    98         */
       
    99         virtual void FindContactL( TInt32 aContactId, TBool aReadOnly ) = 0;
       
   100         
       
   101         /**
       
   102         * Closes contact with or without saving changes
       
   103         *
       
   104         * @since 3.2
       
   105         * @param aSaveChanges ETrue to save changes else EFalse
       
   106         */
       
   107         virtual void CloseContactL( TBool aSaveChanges ) = 0;
       
   108         
       
   109         /**
       
   110         * Finds a field from contact
       
   111         *
       
   112         * @since 3.2
       
   113         * @param aTag Tag that is used as a search parameter
       
   114         */
       
   115         virtual void FindFieldL( MNssTag* aTag ) = 0;
       
   116         
       
   117         /**
       
   118         * Finds a field from contact
       
   119         *
       
   120         * @since 3.2
       
   121         * @param aFieldId Field id that is used as a search parameter
       
   122         */
       
   123         virtual void FindFieldL( TInt aFieldId ) = 0;
       
   124         
       
   125         /**
       
   126         * Finds a field from contact
       
   127         *
       
   128         * @since 3.2
       
   129         * @param aTag Tag that is used as a search parameter
       
   130         */
       
   131         virtual void FindContactFieldL( MNssTag* aTag ) = 0;
       
   132         
       
   133         /**
       
   134         * Searches for a default field of a given type
       
   135         *
       
   136         * @param aCommandType Command type that is used as a select parameter
       
   137         *                     Must be one of TVasExtensionCommand types
       
   138         */
       
   139         virtual void FindDefaultContactFieldL( TInt aCommandType ) = 0;
       
   140         
       
   141         /**
       
   142         * Changes current field's voice tag field status
       
   143         *
       
   144         * @since 3.2
       
   145         * @param aSet If ETrue field is set else field is removed
       
   146         */   
       
   147         virtual void ChangeVoiceTagFieldL( TBool aSet ) = 0;
       
   148         
       
   149         /**
       
   150         * Returns the field label
       
   151         *
       
   152         * @since 3.2
       
   153         * @return Field label
       
   154         */
       
   155         virtual TPtrC LabelL() = 0;
       
   156         
       
   157         /**
       
   158         * Returns the field text
       
   159         *
       
   160         * @since 3.2
       
   161         * @return Field text
       
   162         */
       
   163         virtual TPtrC TextL() = 0;
       
   164         
       
   165         /**
       
   166         * Returns the field type
       
   167         *
       
   168         * @since 3.2
       
   169         * @return Field type
       
   170         */
       
   171         virtual TFieldType FieldTypeL() = 0;
       
   172         
       
   173         /**
       
   174         * Returns the field id
       
   175         *
       
   176         * @since 3.2
       
   177         * @return Field id
       
   178         */
       
   179         virtual TInt FieldIdL() = 0;
       
   180         
       
   181         /**
       
   182         * Returns information if current field is empty
       
   183         *
       
   184         * @since 3.2
       
   185         * @return ETrue if field is empty else EFalse
       
   186         */
       
   187         virtual TBool IsFieldEmptyL() = 0;
       
   188                 
       
   189     public: // Functions from base classes
       
   190         
       
   191     private:  // New functions
       
   192                
       
   193     private:    // Data
       
   194     
       
   195         };
       
   196 
       
   197 #endif      // VASMBASEPBKHANDLER_H
       
   198             
       
   199 // End of File