phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailboxentry.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     1 /*
       
     2 * Copyright (c) 2009 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:  External, CVoiceMailboxEntry
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_VOICEMAILBOXENTRY_H
       
    19 #define C_VOICEMAILBOXENTRY_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <voicemailboxdefs.h>
       
    23 
       
    24 /**
       
    25  *  Container class for Voice Mailbox info.
       
    26  *  @lib vmbxengine.lib
       
    27  */
       
    28 
       
    29 class CVoiceMailboxEntry : public CBase
       
    30     {
       
    31 public:
       
    32 
       
    33     /**
       
    34      * Static constructor.
       
    35      * @return New instance of the object. Ownership transferred.
       
    36      */
       
    37     IMPORT_C static CVoiceMailboxEntry* NewL();
       
    38 
       
    39     /**
       
    40      * Static constructor.
       
    41      * @return New instance of the object. Ownership transferred.
       
    42      */
       
    43     IMPORT_C static CVoiceMailboxEntry* NewLC();
       
    44 
       
    45     /**
       
    46      * Destructor
       
    47      *
       
    48      */
       
    49     virtual ~CVoiceMailboxEntry();
       
    50 
       
    51     /**
       
    52      * Gets the Voice Mailbox service.
       
    53      *
       
    54      * @return Mailbox service.
       
    55      */
       
    56     IMPORT_C virtual TServiceId ServiceId() const;
       
    57 
       
    58     /**
       
    59      * Sets the Voice Mailbox service to container.
       
    60      *
       
    61      * @param in aVmbxServiceId Voice Mailbox service.
       
    62      */
       
    63     virtual void SetServiceId(
       
    64                             const TServiceId& aVmbxServiceId );
       
    65 
       
    66     /**
       
    67      * Gets the Voice Mailbox type.
       
    68      *
       
    69      * @return Mailbox type.
       
    70      */
       
    71     IMPORT_C virtual TVmbxType VoiceMailboxType() const;
       
    72 
       
    73     /**
       
    74      * Sets the Voice Mailbox type to container.
       
    75      *
       
    76      * @param in aVmbxType Voice Mailbox type.
       
    77      */
       
    78     IMPORT_C virtual void SetVoiceMailboxType(
       
    79                             const TVmbxType& aVmbxType );
       
    80 
       
    81     /**
       
    82      * Gets the Voice Mailbox line type.
       
    83      *
       
    84      * @return Mailbox line type.
       
    85      *      EVmbxAlsLineDefault is returned if mailbox does not
       
    86      *      support several lines.
       
    87      */
       
    88     IMPORT_C virtual TVmbxAlsLineType VmbxAlsLineType() const;
       
    89 
       
    90     /**
       
    91      * Sets the Voice Mailbox line type to container.
       
    92      * EVmbxAlsLineDefault is used by default.
       
    93      *
       
    94      * @param in aLine Selected Voice Mailbox line type.
       
    95      */
       
    96     virtual void SetVmbxAlsLineType(
       
    97                             const TVmbxAlsLineType& aLine );
       
    98 
       
    99     /**
       
   100      * Gets the Voice Mailbox number or address.
       
   101      *
       
   102      * @param out aVmbxNumber If successful, contains the returned 
       
   103      *   mailbox number or address.
       
   104      * @return One of the system wide error codes.
       
   105      */
       
   106     IMPORT_C virtual TInt GetVmbxNumber( TPtrC& aVmbxNumber ) const;
       
   107 
       
   108     /**
       
   109      * Sets the Voice Mailbox number or address to container.
       
   110      *
       
   111      * @param in aVmbxNumber New Voice Mailbox number or address.
       
   112      * @return One of the system wide error codes.
       
   113      */
       
   114     IMPORT_C virtual TInt SetVmbxNumber( const TDesC& aVmbxNumber );
       
   115 
       
   116     /**
       
   117      * Gets the Voice Mailbox brand id.
       
   118      *
       
   119      * @param out aBrandId If successful, contains the returned Brand id.
       
   120      * @return One of the system wide error codes.
       
   121      */
       
   122     IMPORT_C virtual TInt GetBrandId( TPtrC8& aBrandId ) const;
       
   123 
       
   124     /**
       
   125      * Sets the Voice Mailbox Brand Id to container.
       
   126      *
       
   127      * @param in aBrandId New Brand Id.
       
   128      * @return One of the system wide error codes.
       
   129      */
       
   130     virtual TInt SetBrandId(
       
   131                             const TDesC8& aBrandId );
       
   132 
       
   133     /**
       
   134      * Gets the VoIp name.
       
   135      *
       
   136      * @param out aVmbxName If successful, contains the returned mailbox name.
       
   137      * @return One of the system wide error codes.
       
   138      */
       
   139     IMPORT_C virtual TInt GetVmbxName( TPtrC& aVmbxName ) const;
       
   140 
       
   141     /**
       
   142      * Sets the VoIp name to container.
       
   143      *
       
   144      * @param in aVmbxName New Voice Mailbox name.
       
   145      * @return One of the system wide error codes.
       
   146      */
       
   147     IMPORT_C virtual TInt SetVmbxName( const TDesC& aVmbxName );
       
   148 
       
   149     /**
       
   150      * Gets the type of memory location.
       
   151      *
       
   152      * @return Memory location type.
       
   153      */
       
   154     IMPORT_C virtual TVmbxMemoryLocation UsingMemoryLocation( ) const;
       
   155 
       
   156     /**
       
   157      * Resets the container to initial state.
       
   158      *
       
   159      */
       
   160     IMPORT_C virtual void Reset();
       
   161 
       
   162     /**
       
   163      * Sets the using memory location to entry.
       
   164      *
       
   165      * @param in aType Memory location type.
       
   166      */
       
   167     virtual void SetUsingMemoryLocation( 
       
   168                                      const TVmbxMemoryLocation& aType );
       
   169 
       
   170 protected:
       
   171 
       
   172     /**
       
   173      * Second phase constructor.
       
   174      *
       
   175      */
       
   176     void ConstructL();
       
   177 
       
   178 private:
       
   179 
       
   180      /**
       
   181      * Default constructor.
       
   182      *
       
   183      */
       
   184 
       
   185     CVoiceMailboxEntry();
       
   186 
       
   187 private: // data
       
   188 
       
   189     /**
       
   190      * Mailbox service id.
       
   191      */
       
   192     TServiceId iVmbxServiceId;
       
   193 
       
   194     /**
       
   195      * Mailbox type.
       
   196      */
       
   197     TVmbxType iVmbxType;
       
   198 
       
   199     /**
       
   200      * Mailbox als line type.
       
   201      */
       
   202     TVmbxAlsLineType iVmbxLineType;
       
   203 
       
   204     /**
       
   205      * Number of vmbx.
       
   206      * Own.
       
   207      */
       
   208     HBufC* ivmbxNumber;
       
   209 
       
   210     /**
       
   211      * Brand id of vmbx.
       
   212      * Own.
       
   213      */
       
   214     HBufC8* iVmbxBrandId;
       
   215 
       
   216     /**
       
   217      * Name of vmbx.
       
   218      * Own.
       
   219      */
       
   220     HBufC* ivmbxName;
       
   221 
       
   222     /**
       
   223      * Mailbox Memory location.
       
   224      */
       
   225     TVmbxMemoryLocation iUsingMemory;
       
   226 
       
   227     };
       
   228 
       
   229 #endif // C_VOICEMAILBOXENTRY_H