voipplugins/sipconnectionprovider/ipvoicemailengine/inc/ipvmbxinterface.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:  Interface class to control voice mail engine
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef C_IPVMBXINTERFACE_H
       
    22 #define C_IPVMBXINTERFACE_H
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 #include "ipvmbxobserver.h"
       
    27 #include "ipvmbxconstants.h"
       
    28 
       
    29 
       
    30 class CIpVmbxEngine;
       
    31 class CSIPProfile;
       
    32 
       
    33 
       
    34 /**
       
    35  *  Interface class for IPVoiceMailEngine
       
    36  *
       
    37  *  This class is used to instantiate
       
    38  *  IPVoiceMailEngine. It offers functions to to control
       
    39  *  subscription state to Voice mail servers.
       
    40  *
       
    41  *  @lib IPVoiceMailAppEnginedll.lib
       
    42  */
       
    43 
       
    44 NONSHARABLE_CLASS( CIpVmbxInterface ) : public CBase
       
    45     {
       
    46     
       
    47 public:
       
    48 
       
    49     /**
       
    50      * Two-phased constructor.
       
    51      * 
       
    52      * @param aEngineObserver Observer instance for status messages (SCP)
       
    53      * @return Interface to IPVME
       
    54      */
       
    55     IMPORT_C static CIpVmbxInterface* NewL( 
       
    56         MIpVmbxObserver& aEngineObserver );
       
    57     
       
    58     /**
       
    59     * Destructor.
       
    60     */
       
    61     virtual ~CIpVmbxInterface();
       
    62 
       
    63     /**
       
    64      * Subscribes service to ip voice mail server
       
    65      *
       
    66      * @param aServiceProviderId Service to be subscribed
       
    67      * @param aSipProfile Sip profile used for subscription
       
    68      */
       
    69     IMPORT_C void SubscribeL( 
       
    70         TUint32 aServiceProviderId, 
       
    71         CSIPProfile& aSipProfile );
       
    72 
       
    73     /**
       
    74      * Un-subscribes service from ip voice mail server
       
    75      *
       
    76      * @param aServiceProviderId Service to be un-subscribed
       
    77      */
       
    78     IMPORT_C void UnsubscribeL( TUint32 aServiceProviderId );
       
    79 
       
    80     /**
       
    81      * Check if service is subscribed to ip voice mail server
       
    82      *
       
    83      * @param aServiceProviderId Service which connection status will be 
       
    84      *        checked
       
    85      * @param aProfileSubscribed Is subscribed
       
    86      * @return KErrNotFound if instance does not exist
       
    87      */
       
    88     IMPORT_C TInt IsSubscribed( 
       
    89         TUint32 aServiceProviderId, 
       
    90         TBool& aProfileSubscribed ) const;
       
    91     
       
    92     /**
       
    93      * Send messages through observer when subscribe status of service 
       
    94      * is changed
       
    95      *
       
    96      * @param aServiceProviderId Service which state has changed
       
    97      * @param aMessage Service subscription state
       
    98      */
       
    99     void SendMessage( 
       
   100         TUint32 aServiceProviderId, 
       
   101         MIpVmbxObserver::TVmbxMessage aMessage );
       
   102 
       
   103 
       
   104 private:
       
   105 
       
   106     /**
       
   107      * Constructor.
       
   108      * 
       
   109      * @param aEngineObserver Observer for messages (SCP).
       
   110      */
       
   111     CIpVmbxInterface( MIpVmbxObserver& aEngineObserver );
       
   112 
       
   113     void ConstructL();
       
   114 
       
   115 
       
   116 private: // data
       
   117 
       
   118     /**
       
   119      * Engine class
       
   120      * Own.
       
   121      */
       
   122     CIpVmbxEngine* iIpVmbxEngine;
       
   123     
       
   124     /**
       
   125      * Observer instance (to SCP)
       
   126      */
       
   127     MIpVmbxObserver& iEngineObserver;
       
   128 
       
   129     
       
   130     EUNIT_IMPLEMENTATION
       
   131     };
       
   132 
       
   133 #endif // C_IPVMBXINTERFACE_H