vmbx/vmbxengine/inc/vmbxpbkstore.h
changeset 19 e44a8c097b15
parent 12 ae8abd0db65c
child 27 7eb70891911c
equal deleted inserted replaced
15:d7fc66ccd6fb 19:e44a8c097b15
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    36 // CLASS DECLARATION
    36 // CLASS DECLARATION
    37 /**
    37 /**
    38 *  Creates connection to Sim phonebook and handles data flow from/to it
    38 *  Creates connection to Sim phonebook and handles data flow from/to it
    39 *
    39 *
    40 *  @lib vmbxengine.lib
    40 *  @lib vmbxengine.lib
    41 *  @since S60 v5.2
       
    42 */
    41 */
    43 NONSHARABLE_CLASS( CVmbxPbkStore ) : public CActive
    42 NONSHARABLE_CLASS( CVmbxPbkStore ) : public CActive
    44     {
    43     {
    45 
    44 
    46 public:  // Constructors and destructor
    45 public:  // Constructors and destructor
    58 public: // New functions
    57 public: // New functions
    59 
    58 
    60     /**
    59     /**
    61      * Sim write support
    60      * Sim write support
    62      *
    61      *
    63      * @since S60 v5.2
       
    64      * @return ETrue if writable
    62      * @return ETrue if writable
    65      */
    63      */
    66     TBool IsWritable();
    64     TBool IsWritable();
    67 
    65 
    68     /**
    66     /**
    69      * sim PhoneBook Type
    67      * sim PhoneBook Type
    70      * @since S60 v5.2
       
    71      * @return TVmbxSimPhonebookType
    68      * @return TVmbxSimPhonebookType
    72      */
    69      */
    73     TVmbxSimPhonebookType PhoneBookType();
    70     TVmbxSimPhonebookType PhoneBookType();
    74 
    71 
    75     /**
    72     /**
    76      * Writes an entry into ICC-based phonebook.
    73      * Writes an entry into ICC-based phonebook.
    77      *
    74      *
    78      * @since S60 v5.2
       
    79      * @param in aEntry Reference of CVoiceMailboxEntry
    75      * @param in aEntry Reference of CVoiceMailboxEntry
    80      * @return KErrNone if succesful,
    76      * @return KErrNone if succesful,
    81      *         Other system wide errors.
    77      *         Other system wide errors.
    82      **/
    78      **/
    83     TInt Write( const CVoiceMailboxEntry& aEntry );
    79     TInt Write( const CVoiceMailboxEntry& aEntry );
    84 
    80 
    85     /**
    81     /**
    86      * Retrieves hanlder of RMobilePhoneBookStore
    82      * Retrieves hanlder of RMobilePhoneBookStore
    87      *
    83      *
    88      * @since S60 v5.2
       
    89      * @retuns hanlder of RMobilePhoneBookStore
    84      * @retuns hanlder of RMobilePhoneBookStore
    90      */
    85      */
    91     RMobilePhoneBookStore& PhonebookStore();
    86     RMobilePhoneBookStore& PhonebookStore();
    92 
    87 
    93     /**
    88     /**
    94     * Retrieves mailbox number from Sim
    89     * Retrieves mailbox number from Sim
    95     * @since S60 v5.2
       
    96     * @param out aEntry a data type CVoiceMailboxEntry
    90     * @param out aEntry a data type CVoiceMailboxEntry
    97     */
    91     */
    98     void GetL( CVoiceMailboxEntry& aEntry );
    92     void GetL( CVoiceMailboxEntry& aEntry );
    99 
    93 
   100 private: // from base class CActive
    94 private: // from base class CActive
   117 private: // New functions
   111 private: // New functions
   118 
   112 
   119     /**
   113     /**
   120      * Reads an entry from the ICC-based phonebook.
   114      * Reads an entry from the ICC-based phonebook.
   121      *
   115      *
   122      * @since S60 v5.2
       
   123      * @param out aEntry Reference of CVoiceMailboxEntry
   116      * @param out aEntry Reference of CVoiceMailboxEntry
   124      **/
   117      **/
   125     void SimReadL( CVoiceMailboxEntry& aEntry );
   118     void SimReadL( CVoiceMailboxEntry& aEntry );
   126 
   119 
   127     /**
   120     /**
   128      * Opens VMBX phonebook
   121      * Opens VMBX phonebook
   129      * @since S60 v5.2
       
   130      * @retuns KErrNone if succesful
   122      * @retuns KErrNone if succesful
   131      **/
   123      **/
   132     TInt OpenVmbxPhonebook();
   124     TInt OpenVmbxPhonebook();
   133 
   125 
   134     /**
   126     /**
   135      * Opens MBDN phonebook
   127      * Opens MBDN phonebook
   136      * @since S60 v5.2
       
   137      * @retuns KErrNone if succesful
   128      * @retuns KErrNone if succesful
   138      **/
   129      **/
   139     TInt OpenMbdnPhonebook();
   130     TInt OpenMbdnPhonebook();
   140 
   131 
   141     /**
   132     /**
   142      * Get Phonebook Info
   133      * Get Phonebook Info
   143      * @param out aInfo information from RPhonebookStore
   134      * @param out aInfo information from RPhonebookStore
   144      *
   135      *
   145      * @since S60 v5.2
       
   146      **/
   136      **/
   147     TInt GetVmbxInfo( RMobilePhoneBookStore::TMobilePhoneBookInfoV1& aInfo );
   137     TInt GetVmbxInfo( RMobilePhoneBookStore::TMobilePhoneBookInfoV1& aInfo );
   148 
   138 
   149     /**
   139     /**
   150      * Retrieves the Mailbox numbers identifier information
   140      * Retrieves the Mailbox numbers identifier information
   151      * @param in aAlsLine curent als line
   141      * @param in aAlsLine curent als line
   152      * @param out aInfo information from RPhonebookStore
   142      * @param out aInfo information from RPhonebookStore
   153      * @since S60 v5.2
       
   154      * @retuns KErrNone if succesful
   143      * @retuns KErrNone if succesful
   155      **/
   144      **/
   156     TInt GetMbdnInfo( const TVmbxAlsLineType aAlsLine,
   145     TInt GetMbdnInfo( const TVmbxAlsLineType aAlsLine,
   157             RMobilePhone::TMobilePhoneVoicemailIdsV3& aInfo );
   146             RMobilePhone::TMobilePhoneVoicemailIdsV3& aInfo );
   158 
   147 
   159 
   148 
   160     /**
   149     /**
   161      * Reads "ParseDataL" from phonebook data from Sim
   150      * Reads "ParseDataL" from phonebook data from Sim
   162      *
   151      *
   163      * @since S60 v5.2
       
   164      * @param out aEntry entry of CVoiceMailboxEntry
   152      * @param out aEntry entry of CVoiceMailboxEntry
   165      * @param in aPbData
   153      * @param in aPbData
   166      */
   154      */
   167     void ParseDataL( CVoiceMailboxEntry& aEntry, TDes8& aPbData );
   155     void ParseDataL( CVoiceMailboxEntry& aEntry, TDes8& aPbData );
   168 
   156 
   169     /**
   157     /**
   170      * Reads "new-entry-tag" from phonebook data from Sim
   158      * Reads "new-entry-tag" from phonebook data from Sim
   171      *
   159      *
   172      * @since S60 v5.2
       
   173      * @param in aPbkBuffer Phonebook data buffer
   160      * @param in aPbkBuffer Phonebook data buffer
   174      * @retuns KErrNone if succesful
   161      * @retuns KErrNone if succesful
   175      */
   162      */
   176     TInt ReadNewEntryTag( CPhoneBookBuffer* aPbkBuffer );
   163     TInt ReadNewEntryTag( CPhoneBookBuffer* aPbkBuffer );
   177 
   164 
   178     /**
   165     /**
   179      * Reads tags from buffer retrieved from sim
   166      * Reads tags from buffer retrieved from sim
   180      *
   167      *
   181      * @since S60 v5.2
       
   182      * @param in aPbkBuffer Phonebook data buffer
   168      * @param in aPbkBuffer Phonebook data buffer
   183      * @param out aEntry Reference of CVoiceMailboxEntry
   169      * @param out aEntry Reference of CVoiceMailboxEntry
   184      */
   170      */
   185     void ReadPbkDataL( CPhoneBookBuffer* aPbkBuffer, 
   171     void ReadPbkDataL( CPhoneBookBuffer* aPbkBuffer, 
   186                         CVoiceMailboxEntry& aEntry );
   172                         CVoiceMailboxEntry& aEntry );
   187 
   173 
   188     /**
   174     /**
   189      * Checks if sim-card is USim
   175      * Checks sim file existing
   190      *
   176      *
   191      * @since S60 v5.2
   177      * @retuns ETrue if file exists
   192      * @return ETrue if USim
   178      **/
   193      **/
   179     TBool IsSimFileExisting( const TVmbxSimPhonebookType aType );
   194     TBool SimFileExistsAndReadAccess();
   180 
       
   181     /**
       
   182      * Sim write acces support
       
   183      *
       
   184      * @return ETrue if writable access
       
   185      */
       
   186     TBool IsWriteAccess();
   195 
   187 
   196 protected:
   188 protected:
   197 
   189 
   198     /**
   190     /**
   199      * C++ constructor.
   191      * C++ constructor.
   200      *
   192      *
   201      * @since S60 v5.2
       
   202      */
   193      */
   203     CVmbxPbkStore();
   194     CVmbxPbkStore();
   204 
   195 
   205     /**
   196     /**
   206      * By default Symbian 2nd phase constructor is protected.
   197      * By default Symbian 2nd phase constructor is protected.