## IAnjutaSymbolManager IAnjutaSymbolManager — Source code symbols manager inteface |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <libanjuta/interfaces/ianjuta-symbol-manager.h>

    #define             IANJUTA_SYMBOL_MANAGER_ERROR
    struct              IAnjutaSymbolManagerIface;
    GQuark              ianjuta_symbol_manager_error_quark  (void);
    gboolean            ianjuta_symbol_manager_activate_package
                                                            (IAnjutaSymbolManager *obj,
                                                             const gchar *pkg_name,
                                                             const gchar *pkg_version,
                                                             GError **err);
    gboolean            ianjuta_symbol_manager_add_package  (IAnjutaSymbolManager *obj,
                                                             const gchar *pkg_name,
                                                             const gchar *pkg_version,
                                                             GList *files,
                                                             GError **err);
    IAnjutaSymbolQuery * ianjuta_symbol_manager_create_query
                                                            (IAnjutaSymbolManager *obj,
                                                             IAnjutaSymbolQueryName name,
                                                             IAnjutaSymbolQueryDb db,
                                                             GError **err);
    void                ianjuta_symbol_manager_deactivate_all
                                                            (IAnjutaSymbolManager *obj,
                                                             GError **err);
    void                ianjuta_symbol_manager_deactivate_package
                                                            (IAnjutaSymbolManager *obj,
                                                             const gchar *pkg_name,
                                                             const gchar *pkg_version,
                                                             GError **err);

## Description

## Details

### IANJUTA_SYMBOL_MANAGER_ERROR

    #define IANJUTA_SYMBOL_MANAGER_ERROR ianjuta_symbol_manager_error_quark()

### struct IAnjutaSymbolManagerIface

    struct IAnjutaSymbolManagerIface {
    	GTypeInterface g_iface;

    	/* Signal */
    	void (*prj_scan_end) (IAnjutaSymbolManager *obj, gint process_id);
    	/* Signal */
    	void (*sys_scan_end) (IAnjutaSymbolManager *obj, gint process_id);

    	gboolean (*activate_package) (IAnjutaSymbolManager *obj, const gchar *pkg_name,  const gchar* pkg_version, GError **err);
    	gboolean (*add_package) (IAnjutaSymbolManager *obj, const gchar* pkg_name,  const gchar* pkg_version,  GList* files, GError **err);
    	IAnjutaSymbolQuery* (*create_query) (IAnjutaSymbolManager *obj, IAnjutaSymbolQueryName name,  IAnjutaSymbolQueryDb db, GError **err);
    	void (*deactivate_all) (IAnjutaSymbolManager *obj, GError **err);
    	void (*deactivate_package) (IAnjutaSymbolManager *obj, const gchar* pkg_name,  const gchar* pkg_version, GError **err);
    };

### ianjuta_symbol_manager_error_quark ()

    GQuark              ianjuta_symbol_manager_error_quark  (void);

### ianjuta_symbol_manager_activate_package ()

    gboolean            ianjuta_symbol_manager_activate_package
                                                            (IAnjutaSymbolManager *obj,
                                                             const gchar *pkg_name,
                                                             const gchar *pkg_version,
                                                             GError **err);

Activates the package for searches in the global symbol database.

`obj` : | Self
`pkg_name` : | Name of the package to activate. The colon char must be avoided.
`pkg_version` : | Version of the package. The colon char must be avoided.
Returns : | TRUE if the package was loaded (or will be loaded once scanned). FALSE if the version given was newer than the version in the database or the package was not found. In this case, `add_package()` should be called.

### ianjuta_symbol_manager_add_package ()

    gboolean            ianjuta_symbol_manager_add_package  (IAnjutaSymbolManager *obj,
                                                             const gchar *pkg_name,
                                                             const gchar *pkg_version,
                                                             GList *files,
                                                             GError **err);

Reads the package files into the database asynchronously.

`obj` : | Self
`pkg_name` : | Name of the package to scan. Should be the name given by pkg-config. The colon char must be avoided.
`pkg_version` : | Version of the package. The colon char must be avoided. or by the language implementation (Python, Javascript, etc.)
`files` : | A list of GFile's to scan for this package
Returns : | TRUE if the package will be loaded into the db, FALSE if the package already exists

### ianjuta_symbol_manager_create_query ()

    IAnjutaSymbolQuery * ianjuta_symbol_manager_create_query
                                                            (IAnjutaSymbolManager *obj,
                                                             IAnjutaSymbolQueryName name,
                                                             IAnjutaSymbolQueryDb db,
                                                             GError **err);

Create a query object. By default only IANJUTA_SYMBOL_FIELD_ID and and IANJUTA_SYMBOL_FIELD_NAME are selected, limit is set to infinity, offset is set to 0, no filters are set and mode is set to IANJUTA_SYMBOL_QUERY_MODE_SYNC.

`obj` : | Self
`name` : | Name of the query. It decides what query type it is.
`db` : | The database to use.
`err` : | Error propagation and reporting.
Returns : | A IAnjutaSymbolQuery object

### ianjuta_symbol_manager_deactivate_all ()

    void                ianjuta_symbol_manager_deactivate_all
                                                            (IAnjutaSymbolManager *obj,
                                                             GError **err);

Deactivates all activate packages

`obj` : | Self

### ianjuta_symbol_manager_deactivate_package ()

    void                ianjuta_symbol_manager_deactivate_package
                                                            (IAnjutaSymbolManager *obj,
                                                             const gchar *pkg_name,
                                                             const gchar *pkg_version,
                                                             GError **err);

Deactivates the package if it was found. If package is NULL, deactivate all packages.

`obj` : | Self
`pkg_name` : | name of the package. The colon char must be avoided.
`pkg_version` : | Version of the package. The colon char must be avoided.

## See Also

IAnjutaSymbol