client: Fix the mangled copyright statement
[platform/upstream/connman.git] / client / services.h
1 /*
2  *
3  *  Connection Manager
4  *
5  *  Copyright (C) 2012  Intel Corporation. All rights reserved.
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2 of the License, or
10  *  (at your option) any later version.
11  *
12  *  This program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with this program; if not, write to the Free Software
19  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20  *
21  */
22
23 #ifndef __CLIENT_SERVICES_H
24 #define __CLIENT_SERVICES_H
25
26 #include <stdint.h>
27
28 #include <dbus/dbus.h>
29
30 struct service_data {
31         const char *path;
32         const char *name;
33         dbus_bool_t autoconn;
34         dbus_bool_t favorite;
35         dbus_bool_t connected;
36         dbus_bool_t online;
37 };
38
39 char *strip_service_path(char *service);
40 void extract_service_name(DBusMessageIter *dict, struct service_data *service);
41 int set_service_property(DBusConnection *connection, DBusMessage *message,
42                                 char *name, char *property, char **keys,
43                                 void *data, int num_args);
44 int remove_service(DBusConnection *connection, DBusMessage *message,
45                                                                 char *name);
46 int set_proxy_manual(DBusConnection *connection, DBusMessage *message,
47                                 char *name, char **servers, char **excludes,
48                                 int num_servers, int num_excludes);
49
50 const char *find_service(DBusConnection *connection, DBusMessage *message,
51                           char *service_name, struct service_data *service);
52 void extract_services(DBusMessage *message, char *service_name);
53 void get_services(DBusMessage *message);
54 void iterate_dict(DBusMessageIter *dict, char *string, uint16_t key_int);
55 int list_services(DBusConnection *connection, char *function);
56 int list_services_properties(DBusConnection *connection, char *function,
57                                 char *service_name);
58 int listen_for_service_signal(DBusConnection *connection, char *signal_name,
59                         char *service_name);
60 void iterate_array(DBusMessageIter *iter);
61 #endif