phonesrv_plat/converged_call_provider_api/inc/mccpobserver.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 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:  CCP observer, Main plugin observer class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MCCPOBSERVER_H
       
    20 #define MCCPOBSERVER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 /**
       
    26 CCP error base definition
       
    27 */
       
    28 const TInt KCCPErrorBase = -30391;
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class MCCPCall;
       
    32 
       
    33 /**
       
    34 * CCP observer class.
       
    35 * Observer for CCP events, errors and statuses etc. 
       
    36 *
       
    37 *  @since S60 3.2
       
    38 */
       
    39 class MCCPObserver
       
    40     {
       
    41 public: 
       
    42     enum TCCPError
       
    43         {
       
    44         /** Registration failed */
       
    45         ECCPRegistrationFailed = KCCPErrorBase - 1,
       
    46         /** Unregistration failed */
       
    47         ECCPUnregistrationFailed = KCCPErrorBase - 2,
       
    48         /** Not implemented */
       
    49         ECCPNotImplemented = KCCPErrorBase - 3,
       
    50         /** Error occured */
       
    51         ECCPError = KCCPErrorBase - 4,
       
    52         /** Plugin not able to handle incoming call */
       
    53         ECCPIncomingCallFailed = KCCPErrorBase - 5
       
    54         };
       
    55 
       
    56 protected:
       
    57     /** 
       
    58     * Protects the observer being deleted through the observer interface 
       
    59     * @since S60 3.2
       
    60     */
       
    61     virtual inline ~MCCPObserver() {};
       
    62 
       
    63 public:
       
    64 
       
    65     /**
       
    66     * An error has occurred concerning the connection.
       
    67     * @since S60 3.2
       
    68     * @param aError Error code.
       
    69     * @return none
       
    70     */
       
    71     virtual void ErrorOccurred( MCCPObserver::TCCPError aError ) = 0;
       
    72 
       
    73     /**
       
    74     * Incoming call invitation in MT call case. 
       
    75     * @since S60 3.2
       
    76     * @param aCall Pointer to the newly created incoming call.
       
    77     * @return none
       
    78     */
       
    79     virtual void IncomingCall( MCCPCall* aCall ) = 0;
       
    80 
       
    81     /**
       
    82     * Incoming call invitation in attended transfer case. Occurs at transfer target end.
       
    83 	* For incoming transfer at transferor end see MCCPObserver::CallCreated.
       
    84     * @since S60 3.2
       
    85     * @param aCall IncomingCall transfer call.
       
    86     * @param aTempCall Pointer to the held call.
       
    87     */
       
    88     virtual void IncomingCall( MCCPCall* aCall,
       
    89                                MCCPCall& aTempCall ) = 0;
       
    90 
       
    91     /**
       
    92 	* Indicate an arrived transfer request. 
       
    93 	* Called at the transfer request receiver end, after receiving a transfer request .     
       
    94 	* For incoming transfer at transfer target end see MCCPObserver::IncomingCall with two call 
       
    95 	 objects as parameters.
       
    96 	* @since S60 3.2
       
    97     * @param aNewTransferCall The call that has been created with the new transfer target.
       
    98     * @param aOriginator Pointer to originator of the transfer request.
       
    99     * @param aAttended Transfer requested was attented (ETrue) or un-attented(EFalse)
       
   100     */
       
   101     virtual void CallCreated( MCCPCall* aNewTransferCall,
       
   102                               MCCPCall* aOriginator,
       
   103                               TBool aAttended ) = 0;
       
   104     };
       
   105 
       
   106 #endif // MCCPOBSERVER_H
       
   107 
       
   108 // End of File