tsrc/public/basic/atextpluginapitest/inc/atextpluginobserver.h
changeset 0 f63038272f30
equal deleted inserted replaced
-1:000000000000 0:f63038272f30
       
     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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef ATEXTENSIONPLUGINOBSERVER_H
       
    20 #define ATEXTENSIONPLUGINOBSERVER_H
       
    21 
       
    22 #include <ecom/ecom.h>
       
    23 
       
    24 class CATExtPluginBase;
       
    25 
       
    26 /**
       
    27 * The interface for AT Extension Plugin to interact with AG.
       
    28 */
       
    29 class MATExtPluginObserver
       
    30     {
       
    31 public:
       
    32 
       
    33     /** 
       
    34     * Call by extension plugins when there is an unsolicited result code 
       
    35     * should be sent to target headset.
       
    36     * 
       
    37     * Each AT Extension Plugin is responsible to format
       
    38     * result codes properly, e.g. in BT HFP case, the
       
    39     * format should be <cr><lf><result code><cr><lf>
       
    40     * 
       
    41     * @param aAT the unsolicited result code to be sent.
       
    42     */
       
    43     virtual TInt SendUnsolicitedResult(CATExtPluginBase& aPlugin, const TDesC8& aAT) = 0;
       
    44 
       
    45     /** 
       
    46     * Called by Extension Plugins to inform AG that a command
       
    47     * handling has been completed or rejected.
       
    48     *
       
    49     * @return KErrNotSupported if the AT Extension Plugin doesn’t
       
    50     *         support the command passed in CATExtPluginBase::HandleCommand();
       
    51     *         KErrNone otherwise. No other error code is allowed.
       
    52     */
       
    53     virtual void HandleCommandCompleted(CATExtPluginBase& aPlugin, TInt aErr) = 0;
       
    54 
       
    55     /**
       
    56     * Called by the destructor of CATExtPluginBase.
       
    57     * A concrete service provider implementation should not touch this.
       
    58     *
       
    59     * @param aATExt the reference of the service provider.
       
    60     */
       
    61     virtual void ATExtPluginClosed(CATExtPluginBase& aPlugin) = 0;
       
    62     
       
    63     };
       
    64 
       
    65 #endif