callcontinuity/vcc/inc/vccengpsproperty.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 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:   P&S property writer/reader
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_VCCENGINEPSPROPERTY_H
       
    21 #define C_VCCENGINEPSPROPERTY_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <e32std.h>	
       
    25 #include <e32property.h>
       
    26 
       
    27 #include <vccsubscribekeys.h>
       
    28 
       
    29 /**
       
    30  *  CVccEngPsProperty manages the VCC P&S keys on the VCC HO Engine side.  
       
    31  * 
       
    32  *  This class defines the property keys used by Vcc Ho Engine.
       
    33  *  It provides access to read/write values. Keys are deleted 
       
    34  *  when this class is deleted.
       
    35  * 
       
    36  *  Key KVccPropKeyHoStatus:
       
    37  *   EVccHoStateIdle 			Everything ok   
       
    38  *   EVccCsToPsHoStarted 		CS->PS HO started
       
    39  *   EVccCsToPsHoInprogress 	CS->PS HO in progress.
       
    40  *   EVccCsToPsHoSuccessful		CS->PS HO ended successfully.
       
    41  *   EVccCsToPsHoFailure 		HO server encountered failure.
       
    42  *   EVccHoStateUnknown 		nok, key value could not be fetched
       
    43  *   
       
    44  *  @code
       
    45  * 		CVccEngPsProperty* iVccPsp = CVccEngPsProperty::NewL();
       
    46  * 		...
       
    47  * 		iVccPsp.NotifySubscriberL( EVccCsToPsHoStarted );
       
    48  * 		...
       
    49  * 		iVccPsp.NotifySubscriberL( EVccCsToPsHoSuccessful );
       
    50  * 		...
       
    51  * 		delete iVccPsp;		
       
    52  *  @endcode
       
    53  * 
       
    54  *  @lib vcchoengine.lib
       
    55  *  @since S60 v3.2
       
    56  */
       
    57 class CVccEngPsProperty : public CBase
       
    58 {
       
    59 public:
       
    60 	/**
       
    61 	 * Two-phased constructor.
       
    62      *
       
    63 	 */
       
    64 	static CVccEngPsProperty* NewL();
       
    65 	
       
    66 	/**
       
    67 	 * Destructor.
       
    68 	 */
       
    69 	virtual ~CVccEngPsProperty();
       
    70 	
       
    71 	/**
       
    72      * Updates the Vcc property keys KVccPropKeyHoStatus and 
       
    73      * KVccPropKeyHoError. Subscribers of these properties will get the 
       
    74      * notification about the changed values.
       
    75      *
       
    76      * @since S60 5.0
       
    77      * @param aStatus The new value of the KVccPropKeyHoStatus key
       
    78      * @param aErrorCode The new value of the KVccPropKeyHoError key
       
    79      */
       
    80     void NotifySubscriberL( TVccHoStatus aStatus, 
       
    81     						TInt aErrorCode );
       
    82 
       
    83     /**
       
    84      * Gets the latest value of the Vcc property key KVccPropKeyHoStatus.
       
    85      *
       
    86      * @since S60 5.0
       
    87      * @param aStatus The value of the key
       
    88      * @return KErrNone / KErrPermissionDenied/ KErrNotFound/KErrArgument 
       
    89      */
       
    90     TInt GetCurrentHoStatus( TVccHoStatus& aStatus );
       
    91 
       
    92     /**
       
    93      * Gets the latest value of the Vcc property key KVccPropKeyHoError.
       
    94      *
       
    95      * @since S60 5.0
       
    96      * @param aErrorCode The value of the key
       
    97      * @return KErrNone / KErrPermissionDenied/ KErrNotFound/KErrArgument 
       
    98      */
       
    99     TInt GetCurrentErrorCode( TInt& aErrorCode );
       
   100     
       
   101 private:
       
   102 	/**
       
   103 	 * Constructor
       
   104 	 */
       
   105 	CVccEngPsProperty();
       
   106 
       
   107 	/**
       
   108 	 * Constructor
       
   109 	 */
       
   110 	void ConstructL();
       
   111 
       
   112 	/**
       
   113 	 * Defines keys used by Vcc Ho engine
       
   114 	 */
       
   115 	void DefineKeysL();
       
   116 	
       
   117 	/**
       
   118 	 * creates handles to properties
       
   119 	 */
       
   120 	void CreateHandlesL();
       
   121 	
       
   122 private: //data
       
   123 	
       
   124 	/**
       
   125 	 * Handle to ho status property 
       
   126 	 */
       
   127 	RProperty iHoStatusKey;
       
   128 	
       
   129 	/**
       
   130 	 * Handle to error code property 
       
   131 	 */
       
   132 	RProperty iErrorCodeKey;
       
   133 };
       
   134 
       
   135 #endif /*C_VCCENGPSPROPERTY_H*/