mmserv/tms/tmscallserver/inc/csuplink.h
changeset 0 71ca22bcf22a
child 3 4f62049db6ac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmscallserver/inc/csuplink.h	Tue Feb 02 01:08:46 2010 +0200
@@ -0,0 +1,104 @@
+/*
+ * 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 CS_UPLINK_H
+#define CS_UPLINK_H
+
+#include <glib.h>
+#include "cspdevsound.h"
+
+namespace TMS {
+
+/**
+ *  Provides uplink functionality.
+ *
+ */
+NONSHARABLE_CLASS(CSUplink) : public CSPDevSound
+    {
+public:
+
+    static CSUplink* NewL(MCSPDevSoundObserver& aObserver);
+
+    virtual ~CSUplink();
+
+    /**
+     * Determines mic mute state.
+     *
+     * @return ETrue - mic is muted, EFalse - mic is not muted.
+     */
+    TBool IsMuted();
+
+    /**
+     * Set mic muted.
+     */
+    void SetMuted();
+
+    /**
+     * Set mic unmuted.
+     */
+    void SetUnmuted();
+
+    /**
+     * Set mic gain.
+     */
+    void SetGain(gint aGain);
+
+    /**
+     * Get mic muted.
+     */
+    gint Gain();
+
+    /**
+     * Get max gain.
+     */
+    gint MaxGain();
+
+    // from base class MDevSoundObserver
+
+    /**
+     * From MDevSoundObserver
+     * Notification from Devsound that stream (mic) is
+     * activated successfully.
+     */
+    void BufferToBeEmptied(CMMFBuffer* aBuffer);
+
+    /**
+     * From MDevSoundObserver
+     * Notification from devsound that downstream(mic) activation
+     * feiled.
+     */
+    void RecordError(TInt aError);
+
+private:
+
+    // from base class MCSPDevSound
+
+    /**
+     * From MCSPDevSound.
+     * Tries to activate the mic stream.
+     */
+    void DoActivateL();
+
+protected:
+
+    CSUplink(MCSPDevSoundObserver& aObserver);
+    void ConstructL();
+    };
+
+} //namespace TMS
+
+#endif // CSUplink_H