3
* Ekiga -- A VoIP and Video-Conferencing application
4
* Copyright (C) 2000-2009 Damien Sandras <dsandras@seconix.com>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or (at
9
* your option) any later version. This program is distributed in the hope
10
* that it will be useful, but WITHOUT ANY WARRANTY; without even the
11
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
* See the GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
18
* Ekiga is licensed under the GPL license and as a special exception, you
19
* have permission to link or otherwise combine this program with the
20
* programs OPAL, OpenH323 and PWLIB, and distribute the combination, without
21
* applying the requirements of the GNU GPL to the OPAL, OpenH323 and PWLIB
22
* programs, as long as you do follow the requirements of the GNU GPL for all
23
* the rest of the software thus combined.
28
* hal-manager-mlogo.h - description
29
* ------------------------------------------
30
* begin : written in 2008 by Matthias Schneider
31
* copyright : (c) 2008 by Matthias Schneider
32
* description : Declaration of the interface of a hal core.
33
* A hal core manages HalManagers.
38
#ifndef __HAL_MANAGER_DBUS_H__
39
#define __HAL_MANAGER_DBUS_H__
42
#include "hal-manager.h"
46
#include <dbus/dbus.h>
47
#include <dbus/dbus-glib.h>
48
#include <glib-object.h>
57
typedef struct HalDevice {
62
unsigned video_capabilities;
65
typedef struct NmInterface {
68
std::string ip4_address;
73
: public Ekiga::HalManager
79
HalManager_dbus (Ekiga::ServiceCore & core);
89
/** Create a call based on the remote uri given as parameter
91
* @return true if a Ekiga::Call could be created
93
static void device_added_cb_proxy (DBusGProxy *object, const char *device, gpointer user_data);
94
static void device_removed_cb_proxy (DBusGProxy *object, const char *device, gpointer user_data);
96
static void interface_no_longer_active_cb_proxy (DBusGProxy *object, const char *interface, gpointer user_data);
97
static void interface_now_active_cb_proxy (DBusGProxy *object, const char *interface, gpointer user_data);
98
static void interface_ip4_address_change_cb_proxy (DBusGProxy *object, const char *interface, gpointer user_data);
100
void device_added_cb (const char *device);
101
void device_removed_cb (const char *device);
103
void interface_now_active_cb (const char *interface);
104
void interface_no_longer_active_cb (const char *interface);
105
void interface_ip4_address_change_cb (const char *interface);
108
void populate_devices_list();
109
void populate_interfaces_list ();
111
bool get_device_type_name (const char * device, HalDevice & hal_device);
112
void get_interface_name_ip (const char * interface, NmInterface & nm_interface);
114
void get_string_property (DBusGProxy *proxy, const char * property, std::string & value);
116
Ekiga::ServiceCore & core;
118
DBusGConnection * bus;
119
DBusGProxy * hal_proxy;
120
DBusGProxy * nm_proxy;
122
std::vector <HalDevice> hal_devices;
123
std::vector <NmInterface> nm_interfaces;