FpContext

FpContext — Discover fingerprint devices

Functions

Types and Values

Description

The FpContext allows you to discover fingerprint scanning hardware. This is the starting point when integrating libfprint into your software.

The device-added and device-removed signals allow you to handle devices that may be hotplugged at runtime.

Functions

fp_context_new ()

FpContext *
fp_context_new (void);

Create a new FpContext.

Returns

a newly created FpContext.

[transfer full]


fp_context_enumerate ()

void
fp_context_enumerate (FpContext *context);

Enumerate all devices. You should call this function exactly once at startup. Please note that it iterates the mainloop until all devices are enumerated.

Parameters

context

a FpContext

 

fp_context_get_devices ()

GPtrArray *
fp_context_get_devices (FpContext *context);

Get all devices. fp_context_enumerate() will be called as needed.

Parameters

context

a FpContext

 

Returns

a new GPtrArray of GUsbDevice's.

[transfer none][element-type FpDevice]

Types and Values

FP_TYPE_CONTEXT

#define FP_TYPE_CONTEXT (fp_context_get_type ())

struct FpContextClass

struct FpContextClass {
  GObjectClass parent_class;

  void         (*device_added)            (FpContext *context,
                                           FpDevice  *device);
  void         (*device_removed)          (FpContext *context,
                                           FpDevice  *device);
};

Class structure for FpContext instances.

Members

device_added ()

Called when a new device is added

 

device_removed ()

Called when a device is removed

 

FpContext

typedef struct _FpContext FpContext;