blob: fc560b98690f30e94afb81205b9e9e252161e172 [file] [log] [blame]
David Sodmanbbcb0522014-09-19 10:34:07 -07001/*
David Sodman8ef20062015-01-06 09:23:40 -08002 * Copyright 2014 The Chromium OS Authors. All rights reserved.
David Sodmanbbcb0522014-09-19 10:34:07 -07003 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
David Sodman8ef20062015-01-06 09:23:40 -08007#ifndef FRECON_DBUS_H
8#define FRECON_DBUS_H
David Sodmanbbcb0522014-09-19 10:34:07 -07009
David Sodman8ef20062015-01-06 09:23:40 -080010#include <sys/select.h>
David Sodmanbbcb0522014-09-19 10:34:07 -070011#include <dbus/dbus.h>
12#include <stdbool.h>
13#include <memory.h>
14#include <stdio.h>
15
David Sodman3430aae2014-11-10 08:15:01 -080016#define DBUS_STATUS_NOERROR (0)
17#define DBUS_STATUS_TIMEOUT (-1)
18
Dominik Behr797a3832016-01-11 15:53:11 -080019bool dbus_init();
20void dbus_destroy(void);
Dominik Behrd7112672016-01-20 16:59:34 -080021void dbus_add_fds(fd_set* read_set, fd_set* exception_set, int *maxfd);
Dominik Behr797a3832016-01-11 15:53:11 -080022void dbus_dispatch_io(void);
23void dbus_report_user_activity(int activity_type);
24void dbus_take_display_ownership(void);
25void dbus_release_display_ownership(void);
26bool dbus_is_initialized(void);
David Sodmanbbcb0522014-09-19 10:34:07 -070027
28
David Sodman8ef20062015-01-06 09:23:40 -080029#endif // FRECON_DBUS_H