## ApertureDeviceManager

ApertureDeviceManager — Finds and monitors camera devices

## Functions

ApertureDeviceManager * | aperture_device_manager_get_instance ()
int | aperture_device_manager_get_num_cameras ()
ApertureCamera * | aperture_device_manager_next_camera ()
ApertureCamera * | aperture_device_manager_get_camera ()

## Properties

int | num-cameras | Read

## Signals

void | camera-added | Run First
void | camera-removed | Run First

## Types and Values

#define | APERTURE_TYPE_DEVICE_MANAGER
| ApertureDeviceManager

## Object Hierarchy

        GObject
        ╰── ApertureDeviceManager

## Description

ApertureDeviceManager finds and monitors camera devices that can be used in Aperture. It provides functions for listing cameras, and signals for detecting when cameras are plugged in or unplugged.

## Functions

### aperture_device_manager_get_instance ()

    ApertureDeviceManager *
    aperture_device_manager_get_instance (void);

Gets an ApertureDeviceManager.

#### Returns

an ApertureDeviceManager.

[transfer full]

Since: 0.1

### aperture_device_manager_get_num_cameras ()

    int
    aperture_device_manager_get_num_cameras
                                   (ApertureDeviceManager *self);

Gets the number of available cameras.

#### Parameters

self | an ApertureDeviceManager |

#### Returns

the number of available cameras

Since: 0.1

### aperture_device_manager_next_camera ()

    ApertureCamera *
    aperture_device_manager_next_camera (ApertureDeviceManager *self,
                                         ApertureCamera *camera);

Gets the next camera index after `camera` . If there are no cameras available, returns `NULL`.

If `camera` is `NULL`, the first camera will be returned.

#### Parameters

self | an ApertureDeviceManager |
camera | an ApertureCamera. | [nullable]

#### Returns

the next camera, or `NULL` if there are no cameras.

[transfer full]

Since: 0.1

### aperture_device_manager_get_camera ()

    ApertureCamera *
    aperture_device_manager_get_camera (ApertureDeviceManager *self,
                                        int idx);

Gets an ApertureCamera object for the given camera index.

#### Parameters

self | an ApertureDeviceManager |
idx | a camera index |

#### Returns

the ApertureCamera at `idx` .

[transfer full]

## Types and Values

### APERTURE_TYPE_DEVICE_MANAGER

    #define APERTURE_TYPE_DEVICE_MANAGER (aperture_device_manager_get_type())

### ApertureDeviceManager

    typedef struct _ApertureDeviceManager ApertureDeviceManager;

## Property Details

### The `“num-cameras”` property

      “num-cameras”              int

The number of cameras available.

Owner: ApertureDeviceManager

Flags: Read

Allowed values: >= 0

Default value: 0

## Signal Details

### The `“camera-added”` signal

    void
    user_function (ApertureDeviceManager *self,
                   ApertureCamera        *camera_index,
                   gpointer               user_data)

Emitted when a camera is discovered.

#### Parameters

self | the ApertureDeviceManager |
camera_index | the new camera |
user_data | user data set when the signal handler was connected. |

Flags: Run First

Since: 0.1

### The `“camera-removed”` signal

    void
    user_function (ApertureDeviceManager *self,
                   ApertureCamera        *camera_index,
                   gpointer               user_data)

Emitted when a camera is removed (typically because it has been unplugged).

#### Parameters

self | the ApertureDeviceManager |
camera_index | the (now removed) camera |
user_data | user data set when the signal handler was connected. |

Flags: Run First

Since: 0.1