mmserv/tms/tmscallserver/inc/csdownlink.h
changeset 0 71ca22bcf22a
child 3 4f62049db6ac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmscallserver/inc/csdownlink.h	Tue Feb 02 01:08:46 2010 +0200
@@ -0,0 +1,92 @@
+/*
+ * 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 "cspdevsound.h"
+
+namespace TMS {
+
+//
+class MCSPDevSoundObserver;
+
+/**
+ *  Provides Downlink functionality.
+ *
+ */
+NONSHARABLE_CLASS(CSDownlink) : public CSPDevSound
+    {
+public:
+
+    static CSDownlink* NewL(MCSPDevSoundObserver& aObserver);
+
+    virtual ~CSDownlink();
+
+    /**
+     * 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:
+
+    CSDownlink(MCSPDevSoundObserver& aObserver);
+
+    void ConstructL();
+    };
+
+} //namespace TMS
+
+#endif // CSDownlink_H