tsrc/musavaailabilitystub/inc/musavaavailabilitystub.h
changeset 0 f0cf47e981f9
child 32 73a1feb507fb
equal deleted inserted replaced
-1:000000000000 0:f0cf47e981f9
       
     1 /*
       
     2 * Copyright (c) 2005-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:  Provide interface for the client requestin network availability.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __MUSAVAAVAILABILITYSTUB_H__
       
    20 #define __MUSAVAAVAILABILITYSTUB_H__
       
    21 
       
    22 #include "musavaavailability.h"
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 class MMusAvaAvailabilityObserver;
       
    27 class MMusAvaObserver;
       
    28 class CMusAvaSharedObject;
       
    29 class CMusAvaSettingsImp;
       
    30 
       
    31 /**
       
    32  *  Implemets register vailability. 
       
    33  *
       
    34  *  Provide interface for the client to availability class.
       
    35  *
       
    36  *  @lib musavailabilityplugin.lib
       
    37  *  @since S60 v3.2
       
    38  */
       
    39 
       
    40  
       
    41 
       
    42 class CMusAvaAvailabilityStub : public CMusAvaAvailability
       
    43 	{
       
    44 	public:
       
    45     
       
    46     /**
       
    47      * Two-phased constructor.
       
    48      *
       
    49      * @param aObserver Pointer to observer interface.
       
    50      * @param aSettings Reference to settings object.
       
    51      * @return Returns pointer to CMusAvaInterface object.
       
    52      */
       
    53 	static CMusAvaAvailabilityStub* NewL(
       
    54 	                                MMusAvaAvailabilityObserver& aObserver,
       
    55                                     CMusAvaSettingsImp& aConcreteSettings );
       
    56 
       
    57 	/**
       
    58      * Two-phased constructor.
       
    59      *
       
    60      * @param aObserver Pointer to observer interface.
       
    61      * @param aSettings Reference to settings object.
       
    62      * @return Returns pointer to CMusAvaInterface object.
       
    63      */
       
    64 	static CMusAvaAvailabilityStub* NewLC(
       
    65 	                                MMusAvaAvailabilityObserver& aObserver,
       
    66                                     CMusAvaSettingsImp& aConcreteSettings );
       
    67 
       
    68 	/**
       
    69      * Destructor
       
    70      */
       
    71 	~CMusAvaAvailabilityStub();
       
    72 
       
    73 
       
    74 protected:
       
    75 
       
    76 	CMusAvaAvailabilityStub( MMusAvaAvailabilityObserver& aObserver,
       
    77                                 CMusAvaSettingsImp& aConcreteSettings );
       
    78 
       
    79 	void ConstructL();
       
    80 	
       
    81 
       
    82 	
       
    83 // from base class CMusAvaAvailability	
       
    84 	
       
    85 public: 
       
    86     
       
    87      /**
       
    88      * Executes for the availability.
       
    89      */
       
    90     virtual void DoExecuteL();
       
    91 
       
    92     /**
       
    93      * From CMusAvaAvailability.
       
    94      * Returns availability name.
       
    95      *
       
    96      * @return Name of *this* availability.
       
    97      */
       
    98     virtual MMusAvaObserver::TAvailabilityName Name();
       
    99 
       
   100 public:
       
   101 
       
   102     TInt iExecuteError;
       
   103     TBool iExecuteLeave;
       
   104     MMusAvaObserver::TAvailabilityStatus iStatusStub;
       
   105     MMusAvaObserver::TAvailabilityName iNameStub;
       
   106 	
       
   107 private:
       
   108     
       
   109 	 /**
       
   110      * Pointer to CMusAvaSharedObject object
       
   111      */
       
   112 	 CMusAvaSharedObject* iSharedObj; 
       
   113 	 
       
   114 	 /**
       
   115      * Pointer to CMusAvaSettingsImp object
       
   116      */
       
   117 	 CMusAvaSettingsImp& iSettings;
       
   118     };
       
   119 
       
   120 
       
   121 #endif // __MUSAVANETWORKAVAILABILITY_H__