aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-02-16 20:41:58 +0000
committerConor Curran <conor.curran@canonical.com>2011-02-16 20:41:58 +0000
commit3c5c6dc46b738371bd2c0d6afe12f5a9bb168cf6 (patch)
treed4369ba925bbf8217aae9671cc973746ccc21bb7
parentfe11e6ad36166f9e5e7279ffc59249dd7788360a (diff)
downloadayatana-indicator-sound-3c5c6dc46b738371bd2c0d6afe12f5a9bb168cf6.tar.gz
ayatana-indicator-sound-3c5c6dc46b738371bd2c0d6afe12f5a9bb168cf6.tar.bz2
ayatana-indicator-sound-3c5c6dc46b738371bd2c0d6afe12f5a9bb168cf6.zip
need to encapsulate more
-rw-r--r--src/voip-input-menu-item.c30
-rw-r--r--src/voip-input-menu-item.h11
2 files changed, 35 insertions, 6 deletions
diff --git a/src/voip-input-menu-item.c b/src/voip-input-menu-item.c
index 209629e..51ddd95 100644
--- a/src/voip-input-menu-item.c
+++ b/src/voip-input-menu-item.c
@@ -27,7 +27,12 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
typedef struct _VoipInputMenuItemPrivate VoipInputMenuItemPrivate;
struct _VoipInputMenuItemPrivate {
- ActiveSink* a_sink;
+ ActiveSink* a_sink;
+ pa_cvolume volume;
+ gint mute;
+ guint32 volume_steps;
+ pa_channel_map channel_map;
+ pa_volume_t base_volume;
};
#define VOIP_INPUT_MENU_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VOIP_INPUT_MENU_ITEM_TYPE, VoipInputMenuItemPrivate))
@@ -102,6 +107,26 @@ handle_event (DbusmenuMenuitem * mi,
}
void
+voip_input_menu_item_update_(VoipInputMenuItem* item,
+ const pa_source_info* source)
+{
+
+}
+
+void
+voip_input_menu_item_update_source_details (VoipInputMenuItem* item,
+ const pa_source_info* source)
+{
+ VoipInputMenuItemPrivate* priv = VOIP_INPUT_MENU_ITEM_GET_PRIVATE (item);
+ priv->base_volume = source->base_volume;
+ priv->volume_steps = source->n_volume_steps;
+ priv->channel_map = source->channel_map;
+ priv->volume = source->volume;
+ priv->mute = source->mute;
+}
+
+
+/*
voip_input_menu_item_update (VoipInputMenuItem* item,
gdouble update)
{
@@ -110,10 +135,11 @@ voip_input_menu_item_update (VoipInputMenuItem* item,
DBUSMENU_VOIP_INPUT_MENUITEM_LEVEL,
new_volume);
}
+*/
void
voip_input_menu_item_enable (VoipInputMenuItem* item,
- gboolean active)
+ gboolean active)
{
dbusmenu_menuitem_property_set_bool( DBUSMENU_MENUITEM(item),
DBUSMENU_MENUITEM_PROP_VISIBLE,
diff --git a/src/voip-input-menu-item.h b/src/voip-input-menu-item.h
index 296f22c..ad70289 100644
--- a/src/voip-input-menu-item.h
+++ b/src/voip-input-menu-item.h
@@ -20,8 +20,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#define __VOIP_INPUT_MENU_ITEM_H__
#include <glib.h>
-#include <glib-object.h>
-
+#include <pulse/pulseaudio.h>
#include <libdbusmenu-glib/menuitem.h>
#include "active-sink.h"
@@ -47,8 +46,12 @@ struct _VoipInputMenuItem {
GType voip_input_menu_item_get_type (void);
-void voip_input_menu_item_update(VoipInputMenuItem* item, gdouble update);
-void voip_input_menu_item_enable(VoipInputMenuItem* item, gboolean active);
+void voip_input_menu_item_update (VoipInputMenuItem* item,
+ const pa_source_info* source);
+void voip_input_menu_item_update_source_details (VoipInputMenuItem* item,
+ const pa_source_info* source);
+
+void voip_input_menu_item_enable (VoipInputMenuItem* item, gboolean active);
VoipInputMenuItem* voip_input_menu_item_new (ActiveSink* sink);