|
Packit |
3ff832 |
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
|
|
Packit |
3ff832 |
/* vim:set et sts=4: */
|
|
Packit |
3ff832 |
/* bus - The Input Bus
|
|
Packit |
3ff832 |
* Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com>
|
|
Packit |
3ff832 |
* Copyright (C) 2008-2010 Red Hat, Inc.
|
|
Packit |
3ff832 |
*
|
|
Packit |
3ff832 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
3ff832 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
3ff832 |
* License as published by the Free Software Foundation; either
|
|
Packit |
3ff832 |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
3ff832 |
*
|
|
Packit |
3ff832 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
3ff832 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
3ff832 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
3ff832 |
* Lesser General Public License for more details.
|
|
Packit |
3ff832 |
*
|
|
Packit |
3ff832 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
3ff832 |
* License along with this library; if not, write to the Free Software
|
|
Packit |
3ff832 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
|
Packit |
3ff832 |
* USA
|
|
Packit |
3ff832 |
*/
|
|
Packit |
3ff832 |
#ifndef __BUS_SERVER_H_
|
|
Packit |
3ff832 |
#define __BUS_SERVER_H_
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
#include <ibus.h>
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
G_BEGIN_DECLS
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
/**
|
|
Packit |
3ff832 |
* bus_server_init:
|
|
Packit |
3ff832 |
*
|
|
Packit |
3ff832 |
* Initialize GDBus server and write the server address to a file, which is (usually) in ~/.config/ibus/bus/.
|
|
Packit |
3ff832 |
* Note that the function does not call g_main_loop_run.
|
|
Packit |
3ff832 |
*/
|
|
Packit |
3ff832 |
void bus_server_init (void);
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
/**
|
|
Packit |
3ff832 |
* bus_server_run:
|
|
Packit |
3ff832 |
*
|
|
Packit |
3ff832 |
* Enter the glib main loop. You have to call bus_server_init before calling this function.
|
|
Packit |
3ff832 |
*/
|
|
Packit |
3ff832 |
void bus_server_run (void);
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
/**
|
|
Packit |
3ff832 |
* bus_server_quit:
|
|
Packit |
3ff832 |
* @restart: TRUE if ibus-daemon restarts.
|
|
Packit |
3ff832 |
*
|
|
Packit |
3ff832 |
* Quit the glib main loop.
|
|
Packit |
3ff832 |
*/
|
|
Packit |
3ff832 |
void bus_server_quit (gboolean restart);
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
/**
|
|
Packit |
3ff832 |
* bus_server_get_address:
|
|
Packit |
3ff832 |
* @returns: The server address, e.g. "unix:abstract=/tmp/dbus-aEUnr11L,guid=8b343aaa69eabb9b282dce6f4cdbb4aa"
|
|
Packit |
3ff832 |
*
|
|
Packit |
3ff832 |
* Get the server address. This function might return NULL if it is called before initializing the server by
|
|
Packit |
3ff832 |
* calling bus_server_init.
|
|
Packit |
3ff832 |
*/
|
|
Packit |
3ff832 |
const gchar *bus_server_get_address (void);
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
G_END_DECLS
|
|
Packit |
3ff832 |
#endif
|