## IAnjutaVcs IAnjutaVcs — Version control system interface |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <libanjuta/interfaces/ianjuta-vcs.h>

    #define             IANJUTA_TYPE_VCS_ERROR
    #define             IANJUTA_VCS_ERROR
                        IAnjutaVcs;
                        IAnjutaVcsIface;
    enum                IAnjutaVcsError;
    void                (*IAnjutaVcsStatusCallback)         (GFile *file,
                                                             AnjutaVcsStatus status,
                                                             gpointer user_data);
    void                (*IAnjutaVcsDiffCallback)           (GFile *file,
                                                             const gchar *diff,
                                                             gpointer user_data);
    GQuark              ianjuta_vcs_error_quark             (void);
    GType               ianjuta_vcs_get_type                (void);
    void                ianjuta_vcs_add                     (IAnjutaVcs *obj,
                                                             GList *files,
                                                             AnjutaAsyncNotify *notify,
                                                             GError **err);
    void                ianjuta_vcs_checkout                (IAnjutaVcs *obj,
                                                             const gchar *repository_location,
                                                             GFile *dest,
                                                             GCancellable *cancel,
                                                             AnjutaAsyncNotify *notify,
                                                             GError **err);
    void                ianjuta_vcs_diff                    (IAnjutaVcs *obj,
                                                             GFile *file,
                                                             IAnjutaVcsDiffCallback callback,
                                                             gpointer user_data,
                                                             GCancellable *cancel,
                                                             AnjutaAsyncNotify *notify,
                                                             GError **err);
    void                ianjuta_vcs_query_status            (IAnjutaVcs *obj,
                                                             GFile *file,
                                                             IAnjutaVcsStatusCallback callback,
                                                             gpointer user_data,
                                                             GCancellable *cancel,
                                                             AnjutaAsyncNotify *notify,
                                                             GError **err);
    void                ianjuta_vcs_remove                  (IAnjutaVcs *obj,
                                                             GList *files,
                                                             AnjutaAsyncNotify *notify,
                                                             GError **err);

## Object Hierarchy

      GInterface
       +----IAnjutaVcs

## Prerequisites

IAnjutaVcs requires GObject.

## Description

## Details

### IANJUTA_TYPE_VCS_ERROR

    #define IANJUTA_TYPE_VCS_ERROR (ianjuta_vcs_error_get_type())

### IANJUTA_VCS_ERROR

    #define IANJUTA_VCS_ERROR ianjuta_vcs_error_quark()

### IAnjutaVcs

    typedef struct _IAnjutaVcs IAnjutaVcs;

### IAnjutaVcsIface

    typedef struct {
    	GTypeInterface g_iface;

    	void (*add) (IAnjutaVcs *obj, GList* files,  AnjutaAsyncNotify *notify, GError **err);
    	void (*checkout) (IAnjutaVcs *obj, const gchar *repository_location,  GFile *dest,  GCancellable *cancel,  AnjutaAsyncNotify *notify, GError **err);
    	void (*diff) (IAnjutaVcs *obj, GFile* file,  IAnjutaVcsDiffCallback callback,  gpointer user_data,  GCancellable* cancel,  AnjutaAsyncNotify *notify, GError **err);
    	void (*query_status) (IAnjutaVcs *obj, GFile* file,  IAnjutaVcsStatusCallback callback,  gpointer user_data,  GCancellable* cancel,  AnjutaAsyncNotify *notify, GError **err);
    	void (*remove) (IAnjutaVcs *obj, GList* files,  AnjutaAsyncNotify *notify, GError **err);
    } IAnjutaVcsIface;

### enum IAnjutaVcsError

    typedef enum {
    	IANJUTA_VCS_UNKOWN_ERROR
    } IAnjutaVcsError;

These enumeration is used to specify errors.

### IAnjutaVcsStatusCallback ()

    void                (*IAnjutaVcsStatusCallback)         (GFile *file,
                                                             AnjutaVcsStatus status,
                                                             gpointer user_data);

`file` : |
`status` : |
`user_data` : |

### IAnjutaVcsDiffCallback ()

    void                (*IAnjutaVcsDiffCallback)           (GFile *file,
                                                             const gchar *diff,
                                                             gpointer user_data);

`file` : |
`diff` : |
`user_data` : |

### ianjuta_vcs_error_quark ()

    GQuark              ianjuta_vcs_error_quark             (void);

Returns : |

### ianjuta_vcs_get_type ()

    GType               ianjuta_vcs_get_type                (void);

Returns : |

### ianjuta_vcs_add ()

    void                ianjuta_vcs_add                     (IAnjutaVcs *obj,
                                                             GList *files,
                                                             AnjutaAsyncNotify *notify,
                                                             GError **err);

Add files to the VCS repository.

`obj` : | Self
`files` : | List of List of files, represented as Gfile objects, to add
`notify` : | AnjutaAsyncNotify object for finish notification and error reporting.
`err` : |

### ianjuta_vcs_checkout ()

    void                ianjuta_vcs_checkout                (IAnjutaVcs *obj,
                                                             const gchar *repository_location,
                                                             GFile *dest,
                                                             GCancellable *cancel,
                                                             AnjutaAsyncNotify *notify,
                                                             GError **err);

Check out a copy of a code repository.

`obj` : | Self
`repository_location` : | Location of repository to check out
`dest` : | Destination of checked out copy
`cancel` : | An optional GCancellable object to cancel the operation, or NULL
`notify` : | AnjutaAsyncNotify object for finish notification and error reporting.
`err` : |

### ianjuta_vcs_diff ()

    void                ianjuta_vcs_diff                    (IAnjutaVcs *obj,
                                                             GFile *file,
                                                             IAnjutaVcsDiffCallback callback,
                                                             gpointer user_data,
                                                             GCancellable *cancel,
                                                             AnjutaAsyncNotify *notify,
                                                             GError **err);

Generates a unified diff of the file represented by `file`.

`obj` : | Self
`file` : | File to diff
`callback` : | Callback to call when diff data becomes available
`user_data` : | User data passed to `callback`
`cancel` : | An optional GCancellable object to cancel the operation, or NULL
`notify` : | AnjutaAsyncNotify object for finish notification and error reporting.
`err` : |

### ianjuta_vcs_query_status ()

    void                ianjuta_vcs_query_status            (IAnjutaVcs *obj,
                                                             GFile *file,
                                                             IAnjutaVcsStatusCallback callback,
                                                             gpointer user_data,
                                                             GCancellable *cancel,
                                                             AnjutaAsyncNotify *notify,
                                                             GError **err);

Querys the status of files in the repository.

`obj` : | Self
`file` : | File/directory to query
`callback` : | callback to call when data for a particular file is available
`user_data` : | User data passed to callback
`cancel` : | An optional GCancellable object to cancel the operation, or NULL
`notify` : | AnjutaAsyncNotify object for finish notification and error reporting.
`err` : |

### ianjuta_vcs_remove ()

    void                ianjuta_vcs_remove                  (IAnjutaVcs *obj,
                                                             GList *files,
                                                             AnjutaAsyncNotify *notify,
                                                             GError **err);

Remove files from the VCS repository.

`obj` : | Self
`files` : | List of files, represented as Gfile objects, to remove
`notify` : | AnjutaAsyncNotify object for finish notification and error reporting.
`err` : |