Blame src/fprintd.h

Packit Service f1aff6
/*
Packit Service f1aff6
 * fprintd header file
Packit Service f1aff6
 * Copyright (C) 2008 Daniel Drake <dsd@gentoo.org>
Packit Service f1aff6
 *
Packit Service f1aff6
 * This program is free software; you can redistribute it and/or modify
Packit Service f1aff6
 * it under the terms of the GNU General Public License as published by
Packit Service f1aff6
 * the Free Software Foundation; either version 2 of the License, or
Packit Service f1aff6
 * (at your option) any later version.
Packit Service f1aff6
 * 
Packit Service f1aff6
 * This program is distributed in the hope that it will be useful,
Packit Service f1aff6
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service f1aff6
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service f1aff6
 * GNU General Public License for more details.
Packit Service f1aff6
 * 
Packit Service f1aff6
 * You should have received a copy of the GNU General Public License along
Packit Service f1aff6
 * with this program; if not, write to the Free Software Foundation, Inc.,
Packit Service f1aff6
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Packit Service f1aff6
 */
Packit Service f1aff6
Packit Service f1aff6
#ifndef __FPRINTD_H__
Packit Service f1aff6
#define __FPRINTD_H__
Packit Service f1aff6
Packit Service f1aff6
#include <glib.h>
Packit Service f1aff6
#include <dbus/dbus-glib.h>
Packit Service f1aff6
#include "fprint.h"
Packit Service f1aff6
Packit Service f1aff6
/* General */
Packit Service f1aff6
#define TIMEOUT 30
Packit Service f1aff6
#define FPRINT_SERVICE_NAME "net.reactivated.Fprint"
Packit Service f1aff6
extern DBusGConnection *fprintd_dbus_conn;
Packit Service f1aff6
Packit Service f1aff6
/* Errors */
Packit Service f1aff6
GQuark fprint_error_quark(void);
Packit Service f1aff6
GType fprint_error_get_type(void);
Packit Service f1aff6
Packit Service f1aff6
#define FPRINT_ERROR fprint_error_quark()
Packit Service f1aff6
#define FPRINT_TYPE_ERROR fprint_error_get_type()
Packit Service f1aff6
#define FPRINT_ERROR_DBUS_INTERFACE "net.reactivated.Fprint.Error"
Packit Service f1aff6
typedef enum {
Packit Service f1aff6
	FPRINT_ERROR_CLAIM_DEVICE, /* developer didn't claim the device */
Packit Service f1aff6
	FPRINT_ERROR_ALREADY_IN_USE, /* device is already claimed by somebody else */
Packit Service f1aff6
	FPRINT_ERROR_INTERNAL, /* internal error occured */
Packit Service f1aff6
	FPRINT_ERROR_PERMISSION_DENIED, /* PolicyKit refused the action */
Packit Service f1aff6
	FPRINT_ERROR_NO_ENROLLED_PRINTS, /* No prints are enrolled */
Packit Service f1aff6
	FPRINT_ERROR_NO_ACTION_IN_PROGRESS, /* No actions currently in progress */
Packit Service f1aff6
	FPRINT_ERROR_INVALID_FINGERNAME, /* the finger name passed was invalid */
Packit Service f1aff6
	FPRINT_ERROR_NO_SUCH_DEVICE, /* device does not exist */
Packit Service f1aff6
} FprintError;
Packit Service f1aff6
Packit Service f1aff6
/* Manager */
Packit Service f1aff6
#define FPRINT_TYPE_MANAGER            (fprint_manager_get_type())
Packit Service f1aff6
#define FPRINT_MANAGER(object)         (G_TYPE_CHECK_INSTANCE_CAST((object), FPRINT_TYPE_MANAGER, FprintManager))
Packit Service f1aff6
#define FPRINT_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), FPRINT_TYPE_MANAGER, FprintManagerClass))
Packit Service f1aff6
#define FPRINT_IS_MANAGER(object)      (G_TYPE_CHECK_INSTANCE_TYPE((object), FPRINT_TYPE_MANAGER))
Packit Service f1aff6
#define FPRINT_IS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FPRINT_TYPE_MANAGER))
Packit Service f1aff6
#define FPRINT_MANAGER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), FPRINT_TYPE_MANAGER, FprintManagerClass))
Packit Service f1aff6
Packit Service f1aff6
struct FprintManager {
Packit Service f1aff6
	GObject parent;
Packit Service f1aff6
};
Packit Service f1aff6
Packit Service f1aff6
struct FprintManagerClass {
Packit Service f1aff6
	GObjectClass parent;
Packit Service f1aff6
};
Packit Service f1aff6
Packit Service f1aff6
typedef struct FprintManager FprintManager;
Packit Service f1aff6
typedef struct FprintManagerClass FprintManagerClass;
Packit Service f1aff6
Packit Service f1aff6
FprintManager *fprint_manager_new(gboolean no_timeout);
Packit Service f1aff6
GType fprint_manager_get_type(void);
Packit Service f1aff6
Packit Service f1aff6
/* Device */
Packit Service f1aff6
#define FPRINT_TYPE_DEVICE            (fprint_device_get_type())
Packit Service f1aff6
#define FPRINT_DEVICE(object)         (G_TYPE_CHECK_INSTANCE_CAST((object), FPRINT_DEVICE_TYPE, FprintDevice))
Packit Service f1aff6
#define FPRINT_DEVICE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), FPRINT_DEVICE_TYPE, FprintDeviceClass))
Packit Service f1aff6
#define FPRINT_IS_DEVICE(object)      (G_TYPE_CHECK_INSTANCE_TYPE((object), FPRINT_TYPE_DEVICE))
Packit Service f1aff6
#define FPRINT_IS_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FPRINT_TYPE_DEVICE))
Packit Service f1aff6
#define FPRINT_DEVICE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), FPRINT_TYPE_DEVICE, FprintDeviceClass))
Packit Service f1aff6
Packit Service f1aff6
struct FprintDevice {
Packit Service f1aff6
	GObject parent;
Packit Service f1aff6
};
Packit Service f1aff6
Packit Service f1aff6
struct FprintDeviceClass {
Packit Service f1aff6
	GObjectClass parent;
Packit Service f1aff6
};
Packit Service f1aff6
Packit Service f1aff6
typedef struct FprintDevice FprintDevice;
Packit Service f1aff6
typedef struct FprintDeviceClass FprintDeviceClass;
Packit Service f1aff6
Packit Service f1aff6
FprintDevice *fprint_device_new(FpDevice *dev);
Packit Service f1aff6
GType fprint_device_get_type(void);
Packit Service f1aff6
guint32 _fprint_device_get_id(FprintDevice *rdev);
Packit Service f1aff6
/* Print */
Packit Service f1aff6
/* TODO */
Packit Service f1aff6
Packit Service f1aff6
/* Binding data included in main.c thorugh server-bindings.h which individual
Packit Service f1aff6
 * class implementations need to access.
Packit Service f1aff6
 */
Packit Service f1aff6
extern const DBusGObjectInfo dbus_glib_fprint_manager_object_info;
Packit Service f1aff6
extern const DBusGObjectInfo dbus_glib_fprint_device_object_info;
Packit Service f1aff6
Packit Service f1aff6
#endif
Packit Service f1aff6