## OGMRipEncodingManager

OGMRipEncodingManager — An encoding manager

## Synopsis

    #include <ogmrip-encoding-manager.h>

    struct              OGMRipEncodingManager;
    struct              OGMRipEncodingManagerClass;
    enum                OGMRipCleanupType;
    OGMRipEncodingManager * ogmrip_encoding_manager_new     (void);
    gint                ogmrip_encoding_manager_run         (OGMRipEncodingManager *manager,
                                                             GError **error);
    void                ogmrip_encoding_manager_cancel      (OGMRipEncodingManager *manager);
    void                ogmrip_encoding_manager_add         (OGMRipEncodingManager *manager,
                                                             OGMRipEncoding *encoding);
    void                ogmrip_encoding_manager_remove      (OGMRipEncodingManager *manager,
                                                             OGMRipEncoding *encoding);
    gboolean            ogmrip_encoding_manager_foreach     (OGMRipEncodingManager *manager,
                                                             OGMRipEncodingFunc func,
                                                             gpointer data);
    OGMRipEncoding *    ogmrip_encoding_manager_find        (OGMRipEncodingManager *manager,
                                                             OGMRipEncodingFunc func,
                                                             gpointer data);
    OGMRipEncoding *    ogmrip_encoding_manager_nth         (OGMRipEncodingManager *manager,
                                                             gint n);
    gint                ogmrip_encoding_manager_get_cleanup (OGMRipEncodingManager *manager);
    void                ogmrip_encoding_manager_set_cleanup (OGMRipEncodingManager *manager,
                                                             OGMRipCleanupType type);

## Object Hierarchy

      GObject
       +----OGMRipEncodingManager

## Description

## Details

### struct OGMRipEncodingManager

    struct OGMRipEncodingManager;

### struct OGMRipEncodingManagerClass

    struct OGMRipEncodingManagerClass {
      GObjectClass parent_class;
    };

### enum OGMRipCleanupType

    typedef enum {
      OGMRIP_CLEANUP_REMOVE_ALL,
      OGMRIP_CLEANUP_KEEP_ALL,
      OGMRIP_CLEANUP_KEEP_LAST
    } OGMRipCleanupType;

How to clean up the temporary files of the encodings.

`OGMRIP_CLEANUP_REMOVE_ALL` | Remove the temporary files of all encodings
`OGMRIP_CLEANUP_KEEP_ALL` | Keep the temporary files of all encodings
`OGMRIP_CLEANUP_KEEP_LAST` | Keep the temporary files of the last encoding only

### ogmrip_encoding_manager_new ()

    OGMRipEncodingManager * ogmrip_encoding_manager_new     (void);

Creates a new OGMRipEncodingManager.

Returns : | The new OGMRipEncodingManager

### ogmrip_encoding_manager_run ()

    gint                ogmrip_encoding_manager_run         (OGMRipEncodingManager *manager,
                                                             GError **error);

Performs all the encodings contained in `manager`.

`manager` : | An OGMRipEncodingManager
`error` : | A location to return an error of type OGMRIP_ENCODING_ERROR
Returns : | An OGMJobResultType

### ogmrip_encoding_manager_cancel ()

    void                ogmrip_encoding_manager_cancel      (OGMRipEncodingManager *manager);

Cancels all encodings.

`manager` : | An OGMRipEncodingManager

### ogmrip_encoding_manager_add ()

    void                ogmrip_encoding_manager_add         (OGMRipEncodingManager *manager,
                                                             OGMRipEncoding *encoding);

Adds `encoding` to `manager`.

`manager` : | An OGMRipEncodingManager
`encoding` : | An OGMRipEncoding

### ogmrip_encoding_manager_remove ()

    void                ogmrip_encoding_manager_remove      (OGMRipEncodingManager *manager,
                                                             OGMRipEncoding *encoding);

Removes `encoding` from `manager`.

`manager` : | An OGMRipEncodingManager
`encoding` : | An OGMRipEncoding

### ogmrip_encoding_manager_foreach ()

    gboolean            ogmrip_encoding_manager_foreach     (OGMRipEncodingManager *manager,
                                                             OGMRipEncodingFunc func,
                                                             gpointer data);

Invokes `func` on each encoding of `manager`.

`manager` : | An OGMRipEncodingManager
`func` : | A callback
`data` : | Callback user data
Returns : | `TRUE` if `func` returned TRUE for all encodings, `FALSE` otherwise

### ogmrip_encoding_manager_find ()

    OGMRipEncoding *    ogmrip_encoding_manager_find        (OGMRipEncodingManager *manager,
                                                             OGMRipEncodingFunc func,
                                                             gpointer data);

Finds the encoding of `manager` Finds the element in a GList which contains the given data.

`manager` : | An OGMRipEncodingManager
`func` : | A function to call for each encoding. It should return `TRUE` when the desired encoding is found
`data` : | User data passed to the function
Returns : | The found encoding, or NULL.

### ogmrip_encoding_manager_nth ()

    OGMRipEncoding *    ogmrip_encoding_manager_nth         (OGMRipEncodingManager *manager,
                                                             gint n);

Gets the encoding at the given position.

`manager` : | An OGMRipEncodingManager
`n` : | The position of the encoding, counting from 0
Returns : | The encoding, or NULL.

### ogmrip_encoding_manager_get_cleanup ()

    gint                ogmrip_encoding_manager_get_cleanup (OGMRipEncodingManager *manager);

Gets the cleanup method.

`manager` : | An OGMRipEncodingManager
Returns : | The cleanup type

### ogmrip_encoding_manager_set_cleanup ()

    void                ogmrip_encoding_manager_set_cleanup (OGMRipEncodingManager *manager,
                                                             OGMRipCleanupType type);

Sets the cleanup method.

`manager` : | An OGMRipEncodingManager
`type` : | The cleanup type