|
Packit Service |
fc05fa |
/*
|
|
Packit Service |
fc05fa |
*
|
|
Packit Service |
fc05fa |
* BlueZ - Bluetooth protocol stack for Linux
|
|
Packit Service |
fc05fa |
*
|
|
Packit Service |
fc05fa |
* Copyright (C) 2005-2008 Marcel Holtmann <marcel@holtmann.org>
|
|
Packit Service |
fc05fa |
*
|
|
Packit Service |
fc05fa |
*
|
|
Packit Service |
fc05fa |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
fc05fa |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
fc05fa |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
fc05fa |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
fc05fa |
*
|
|
Packit Service |
fc05fa |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
fc05fa |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
fc05fa |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
fc05fa |
* Lesser General Public License for more details.
|
|
Packit Service |
fc05fa |
*
|
|
Packit Service |
fc05fa |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
fc05fa |
* License along with this library; if not, write to the Free Software
|
|
Packit Service |
fc05fa |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
Packit Service |
fc05fa |
*
|
|
Packit Service |
fc05fa |
*/
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
#ifndef __BLUETOOTH_AGENT_H
|
|
Packit Service |
fc05fa |
#define __BLUETOOTH_AGENT_H
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
#include <glib-object.h>
|
|
Packit Service |
fc05fa |
#include <gio/gio.h>
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
G_BEGIN_DECLS
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
#define BLUETOOTH_TYPE_AGENT (bluetooth_agent_get_type())
|
|
Packit Service |
fc05fa |
#define BLUETOOTH_AGENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
|
Packit Service |
fc05fa |
BLUETOOTH_TYPE_AGENT, BluetoothAgent))
|
|
Packit Service |
fc05fa |
#define BLUETOOTH_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
|
|
Packit Service |
fc05fa |
BLUETOOTH_TYPE_AGENT, BluetoothAgentClass))
|
|
Packit Service |
fc05fa |
#define BLUETOOTH_IS_AGENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
|
|
Packit Service |
fc05fa |
BLUETOOTH_TYPE_AGENT))
|
|
Packit Service |
fc05fa |
#define BLUETOOTH_IS_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \
|
|
Packit Service |
fc05fa |
BLUETOOTH_TYPE_AGENT))
|
|
Packit Service |
fc05fa |
#define BLUETOOTH_GET_AGENT_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \
|
|
Packit Service |
fc05fa |
BLUETOOTH_TYPE_AGENT, BluetoothAgentClass))
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
typedef struct _BluetoothAgent BluetoothAgent;
|
|
Packit Service |
fc05fa |
typedef struct _BluetoothAgentClass BluetoothAgentClass;
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
struct _BluetoothAgent {
|
|
Packit Service |
fc05fa |
GObject parent;
|
|
Packit Service |
fc05fa |
};
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
struct _BluetoothAgentClass {
|
|
Packit Service |
fc05fa |
GObjectClass parent_class;
|
|
Packit Service |
fc05fa |
};
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
GType bluetooth_agent_get_type(void);
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
BluetoothAgent *bluetooth_agent_new(const char *path);
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
gboolean bluetooth_agent_setup(BluetoothAgent *agent, const char *path);
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
gboolean bluetooth_agent_register(BluetoothAgent *agent);
|
|
Packit Service |
fc05fa |
gboolean bluetooth_agent_unregister(BluetoothAgent *agent);
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
typedef void (*BluetoothAgentPasskeyFunc) (GDBusMethodInvocation *invocation,
|
|
Packit Service |
fc05fa |
GDBusProxy *device,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
typedef void (*BluetoothAgentDisplayFunc) (GDBusMethodInvocation *invocation,
|
|
Packit Service |
fc05fa |
GDBusProxy *device,
|
|
Packit Service |
fc05fa |
guint passkey,
|
|
Packit Service |
fc05fa |
guint entered,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
typedef void (*BluetoothAgentDisplayPinCodeFunc) (GDBusMethodInvocation *invocation,
|
|
Packit Service |
fc05fa |
GDBusProxy *device,
|
|
Packit Service |
fc05fa |
const char *pincode,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
typedef void (*BluetoothAgentConfirmFunc) (GDBusMethodInvocation *invocation,
|
|
Packit Service |
fc05fa |
GDBusProxy *device,
|
|
Packit Service |
fc05fa |
guint passkey,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
typedef void (*BluetoothAgentAuthorizeFunc) (GDBusMethodInvocation *invocation,
|
|
Packit Service |
fc05fa |
GDBusProxy *device,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
typedef void (*BluetoothAgentAuthorizeServiceFunc) (GDBusMethodInvocation *invocation,
|
|
Packit Service |
fc05fa |
GDBusProxy *device,
|
|
Packit Service |
fc05fa |
const char *uuid,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
typedef gboolean (*BluetoothAgentCancelFunc) (GDBusMethodInvocation *invocation,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
void bluetooth_agent_set_pincode_func (BluetoothAgent *agent,
|
|
Packit Service |
fc05fa |
BluetoothAgentPasskeyFunc func,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
void bluetooth_agent_set_passkey_func (BluetoothAgent *agent,
|
|
Packit Service |
fc05fa |
BluetoothAgentPasskeyFunc func,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
void bluetooth_agent_set_display_func (BluetoothAgent *agent,
|
|
Packit Service |
fc05fa |
BluetoothAgentDisplayFunc func,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
void bluetooth_agent_set_display_pincode_func (BluetoothAgent *agent,
|
|
Packit Service |
fc05fa |
BluetoothAgentDisplayPinCodeFunc func,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
void bluetooth_agent_set_confirm_func (BluetoothAgent *agent,
|
|
Packit Service |
fc05fa |
BluetoothAgentConfirmFunc func,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
void bluetooth_agent_set_authorize_func (BluetoothAgent *agent,
|
|
Packit Service |
fc05fa |
BluetoothAgentAuthorizeFunc func,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
void bluetooth_agent_set_authorize_service_func (BluetoothAgent *agent,
|
|
Packit Service |
fc05fa |
BluetoothAgentAuthorizeServiceFunc func,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
void bluetooth_agent_set_cancel_func (BluetoothAgent *agent,
|
|
Packit Service |
fc05fa |
BluetoothAgentCancelFunc func,
|
|
Packit Service |
fc05fa |
gpointer data);
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
#define AGENT_ERROR (bluetooth_agent_error_quark())
|
|
Packit Service |
fc05fa |
#define AGENT_ERROR_TYPE (bluetooth_agent_error_get_type())
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
typedef enum {
|
|
Packit Service |
fc05fa |
AGENT_ERROR_REJECT
|
|
Packit Service |
fc05fa |
} AgentError;
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
GType bluetooth_agent_error_get_type (void);
|
|
Packit Service |
fc05fa |
GQuark bluetooth_agent_error_quark (void);
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
G_END_DECLS
|
|
Packit Service |
fc05fa |
|
|
Packit Service |
fc05fa |
#endif /* __BLUETOOTH_AGENT_H */
|