mmserv/tms/tmscallserver/inc/tmscsuplink.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:23:00 +0100
branchRCL_3
changeset 46 0ac9a5310753
parent 45 095bea5f582e
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
 *
 * Contributors:
 *
 * Description: Telephony Multimedia Service
 *
 */

#ifndef TMSCSUPLINK_H
#define TMSCSUPLINK_H

#include <glib.h>
#include "tmscsdevsound.h"

namespace TMS {

/**
 *  Provides Uplink stream functionality.
 *
 */
NONSHARABLE_CLASS(TMSCSUplink) : public TMSCSDevSound
    {
public:

    static TMSCSUplink* NewL(TMSCSDevSoundObserver& observer);

    virtual ~TMSCSUplink();

    /**
     * Determines mic mute state.
     *
     * @return ETrue - mic is muted, EFalse - mic is not muted.
     */
    gboolean IsMuted();

    /**
     * Set mic gain.
     */
    void SetGain(gint gain);

    /**
     * Get mic muted.
     */
    gint Gain();

    /**
     * Get max gain.
     */
    gint MaxGain();

    // from base class MDevSoundObserver

    /**
     * From MDevSoundObserver.
     * Indication from the devsound that Uplink has been activated
     * successfully.
     */
    void BufferToBeEmptied(CMMFBuffer* aBuffer);

    /**
     * From MDevSoundObserver
     * Indication from devsound that Uplink activation has failed.
     */
    void RecordError(TInt aError);

private:

    /**
     * From TMSCSDevSound.
     * Tries to activate the mic stream.
     */
    void DoActivateL();

protected:

    TMSCSUplink(TMSCSDevSoundObserver& aObserver);
    void ConstructL();
    };

} //namespace TMS

#endif // TMSCSUPLINK_H