phonesrv_plat/converged_call_provider_api/inc/mccpconferencecall.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 Conference call functionality.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MCCPCONFERENCECALL_H
       
    20 #define MCCPCONFERENCECALL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <mccpcall.h>
       
    25 
       
    26 class MCCPConferenceCallObserver; 
       
    27 
       
    28 /**
       
    29 * Conference call object.
       
    30 * 
       
    31 * @since S60 3.2
       
    32 */
       
    33 class MCCPConferenceCall
       
    34 	{
       
    35 protected:
       
    36     /** 
       
    37     * Protected destructor. Object cannot be deleted from plug-in client (CCE).
       
    38     * @since S60 3.2
       
    39     */
       
    40     virtual inline ~MCCPConferenceCall() {};
       
    41 
       
    42 public:
       
    43 
       
    44     /**
       
    45     * Returns the service-id used for the call.
       
    46     * @since S60 3.2
       
    47     * @param None.
       
    48     * @return Service-id of the call.
       
    49     */
       
    50     virtual TUint32 ServiceId() const = 0;
       
    51 
       
    52     /**
       
    53     * Ends an ongoing conference call.
       
    54     * Does not delete the call. Call deletion is requested calling 
       
    55     * CConvergedCallProvider::ReleaseConferenceCall.
       
    56 	* If the request cannot be started then an error will be returned immediately as return value. 
       
    57 	* In succesfull case KErrNone will be returned and the requested action has been started.
       
    58     * @param None
       
    59     * @return KErrNone if request was started succesfully. 
       
    60     * @return KErrAlreadyExists if conference is already in idle state.
       
    61     * @pre Call state is not MCCPConferenceCallObserver::ECCPConferenceIdle.
       
    62     * @since S60 3.2
       
    63     */
       
    64     virtual TInt HangUp() = 0;
       
    65 
       
    66     /**
       
    67     * Puts conference call on hold.
       
    68 	* If the request cannot be started then an error will be returned immediately as return value. 
       
    69 	* In succesfull case KErrNone will be returned and the requested action has been started.
       
    70     * @param None
       
    71     * @return KErrNone if request was started succesfully.
       
    72     * @return KErrNotReady if conferencel is not in connected state.
       
    73     * @pre Call state is MCCPConferenceCallObserver::ECCPConferenceActive.
       
    74     * @since S60 3.2
       
    75     */
       
    76     virtual TInt Hold() = 0;
       
    77       
       
    78     /**
       
    79     * Resumes previously held conference call.
       
    80 	* If the request cannot be started then an error will be returned immediately as return value. 
       
    81 	* In succesfull case KErrNone will be returned and the requested action has been started.
       
    82     * @param None
       
    83     * @return KErrNone if request was started succesfully.
       
    84     * @return KErrNotReady if call is not in on-hold state.
       
    85     * @pre Call state is MCCPConferenceCallObserver::ECCPConferenceHold.
       
    86     * @since S60 3.2
       
    87     */
       
    88     virtual TInt Resume() = 0;
       
    89 
       
    90     /**
       
    91     * Swaps a connected conference call between Hold and Resume. 
       
    92 	* If the request cannot be started then an error will be returned immediately as return value. 
       
    93 	* In succesfull case KErrNone will be returned and the requested action has been started.
       
    94     * @param none
       
    95     * @return KErrNone if request was started succesfully. 
       
    96     * @return KErrNotReady if call is not in on-hold state or connected state
       
    97     * @pre Call state is MCCPConferenceCallObserver::ECCPConferenceHold or 
       
    98     * MCCPConferenceCallObserver::ECCPConferenceActive
       
    99     * @since S60 3.2
       
   100     */
       
   101     virtual TInt Swap() = 0;
       
   102 
       
   103 	/**
       
   104 	* Adds a new call to conference call. 
       
   105 	* When plug-in regards the call as added it will notify observer about it 
       
   106 	* with call added notification MCCPConferenceCallObserver::ECCPConferenceCallAdded.
       
   107 	* 
       
   108 	* @since S60 3.2
       
   109 	* @param aCall Call to be added to conference.
       
   110 	* @return None
       
   111 	* @leave In case of an error system wide error code.
       
   112 	* @leave KErrAlreadyExists call is already part of conference.
       
   113 	* @leave KErrNotReady In case conference is not on hold or idle.
       
   114 	* @pre Conference call state is MCCPConferenceCallObserver::ECCPConferenceHold or 
       
   115 	* MCCPConferenceCallObserver::ECCPConferenceIdle. 
       
   116 	* @post Added call is notified calling MCCPConferenceCallObserver::ConferenceCallEventOccurred.
       
   117 	* @post If conference becomes active regarding its internal plug-in based logic state is 
       
   118 	* MCCPConferenceCallObserver::ECCPConferenceActive.
       
   119 	*/
       
   120 	virtual void AddCallL( MCCPCall* aCall ) = 0;
       
   121 
       
   122 	/**
       
   123 	* Removes a call from conference call. Can be called on any state.
       
   124 	* When plug-in regards the call as removed it will notify observer about it 
       
   125 	* with call removed notification MCCPConferenceCallObserver::ECCPConferenceCallRemoved.
       
   126 	* @since S60 3.2
       
   127 	* @param aCall Call to be removed from conference.
       
   128 	* @return None
       
   129 	* @leave In case of an error system wide error code.
       
   130 	* @leave KErrNotFound call was not part of conference.
       
   131 	* @leave KErrNotReady In case conference is not connected (MCCPConferenceCallObserver::ECCPConferenceActive) state.
       
   132 	* @pre Conference call state is MCCPConferenceCallObserver::ECCPConferenceActive or 
       
   133 	* MCCPConferenceCallObserver::ECCPConferenceIdle. 
       
   134 	* @post Removed call is notified calling MCCPConferenceCallObserver::ConferenceCallEventOccurred.
       
   135 	* @post If conference becomes idle regarding its internal plug-in based logic state is 
       
   136 	* MCCPConferenceCallObserver::ECCPConferenceIdle. 
       
   137 	*/
       
   138 	virtual void RemoveCallL( MCCPCall* aCall ) = 0;
       
   139 
       
   140 	/**
       
   141 	* Returns number of calls active calls in the conference.
       
   142 	* @since S60 3.2
       
   143 	* @param None
       
   144 	* @return aCallCount Number of calls in conference.
       
   145 	*/
       
   146 	virtual TInt CallCount() const = 0;
       
   147 
       
   148     /**
       
   149 	* Switch to a private call with given call that is part of conference. When call is regared 
       
   150 	* as removed from conference it will be notified using 
       
   151 	* MCCPConferenceCallObserver::ECCPConferenceCallRemoved.
       
   152 	* @since S60 3.2
       
   153 	* @param aCall Call to go one-to-one with.
       
   154 	* @return None
       
   155 	* @leave KErrNotFound call was not part of conference.
       
   156 	* @post After successful actions conference call state is MCCPConferenceCallObserver::ECCPConferenceHold 
       
   157 	* and private call will become active one. 
       
   158 	*/
       
   159 	virtual void GoOneToOneL( MCCPCall& aCall ) = 0;
       
   160 
       
   161     /**
       
   162 	* Add all current calls in the plug-in to conference. Each succesfully added call will 
       
   163 	* be separately notified using MCCPConferenceCallObserver::ECCPConferenceCallAdded.
       
   164 	* If call is not added to conference it is not notified and can be regareded as not 
       
   165 	* part of conference
       
   166 	* @since S60 3.2
       
   167 	* @param None
       
   168 	* @return None
       
   169 	* @leave In case of an error system wide error code.
       
   170 	*/
       
   171 	virtual void CurrentCallsToConferenceL() = 0;
       
   172 	
       
   173     /**
       
   174     * Gets conference participants
       
   175 	* @since S60 3.2
       
   176 	* @param aCallArray Reference to call array
       
   177     * @return Error code
       
   178 	*/
       
   179 	virtual TInt GetCallArray( RPointerArray<MCCPCall>& aCallArray ) = 0;
       
   180 	
       
   181     /**
       
   182     * Add an observer for conference call related events.
       
   183     * Currently CCE will set only one observer.
       
   184     * @since S60 v3.2
       
   185     * @param aObserver Observer to be added
       
   186     * @return None
       
   187     * @leave System error if observer adding fails.
       
   188     */
       
   189     virtual void AddObserverL( const MCCPConferenceCallObserver& aObserver ) = 0;
       
   190 
       
   191     /**
       
   192     * Remove an observer.
       
   193     * @since S60 v3.2
       
   194     * @param none
       
   195     * @param aObserver Observer for conference.
       
   196     * @return KErrNone if removed succesfully.
       
   197     * @return KErrNotFound if observer was not found.
       
   198     */
       
   199     virtual TInt RemoveObserver( const MCCPConferenceCallObserver& aObserver ) = 0;
       
   200 	};
       
   201 
       
   202 #endif // MCCPCONFERENCECALL_H
       
   203