Blame bus/server.h

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