mmsharing/mmshavailability/inc/musavanetworkavailability.h
changeset 0 f0cf47e981f9
child 21 33a5d2bbf6fc
equal deleted inserted replaced
-1:000000000000 0:f0cf47e981f9
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Provide interface for the client requestin network availability.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __MUSAVANETWORKAVAILABILITY_H__
       
    20 #define __MUSAVANETWORKAVAILABILITY_H__
       
    21 
       
    22 #include "musavaavailability.h"
       
    23 #include "muscallmonitorobserver.h"
       
    24 #include <sipprofileregistryobserver.h>
       
    25 
       
    26 #include <e32base.h>
       
    27 
       
    28 class MMusAvaAvailabilityObserver;
       
    29 class MMusAvaObserver;
       
    30 class CMusAvaSharedObject;
       
    31 class CMusAvaCallEventMonitor;
       
    32 class CMusAvaSettingsImp;
       
    33 
       
    34 /**
       
    35  *  Implemets register vailability.
       
    36  *
       
    37  *  Provide interface for the client to availability class.
       
    38  *
       
    39  *  @lib musavailabilityplugin.lib
       
    40  *  @since S60 v3.2
       
    41  */
       
    42 
       
    43 
       
    44 
       
    45 class CMusAvaNetworkAvailability : public CMusAvaAvailability,
       
    46                                    public MMusCallMonitorObserver
       
    47 	{
       
    48 public:
       
    49 	/**
       
    50      * Two-phased constructor
       
    51      *
       
    52      * @since S60 v3.2
       
    53      * @param aObserver Pointer to observer intercase
       
    54      * @param aModules is data container
       
    55      * @return Returns pointer to CMusAvaInterface object
       
    56      */
       
    57 	static CMusAvaNetworkAvailability* NewL(
       
    58         MMusAvaAvailabilityObserver& aObserver,
       
    59         CMusAvaSettingsImp& aSettings );
       
    60 
       
    61 
       
    62 	static CMusAvaNetworkAvailability* NewLC(
       
    63         MMusAvaAvailabilityObserver& aObserver,
       
    64         CMusAvaSettingsImp& aSettings );
       
    65 
       
    66 
       
    67 	/**
       
    68      * Destructor
       
    69      */
       
    70 	~CMusAvaNetworkAvailability();
       
    71 
       
    72 protected:
       
    73 
       
    74 	/**
       
    75      * Constructor
       
    76      *
       
    77      * @param aObserver Pointer to observer intercase
       
    78      * @param aName availability name
       
    79      * @param aModules is data container
       
    80      */
       
    81 
       
    82 	CMusAvaNetworkAvailability( MMusAvaAvailabilityObserver& aObserver,
       
    83                                 CMusAvaSettingsImp& aSettings );
       
    84 
       
    85 	void ConstructL();
       
    86 
       
    87 
       
    88 // from base class CMusAvaAvailability
       
    89 
       
    90 public:
       
    91 
       
    92     /**
       
    93      * Executes for the availability.
       
    94      *
       
    95      * @since S60 v3.2
       
    96      * @return KErrNone if ExecutePatternL operation was
       
    97      *         successfully executed; system wide error otherwise
       
    98      */
       
    99     virtual void DoExecuteL();
       
   100 
       
   101     /**
       
   102      * Stop the execution.
       
   103      *
       
   104      * @since S60 v3.2
       
   105      * @return KErrNone if stop operation was successfully executed;
       
   106      *         system wide error otherwise
       
   107      */
       
   108     virtual void Stop();
       
   109 
       
   110     /**
       
   111      * From CMusAvaAvailability.
       
   112      * Returns availability name.
       
   113      *
       
   114      * @return Name of *this* availability.
       
   115      */
       
   116     virtual MMusAvaObserver::TAvailabilityName Name();
       
   117 
       
   118 public: // from MMusCallMonitorObserver
       
   119 
       
   120     /**
       
   121      * Call connected
       
   122      *
       
   123      * @since  S60 v3.2
       
   124      * @return
       
   125      */
       
   126     void CallConnectedL( const TDesC& aTelNumber );
       
   127 
       
   128      /**
       
   129      * Call on hold
       
   130      *
       
   131      * @since  S60 v3.2
       
   132      * @return
       
   133      */
       
   134     virtual void CallHoldL( const TDesC& aTelNumber );
       
   135 
       
   136     /**
       
   137      * Call disconnected
       
   138      *
       
   139      * @since  S60 v3.2
       
   140      * @return
       
   141      */
       
   142     virtual void NoActiveCallL();
       
   143 
       
   144     /**
       
   145      * Call on hold
       
   146      *
       
   147      * @since  S60 v3.2
       
   148      * @return
       
   149      */
       
   150     virtual void ConferenceCallL();
       
   151 
       
   152 private: // data
       
   153 
       
   154    /**
       
   155     *
       
   156     */
       
   157     CMusAvaCallEventMonitor* iPhoneStatus;
       
   158 
       
   159    /**
       
   160     * Pointer to CMusAvaSharedObject object
       
   161     */
       
   162     CMusAvaSharedObject* iSharedObj;
       
   163 
       
   164    /**
       
   165     * Reference to availability settings object.
       
   166     */
       
   167     CMusAvaSettingsImp& iSettings;
       
   168     };
       
   169 
       
   170 
       
   171 #endif // __MUSAVANETWORKAVAILABILITY_H__