mmserv/tms/tmscallserver/inc/tmscsdownlink.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 03 May 2010 12:59:52 +0300
changeset 14 80975da52420
child 16 43d09473c595
permissions -rw-r--r--
Revision: 201015 Kit: 201018

/*
 * 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 CSDOWNLINK_H
#define CSDOWNLINK_H

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

namespace TMS {

//
class TMSCSPDevSoundObserver;

/**
 *  Provides Downlink functionality.
 *
 */
NONSHARABLE_CLASS(TMSCSDownlink) : public TMSCSPDevSound
    {
public:

    static TMSCSDownlink* NewL(TMSCSPDevSoundObserver& aObserver);

    virtual ~TMSCSDownlink();

    /**
     * Sets volume.
     * @param aVolume Volume.
     */
    void SetVolume(gint aVolume);

    /**
     * Gets volume.
     * @return Current volume.
     */
    gint Volume();

    /**
     * Gets max volume.
     * @return Current volume.
     */
    gint MaxVolume();

    // from base class MDevSoundObserver

    /**
     * From MDevSoundObserver.
     * Indication from devsound that stream (Downlink) has been activated
     * successfully.
     */
    void BufferToBeFilled(CMMFBuffer* /*aBuffer*/);

    /**
     * From MDevSoundObserver.
     * Indication from devsound that activation of stream( Downlink)
     * failed.
     */
    void PlayError(TInt aErrorCode);

private:

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

protected:

    TMSCSDownlink(TMSCSPDevSoundObserver& aObserver);

    void ConstructL();
    };

} //namespace TMS

#endif // CSDOWNLINK_H