10 #include "include/mm_sound_mgr_focus.h"
11 #include "include/mm_sound_mgr_focus_dbus.h"
12 #include "include/mm_sound_mgr_focus_ipc.h"
13 #include "../include/mm_sound_dbus.h"
16 #define BUS_NAME_FOCUS_SERVER "org.tizen.FocusServer"
17 #define OBJECT_FOCUS_SERVER "/org/tizen/FocusServer1"
18 #define INTERFACE_FOCUS_SERVER "org.tizen.FocusServer1"
20 /* Introspection data for the service we are exporting */
21 static const gchar introspection_xml[] =
23 " <interface name='org.tizen.FocusServer1'>"
24 " <method name='GetUniqueId'>"
25 " <arg name='id' type='i' direction='out'/>"
27 " <method name='RegisterFocus'>"
28 " <arg name='pid' type='i' direction='in'/>"
29 " <arg name='handle_id' type='i' direction='in'/>"
30 " <arg name='stream_type' type='s' direction='in'/>"
32 " <method name='UnregisterFocus'>"
33 " <arg name='pid' type='i' direction='in'/>"
34 " <arg name='handle_id' type='i' direction='in'/>"
36 " <method name='SetFocusReacquisition'>"
37 " <arg name='pid' type='i' direction='in'/>"
38 " <arg name='handle_id' type='i' direction='in'/>"
39 " <arg name='reacquisition' type='b' direction='in'/>"
41 " <method name='GetAcquiredFocusStreamType'>"
42 " <arg name='focus_type' type='i' direction='in'/>"
43 " <arg name='stream_type' type='s' direction='out'/>"
44 " <arg name='option' type='i' direction='out'/>"
45 " <arg name='ext_info' type='s' direction='out'/>"
47 " <method name='AcquireFocus'>"
48 " <arg name='pid' type='i' direction='in'/>"
49 " <arg name='handle_id' type='i' direction='in'/>"
50 " <arg name='focus_type' type='i' direction='in'/>"
51 " <arg name='option' type='i' direction='in'/>"
52 " <arg name='ext_info' type='s' direction='in'/>"
54 " <method name='ReleaseFocus'>"
55 " <arg name='pid' type='i' direction='in'/>"
56 " <arg name='handle_id' type='i' direction='in'/>"
57 " <arg name='focus_type' type='i' direction='in'/>"
58 " <arg name='option' type='i' direction='in'/>"
59 " <arg name='ext_info' type='s' direction='in'/>"
61 " <method name='WatchFocus'>"
62 " <arg name='pid' type='i' direction='in'/>"
63 " <arg name='handle_id' type='i' direction='in'/>"
64 " <arg name='focus_type' type='i' direction='in'/>"
66 " <method name='UnwatchFocus'>"
67 " <arg name='pid' type='i' direction='in'/>"
68 " <arg name='handle_id' type='i' direction='in'/>"
70 " <method name='DeliverFocus'>"
71 " <arg name='pid' type='i' direction='in'/>"
72 " <arg name='src_handle_id' type='i' direction='in'/>"
73 " <arg name='dst_handle_id' type='i' direction='in'/>"
74 " <arg name='focus_type' type='i' direction='in'/>"
76 " <method name='EmergentExitFocus'>"
77 " <arg name='pid' type='i' direction='in'/>"
81 static GDBusConnection* conn_g;
83 typedef void (*dbus_method_handler)(GDBusMethodInvocation *invocation);
84 typedef int (*dbus_signal_sender)(GDBusConnection *conn, GVariant *parameter);
86 struct mm_sound_mgr_focus_dbus_method {
87 struct mm_sound_dbus_method_info info;
88 dbus_method_handler handler;
91 struct mm_sound_mgr_focus_dbus_signal {
92 struct mm_sound_dbus_signal_info info;
93 dbus_signal_sender sender;
96 static void handle_method_get_unique_id(GDBusMethodInvocation* invocation);
97 static void handle_method_register_focus(GDBusMethodInvocation* invocation);
98 static void handle_method_unregister_focus(GDBusMethodInvocation* invocation);
99 static void handle_method_set_focus_reacquisition(GDBusMethodInvocation* invocation);
100 static void handle_method_get_acquired_focus_stream_type(GDBusMethodInvocation* invocation);
101 static void handle_method_acquire_focus(GDBusMethodInvocation* invocation);
102 static void handle_method_release_focus(GDBusMethodInvocation* invocation);
103 static void handle_method_watch_focus(GDBusMethodInvocation* invocation);
104 static void handle_method_unwatch_focus(GDBusMethodInvocation* invocation);
105 static void handle_method_deliver_focus(GDBusMethodInvocation* invocation);
107 /* Currently , Just using method's name and handler */
108 /* TODO : generate introspection xml automatically, with these value include argument and reply */
109 /* TODO : argument check with these information */
110 /* TODO : divide object and interface with features (ex. play, path, device, focus, asm) */
111 static mm_sound_dbus_method_intf_t methods[AUDIO_METHOD_MAX] = {
112 [AUDIO_METHOD_GET_UNIQUE_ID] = {
114 .name = "GetUniqueId",
116 .handler = handle_method_get_unique_id
118 [AUDIO_METHOD_REGISTER_FOCUS] = {
120 .name = "RegisterFocus",
122 .handler = handle_method_register_focus
124 [AUDIO_METHOD_UNREGISTER_FOCUS] = {
126 .name = "UnregisterFocus",
128 .handler = handle_method_unregister_focus
130 [AUDIO_METHOD_SET_FOCUS_REACQUISITION] = {
132 .name = "SetFocusReacquisition",
134 .handler = handle_method_set_focus_reacquisition
136 [AUDIO_METHOD_GET_ACQUIRED_FOCUS_STREAM_TYPE] = {
138 .name = "GetAcquiredFocusStreamType",
140 .handler = handle_method_get_acquired_focus_stream_type
142 [AUDIO_METHOD_ACQUIRE_FOCUS] = {
144 .name = "AcquireFocus",
146 .handler = handle_method_acquire_focus
148 [AUDIO_METHOD_RELEASE_FOCUS] = {
150 .name = "ReleaseFocus",
152 .handler = handle_method_release_focus
154 [AUDIO_METHOD_WATCH_FOCUS] = {
156 .name = "WatchFocus",
158 .handler = handle_method_watch_focus
160 [AUDIO_METHOD_UNWATCH_FOCUS] = {
162 .name = "UnwatchFocus",
164 .handler = handle_method_unwatch_focus
166 [AUDIO_METHOD_DELIVER_FOCUS] = {
168 .name = "DeliverFocus",
170 .handler = handle_method_deliver_focus
174 static GDBusNodeInfo *introspection_data = NULL;
175 guint focus_server_owner_id ;
176 unsigned emergent_exit_subs_id;
179 For pass error code with 'g_dbus_method_invocation_return_error'
180 We have to use some glib features like GError, GQuark
182 /* Only For error types which is currently being used in server-side */
183 static const GDBusErrorEntry mm_sound_error_entries[] = {
184 {MM_ERROR_OUT_OF_MEMORY, "org.tizen.multimedia.OutOfMemory"},
185 {MM_ERROR_OUT_OF_STORAGE, "org.tizen.multimedia.OutOfStorage"},
186 {MM_ERROR_INVALID_ARGUMENT, "org.tizen.multimedia.InvalidArgument"},
187 {MM_ERROR_POLICY_INTERNAL, "org.tizen.multimedia.PolicyInternal"},
188 {MM_ERROR_NOT_SUPPORT_API, "org.tizen.multimedia.NotSupportAPI"},
189 {MM_ERROR_POLICY_BLOCKED, "org.tizen.multimedia.PolicyBlocked"},
190 {MM_ERROR_END_OF_FILE, "org.tizen.multimedia.EndOfFile"},
191 {MM_ERROR_COMMON_OUT_OF_RANGE, "org.tizen.multimedia.common.OutOfRange"},
192 {MM_ERROR_COMMON_UNKNOWN, "org.tizen.multimedia.common.Unknown"},
193 {MM_ERROR_COMMON_NO_FREE_SPACE, "org.tizen.multimedia.common.NoFreeSpace"},
194 {MM_ERROR_SOUND_INTERNAL, "org.tizen.multimedia.audio.Internal"},
195 {MM_ERROR_SOUND_INVALID_STATE, "org.tizen.multimedia.audio.InvalidState"},
196 {MM_ERROR_SOUND_NO_FREE_SPACE, "org.tizen.multimedia.audio.NoFreeSpace"},
197 {MM_ERROR_SOUND_UNSUPPORTED_MEDIA_TYPE, "org.tizen.multimedia.audio.UnsupportedMediaType"},
198 {MM_ERROR_SOUND_INVALID_POINTER, "org.tizen.multimedia.audio.InvalidPointer"},
199 {MM_ERROR_SOUND_INVALID_FILE, "org.tizen.multimedia.audio.InvalidFile"},
200 {MM_ERROR_SOUND_FILE_NOT_FOUND, "org.tizen.multimedia.audio.FileNotFound"},
201 {MM_ERROR_SOUND_NO_DATA, "org.tizen.multimedia.audio.NoData"},
202 {MM_ERROR_SOUND_INVALID_PATH, "org.tizen.multimedia.audio.InvalidPath"},
205 static const char* _convert_error_code(int err_code)
209 for (i = 0; i < G_N_ELEMENTS(mm_sound_error_entries); i++) {
210 if (err_code == mm_sound_error_entries[i].error_code)
211 return mm_sound_error_entries[i].dbus_error_name;
214 return "org.tizen.multimedia.common.Unknown";
217 static int _get_sender_pid(GDBusMethodInvocation* invocation)
222 GDBusConnection * connection = NULL;
225 connection = g_dbus_method_invocation_get_connection(invocation);
226 sender = g_dbus_method_invocation_get_sender(invocation);
228 debug_msg("connection = %p, sender = %s", connection, sender);
230 value = g_dbus_connection_call_sync(connection, "org.freedesktop.DBus", "/org/freedesktop/DBus",
231 "org.freedesktop.DBus", "GetConnectionUnixProcessID",
232 g_variant_new("(s)", sender, NULL), NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &err);
234 g_variant_get(value, "(u)", &pid);
235 debug_msg("Sender PID = [%d]", pid);
236 g_variant_unref(value);
238 debug_error("err code = %d, err msg = %s", err->code, err->message);
243 static void _method_call_return_value(GDBusMethodInvocation *invocation, GVariant *params)
245 const char *method_name;
246 method_name = g_dbus_method_invocation_get_method_name(invocation);
247 debug_msg("Method Call '%s' success", method_name);
248 g_dbus_method_invocation_return_value(invocation, params);
250 static void _method_call_return_error(GDBusMethodInvocation *invocation, int ret)
252 const char *err_name, *method_name;
253 err_name = _convert_error_code(ret);
254 method_name = g_dbus_method_invocation_get_method_name(invocation);
255 debug_error("Method Call '%s' failed, err '%s(%X)'", method_name, err_name, ret);
256 g_dbus_method_invocation_return_dbus_error(invocation, err_name, "failed");
259 static void handle_method_get_unique_id(GDBusMethodInvocation* invocation)
261 static int unique_id = 0;
265 _method_call_return_value(invocation, g_variant_new("(i)", ++unique_id));
270 static void handle_method_register_focus(GDBusMethodInvocation* invocation)
272 int ret = MM_ERROR_NONE;
274 const char* stream_type = NULL;
275 GVariant *params = NULL;
280 if (!(params = g_dbus_method_invocation_get_parameters(invocation))) {
281 debug_error("Parameter for Method is NULL");
282 ret = MM_ERROR_SOUND_INTERNAL;
286 g_variant_get(params, "(ii&s)", &pid, &handle_id, &stream_type);
287 ret = __mm_sound_mgr_focus_ipc_register_focus(_get_sender_pid(invocation), handle_id, stream_type);
290 if (ret == MM_ERROR_NONE)
291 _method_call_return_value(invocation, g_variant_new("()"));
293 _method_call_return_error(invocation, ret);
298 static void handle_method_unregister_focus(GDBusMethodInvocation* invocation)
300 int ret = MM_ERROR_NONE;
301 int pid = 0, handle_id = 0;
302 GVariant *params = NULL;
306 if (!(params = g_dbus_method_invocation_get_parameters(invocation))) {
307 debug_error("Parameter for Method is NULL");
308 ret = MM_ERROR_SOUND_INTERNAL;
312 g_variant_get(params, "(ii)", &pid, &handle_id);
313 ret = __mm_sound_mgr_focus_ipc_unregister_focus(_get_sender_pid(invocation), handle_id);
316 if (ret == MM_ERROR_NONE)
317 _method_call_return_value(invocation, g_variant_new("()"));
319 _method_call_return_error(invocation, ret);
324 static void handle_method_set_focus_reacquisition(GDBusMethodInvocation* invocation)
326 int ret = MM_ERROR_NONE;
327 int pid = 0, handle_id = 0;
328 gboolean reacquisition;
329 GVariant *params = NULL;
333 if (!(params = g_dbus_method_invocation_get_parameters(invocation))) {
334 debug_error("Parameter for Method is NULL");
335 ret = MM_ERROR_SOUND_INTERNAL;
339 g_variant_get(params, "(iib)", &pid, &handle_id, &reacquisition);
340 ret = __mm_sound_mgr_focus_ipc_set_focus_reacquisition(_get_sender_pid(invocation), handle_id, reacquisition);
343 if (ret == MM_ERROR_NONE)
344 _method_call_return_value(invocation, g_variant_new("()"));
346 _method_call_return_error(invocation, ret);
351 static void handle_method_get_acquired_focus_stream_type(GDBusMethodInvocation* invocation)
353 int ret = MM_ERROR_NONE;
355 char *stream_type = NULL;
357 char *ext_info = NULL;
358 GVariant *params = NULL;
362 if (!(params = g_dbus_method_invocation_get_parameters(invocation))) {
363 debug_error("Parameter for Method is NULL");
364 ret = MM_ERROR_SOUND_INTERNAL;
368 g_variant_get(params, "(i)", &focus_type);
369 ret = __mm_sound_mgr_focus_ipc_get_acquired_focus_stream_type(focus_type, &stream_type, &option, &ext_info);
372 if (ret == MM_ERROR_NONE)
373 _method_call_return_value(invocation, g_variant_new("(sis)", stream_type, option, ext_info));
375 _method_call_return_error(invocation, ret);
380 static void handle_method_acquire_focus(GDBusMethodInvocation* invocation)
382 int ret = MM_ERROR_NONE;
383 int pid = 0, handle_id = 0, focus_type = 0, option = 0;
384 const char* ext_info = NULL;
385 GVariant *params = NULL;
389 if (!(params = g_dbus_method_invocation_get_parameters(invocation))) {
390 debug_error("Parameter for Method is NULL");
391 ret = MM_ERROR_SOUND_INTERNAL;
395 g_variant_get(params, "(iiiis)", &pid, &handle_id, &focus_type, &option, &ext_info);
396 ret = __mm_sound_mgr_focus_ipc_acquire_focus(_get_sender_pid(invocation),
397 handle_id, focus_type, option, ext_info, false);
400 if (ret == MM_ERROR_NONE)
401 _method_call_return_value(invocation, g_variant_new("()"));
403 _method_call_return_error(invocation, ret);
408 static void handle_method_release_focus(GDBusMethodInvocation* invocation)
410 int ret = MM_ERROR_NONE;
411 int pid = 0, handle_id = 0, focus_type = 0, option = 0;
412 const char* ext_info = NULL;
413 GVariant *params = NULL;
417 if (!(params = g_dbus_method_invocation_get_parameters(invocation))) {
418 debug_error("Parameter for Method is NULL");
419 ret = MM_ERROR_SOUND_INTERNAL;
423 g_variant_get(params, "(iiiis)", &pid, &handle_id, &focus_type, &option, &ext_info);
424 ret = __mm_sound_mgr_focus_ipc_release_focus(_get_sender_pid(invocation),
425 handle_id, focus_type, option, ext_info, false);
428 if (ret == MM_ERROR_NONE)
429 _method_call_return_value(invocation, g_variant_new("()"));
431 _method_call_return_error(invocation, ret);
436 static void handle_method_watch_focus(GDBusMethodInvocation* invocation)
438 int ret = MM_ERROR_NONE;
439 int handle_id = 0, focus_type = 0;
440 GVariant *params = NULL;
445 if (!(params = g_dbus_method_invocation_get_parameters(invocation))) {
446 debug_error("Parameter for Method is NULL");
447 ret = MM_ERROR_SOUND_INTERNAL;
451 g_variant_get(params, "(iii)", &pid, &handle_id, &focus_type);
452 ret = __mm_sound_mgr_focus_ipc_watch_focus(_get_sender_pid(invocation), handle_id, focus_type);
455 if (ret == MM_ERROR_NONE)
456 _method_call_return_value(invocation, g_variant_new("()"));
458 _method_call_return_error(invocation, ret);
463 static void handle_method_unwatch_focus(GDBusMethodInvocation* invocation)
465 int ret = MM_ERROR_NONE;
468 GVariant *params = NULL;
472 if (!(params = g_dbus_method_invocation_get_parameters(invocation))) {
473 debug_error("Parameter for Method is NULL");
474 ret = MM_ERROR_SOUND_INTERNAL;
478 g_variant_get(params, "(ii)", &pid, &handle_id);
479 ret = __mm_sound_mgr_focus_ipc_unwatch_focus(_get_sender_pid(invocation), handle_id);
482 if (ret == MM_ERROR_NONE)
483 _method_call_return_value(invocation, g_variant_new("()"));
485 _method_call_return_error(invocation, ret);
490 static void handle_method_deliver_focus(GDBusMethodInvocation* invocation)
492 int ret = MM_ERROR_NONE;
494 int src_handle_id = 0;
495 int dst_handle_id = 0;
497 GVariant *params = NULL;
501 if (!(params = g_dbus_method_invocation_get_parameters(invocation))) {
502 debug_error("Parameter for Method is NULL");
503 ret = MM_ERROR_SOUND_INTERNAL;
507 g_variant_get(params, "(iiii)", &pid, &src_handle_id, &dst_handle_id, &focus_type);
508 ret = __mm_sound_mgr_focus_ipc_deliver_focus(pid, src_handle_id, dst_handle_id, focus_type);
511 if (ret == MM_ERROR_NONE)
512 _method_call_return_value(invocation, g_variant_new("()"));
514 _method_call_return_error(invocation, ret);
519 /**********************************************************************************/
520 static void handle_method_call(GDBusConnection *connection,
522 const gchar *object_path,
523 const gchar *interface_name,
524 const gchar *method_name,
525 GVariant *parameters,
526 GDBusMethodInvocation *invocation,
532 debug_error("Parameter Null");
535 debug_msg("Method Call, obj : %s, intf : %s, method : %s", object_path, interface_name, method_name);
537 for (method_idx = AUDIO_METHOD_GET_UNIQUE_ID; method_idx < AUDIO_METHOD_MAX; method_idx++) {
538 if (!g_strcmp0(method_name, methods[method_idx].info.name))
539 methods[method_idx].handler(invocation);
543 static GVariant* handle_get_property(GDBusConnection *connection,
545 const gchar *object_path,
546 const gchar *interface_name,
547 const gchar *property_name,
551 debug_log("Get Property, obj : %s, intf : %s, prop : %s", object_path, interface_name, property_name);
555 static gboolean handle_set_property(GDBusConnection *connection,
557 const gchar *object_path,
558 const gchar *interface_name,
559 const gchar *property_name,
564 debug_log("Set Property, obj : %s, intf : %s, prop : %s", object_path, interface_name, property_name);
568 void emergent_exit_signal_handler(audio_event_t event, GVariant *param, void *userdata)
570 int ret = MM_ERROR_NONE;
573 if (event != AUDIO_EVENT_EMERGENT_EXIT)
578 g_variant_get(param, "(i)", &pid);
579 debug_log("emergent exit : pid %d", pid);
580 ret = __mm_sound_mgr_focus_ipc_emergent_exit(pid);
582 debug_error("__mm_sound_mgr_focus_ipc_emergent_exit failed : 0x%x", ret);
587 static const GDBusInterfaceVTable interface_vtable = {
593 static void on_bus_acquired(GDBusConnection *connection, const gchar *name, gpointer user_data)
596 debug_log("Bus Acquired (%s)", name);
599 reg_id = g_dbus_connection_register_object(connection,
601 introspection_data->interfaces[0],
607 debug_error("Register object(%s) failed", OBJECT_FOCUS_SERVER);
612 static void on_name_acquired(GDBusConnection *connection, const gchar *name, gpointer user_data)
614 debug_log("Name Acquired (%s)", name);
617 static void on_name_lost(GDBusConnection *connection, const gchar *name, gpointer user_data)
619 debug_log("Name Lost (%s)", name);
622 static int _mm_sound_mgr_focus_dbus_own_name(GBusType bus_type, const char* wellknown_name, guint* owner_id)
626 debug_msg("Own name (%s) for focus-server", wellknown_name);
628 oid = g_bus_own_name(bus_type, wellknown_name, G_BUS_NAME_OWNER_FLAGS_NONE,
629 on_bus_acquired, on_name_acquired, on_name_lost, NULL, NULL);
631 debug_error("Dbus own name failed");
632 return MM_ERROR_SOUND_INTERNAL;
637 debug_msg("OwnerID (%d) for focus-server", *owner_id);
639 return MM_ERROR_NONE;
642 static void _mm_sound_mgr_focus_dbus_unown_name(guint oid)
644 debug_msg("Unown name for focus-server [%d]", oid);
646 g_bus_unown_name(oid);
649 #define PA_BUS_NAME "org.pulseaudio.Server"
650 #define PA_STREAM_MANAGER_OBJECT_PATH "/org/pulseaudio/StreamManager"
651 #define PA_STREAM_MANAGER_INTERFACE "org.pulseaudio.StreamManager"
652 #define PA_STREAM_MANAGER_METHOD_NAME_GET_STREAM_LIST "GetStreamList"
653 int __mm_sound_mgr_focus_dbus_get_stream_list(stream_list_t* stream_list)
655 int ret = MM_ERROR_NONE;
656 GVariant *result = NULL;
657 GVariant *child = NULL;
658 GDBusConnection *conn = NULL;
662 conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
664 LOGE("g_bus_get_sync() error (%s)", err ? err->message : NULL);
666 ret = MM_ERROR_SOUND_INTERNAL;
669 result = g_dbus_connection_call_sync(conn,
671 PA_STREAM_MANAGER_OBJECT_PATH,
672 PA_STREAM_MANAGER_INTERFACE,
673 PA_STREAM_MANAGER_METHOD_NAME_GET_STREAM_LIST,
675 G_VARIANT_TYPE("(vv)"),
676 G_DBUS_CALL_FLAGS_NONE,
680 if (!result || err) {
681 debug_error("g_dbus_connection_call_sync() error (%s)", err ? err->message : NULL);
683 ret = MM_ERROR_SOUND_INTERNAL;
686 GVariant *item = NULL;
687 child = g_variant_get_child_value(result, 0);
688 item = g_variant_get_variant(child);
691 g_variant_iter_init(&iter, item);
692 while ((i < AVAIL_STREAMS_MAX) && g_variant_iter_loop(&iter, "&s", &name)) {
693 debug_log("name : %s", name);
694 stream_list->stream_types[i++] = strdup(name);
696 g_variant_unref(item);
697 g_variant_unref(child);
699 child = g_variant_get_child_value(result, 1);
700 item = g_variant_get_variant(child);
703 g_variant_iter_init(&iter, item);
704 while ((i < AVAIL_STREAMS_MAX) && g_variant_iter_loop(&iter, "i", &priority)) {
705 debug_log("priority : %d", priority);
706 stream_list->priorities[i++] = priority;
708 g_variant_unref(item);
709 g_variant_unref(child);
712 g_variant_unref(result);
713 g_object_unref(conn);
718 int MMSoundMgrFocusDbusInit(void)
722 introspection_data = g_dbus_node_info_new_for_xml(introspection_xml, NULL);
723 if (!introspection_data)
724 return MM_ERROR_SOUND_INTERNAL;
726 if (_mm_sound_mgr_focus_dbus_own_name(G_BUS_TYPE_SYSTEM, BUS_NAME_FOCUS_SERVER, &focus_server_owner_id) != MM_ERROR_NONE) {
727 debug_error("dbus own name for focus-server error");
728 return MM_ERROR_SOUND_INTERNAL;
730 if (mm_sound_dbus_signal_subscribe_to(AUDIO_PROVIDER_AUDIO_CLIENT, AUDIO_EVENT_EMERGENT_EXIT, emergent_exit_signal_handler, NULL, NULL, &emergent_exit_subs_id) != MM_ERROR_NONE) {
731 debug_error("dbus signal subscribe for emergent exit error");
732 return MM_ERROR_SOUND_INTERNAL;
737 return MM_ERROR_NONE;
740 void MMSoundMgrFocusDbusFini(void)
744 if (emergent_exit_subs_id != 0)
745 mm_sound_dbus_signal_unsubscribe(emergent_exit_subs_id);
746 _mm_sound_mgr_focus_dbus_unown_name(focus_server_owner_id);
747 g_dbus_node_info_unref(introspection_data);