Skip to content

Latest commit

 

History

History
70 lines (58 loc) · 3.01 KB

usb_moded-dbus-private.h

File metadata and controls

70 lines (58 loc) · 3.01 KB
 
Mar 22, 2011
Mar 22, 2011
1
/*
Aug 24, 2018
Aug 24, 2018
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (C) 2013-2018 Jolla Ltd.
*
* Author: Philippe De Swert <philippe.de-swert@nokia.com>
* Author: Philippe De Swert <philippe.deswert@jollamobile.com>
* Author: Vesa Halttunen <vesa.halttunen@jollamobile.com>
* Author: Martin Jones <martin.jones@jollamobile.com>
* Author: Simo Piiroinen <simo.piiroinen@jollamobile.com>
* Author: Andrew den Exter <andrew.den.exter@jolla.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Lesser GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the Lesser GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef USB_MODED_DBUS_PRIVATE_H_
# define USB_MODED_DBUS_PRIVATE_H_
# include "usb_moded-dbus.h"
# include <dbus/dbus.h>
# include <glib.h>
/* ========================================================================= *
* Constants
* ========================================================================= */
Mar 22, 2011
Mar 22, 2011
38
Nov 7, 2016
Nov 7, 2016
39
/** Logical name for org.freedesktop.DBus.GetNameOwner method */
Aug 24, 2018
Aug 24, 2018
40
# define DBUS_GET_NAME_OWNER_REQ "GetNameOwner"
Nov 7, 2016
Nov 7, 2016
41
42
/** Logical name for org.freedesktop.DBus.NameOwnerChanged signal */
Aug 24, 2018
Aug 24, 2018
43
# define DBUS_NAME_OWNER_CHANGED_SIG "NameOwnerChanged"
Nov 7, 2016
Nov 7, 2016
44
Aug 24, 2018
Aug 24, 2018
45
46
47
/* ========================================================================= *
* Types
* ========================================================================= */
Aug 11, 2017
Aug 11, 2017
48
Aug 24, 2018
Aug 24, 2018
49
/* Callback function type used with umdbus_get_name_owner_async() */
Nov 7, 2016
Nov 7, 2016
50
51
typedef void (*usb_moded_get_name_owner_fn)(const char *owner);
Aug 24, 2018
Aug 24, 2018
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* ========================================================================= *
* Prototypes
* ========================================================================= */
/* -- umdbus -- */
DBusConnection *umdbus_get_connection (void);
gboolean umdbus_init_connection (void);
gboolean umdbus_init_service (void);
void umdbus_cleanup (void);
int umdbus_send_state_signal (const char *state_ind);
int umdbus_send_error_signal (const char *error);
int umdbus_send_supported_modes_signal (const char *supported_modes);
int umdbus_send_available_modes_signal (const char *available_modes);
int umdbus_send_hidden_modes_signal (const char *hidden_modes);
int umdbus_send_whitelisted_modes_signal(const char *whitelist);
gboolean umdbus_get_name_owner_async (const char *name, usb_moded_get_name_owner_fn cb, DBusPendingCall **ppc);
#endif /* USB_MODED_DBUS_PRIVATE_H_ */