## ZifMd ZifMd — Metadata base class |

## Synopsis

    #define             ZIF_MD_ERROR
    struct              ZifMd;
    struct              ZifMdClass;
    enum                ZifMdError;
    enum                ZifMdKind;
    gboolean            zif_md_check_compressed             (ZifMd *md,
                                                             ZifState *state,
                                                             GError **error);
    gboolean            zif_md_check_uncompressed           (ZifMd *md,
                                                             ZifState *state,
                                                             GError **error);
    gboolean            zif_md_clean                        (ZifMd *md,
                                                             GError **error);
    GQuark              zif_md_error_quark                  (void);
    gboolean            zif_md_file_check                   (ZifMd *md,
                                                             gboolean use_uncompressed,
                                                             gboolean *valid,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_find_package                 (ZifMd *md,
                                                             const gchar *package_id,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_get_changelog                (ZifMd *md,
                                                             const gchar *pkgid,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_get_conflicts                (ZifMd *md,
                                                             ZifPackage *package,
                                                             ZifState *state,
                                                             GError **error);
    const gchar *       zif_md_get_filename                 (ZifMd *md);
    const gchar *       zif_md_get_filename_uncompressed    (ZifMd *md);
    GPtrArray *         zif_md_get_files                    (ZifMd *md,
                                                             ZifPackage *package,
                                                             ZifState *state,
                                                             GError **error);
    const gchar *       zif_md_get_id                       (ZifMd *md);
    gboolean            zif_md_get_is_loaded                (ZifMd *md);
    ZifMdKind           zif_md_get_kind                     (ZifMd *md);
    const gchar *       zif_md_get_location                 (ZifMd *md);
    GPtrArray *         zif_md_get_obsoletes                (ZifMd *md,
                                                             ZifPackage *package,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_get_packages                 (ZifMd *md,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_get_provides                 (ZifMd *md,
                                                             ZifPackage *package,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_get_requires                 (ZifMd *md,
                                                             ZifPackage *package,
                                                             ZifState *state,
                                                             GError **error);
    ZifStore *          zif_md_get_store                    (ZifMd *md);
    const gchar *       zif_md_kind_to_text                 (ZifMdKind type);
    gboolean            zif_md_load                         (ZifMd *md,
                                                             ZifState *state,
                                                             GError **error);
    ZifMd *             zif_md_new                          (void);
    GPtrArray *         zif_md_resolve                      (ZifMd *md,
                                                             gchar **search,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_resolve_full                 (ZifMd *md,
                                                             gchar **search,
                                                             ZifStoreResolveFlags flags,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_search_details               (ZifMd *md,
                                                             gchar **search,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_search_file                  (ZifMd *md,
                                                             gchar **search,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_search_group                 (ZifMd *md,
                                                             gchar **search,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_search_name                  (ZifMd *md,
                                                             gchar **search,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_search_pkgid                 (ZifMd *md,
                                                             gchar **search,
                                                             ZifState *state,
                                                             GError **error);
    void                zif_md_set_checksum                 (ZifMd *md,
                                                             const gchar *checksum);
    void                zif_md_set_checksum_type            (ZifMd *md,
                                                             GChecksumType checksum_type);
    void                zif_md_set_checksum_uncompressed    (ZifMd *md,
                                                             const gchar *checksum_uncompressed);
    void                zif_md_set_filename                 (ZifMd *md,
                                                             const gchar *filename);
    void                zif_md_set_id                       (ZifMd *md,
                                                             const gchar *id);
    void                zif_md_set_location                 (ZifMd *md,
                                                             const gchar *location);
    void                zif_md_set_max_age                  (ZifMd *md,
                                                             guint64 max_age);
    void                zif_md_set_store                    (ZifMd *md,
                                                             ZifStore *remote);
    void                zif_md_set_timestamp                (ZifMd *md,
                                                             guint timestamp);
    gboolean            zif_md_unload                       (ZifMd *md,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_what_conflicts               (ZifMd *md,
                                                             GPtrArray *depends,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_what_obsoletes               (ZifMd *md,
                                                             GPtrArray *depends,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_what_provides                (ZifMd *md,
                                                             GPtrArray *depends,
                                                             ZifState *state,
                                                             GError **error);
    GPtrArray *         zif_md_what_requires                (ZifMd *md,
                                                             GPtrArray *depends,
                                                             ZifState *state,
                                                             GError **error);

## Object Hierarchy

      GObject
       +----ZifMd
             +----ZifMdComps
             +----ZifMdDelta
             +----ZifMdFilelistsSql
             +----ZifMdFilelistsXml
             +----ZifMdMetalink
             +----ZifMdMirrorlist
             +----ZifMdOtherSql
             +----ZifMdPrimarySql
             +----ZifMdPrimaryXml
             +----ZifMdUpdateinfo

## Properties

      "filename"                 gchar*                : Read / Write
      "kind"                     guint                 : Read / Write / Construct
      "location"                 gchar*                : Read / Write

## Description

This provides an abstract metadata class. It is implemented by ZifMdFilelistsSql, ZifMdFilelistsXml, ZifMdPrimaryXml, ZifMdPrimarySql and many others.

## Details

### ZIF_MD_ERROR

    #define ZIF_MD_ERROR		(zif_md_error_quark ())

### struct ZifMd

    struct ZifMd;

### struct ZifMdClass

    struct ZifMdClass {
    	GObjectClass				 parent_class;
    	/* vtable */
    	gboolean	 (*load)		(ZifMd			*md,
    						 ZifState		*state,
    						 GError			**error);
    	gboolean	 (*unload)		(ZifMd			*md,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*search_file)		(ZifMd			*md,
    						 gchar			**search,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*search_name)		(ZifMd			*md,
    						 gchar			**search,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*search_details) (ZifMd			*md,
    						 gchar			**search,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*search_group) (ZifMd			*md,
    						 gchar			**search,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*search_pkgid) (ZifMd			*md,
    						 gchar			**search,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*what_provides) (ZifMd			*md,
    						 GPtrArray		*depends,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*what_requires) (ZifMd			*md,
    						 GPtrArray		*depends,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*what_obsoletes) (ZifMd			*md,
    						 GPtrArray		*depends,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*what_conflicts) (ZifMd			*md,
    						 GPtrArray		*depends,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*resolve)		(ZifMd			*md,
    						 gchar			**search,
    						 ZifStoreResolveFlags	 flags,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*get_packages) (ZifMd			*md,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*find_package) (ZifMd			*md,
    						 const gchar		*package_id,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*get_changelog) (ZifMd			*md,
    						 const gchar		*pkgid,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*get_files)		(ZifMd			*md,
    						 ZifPackage		*package,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*get_provides) (ZifMd			*md,
    						 ZifPackage		*package,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*get_requires) (ZifMd			*md,
    						 ZifPackage		*package,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*get_obsoletes) (ZifMd			*md,
    						 ZifPackage		*package,
    						 ZifState		*state,
    						 GError			**error);
    	GPtrArray *(*get_conflicts) (ZifMd			*md,
    						 ZifPackage		*package,
    						 ZifState		*state,
    						 GError			**error);
    	/* Padding for future expansion */
    	void (*_zif_reserved1) (void);
    	void (*_zif_reserved2) (void);
    	void (*_zif_reserved3) (void);
    	void (*_zif_reserved4) (void);
    };

### enum ZifMdError

    typedef enum {
    	ZIF_MD_ERROR_FAILED,
    	ZIF_MD_ERROR_NO_SUPPORT,
    	ZIF_MD_ERROR_FAILED_TO_LOAD,
    	ZIF_MD_ERROR_FAILED_AS_OFFLINE,
    	ZIF_MD_ERROR_FAILED_DOWNLOAD,
    	ZIF_MD_ERROR_BAD_SQL,
    	ZIF_MD_ERROR_FILE_TOO_OLD,
    	ZIF_MD_ERROR_NO_FILENAME,
    	ZIF_MD_ERROR_FILE_NOT_EXISTS,
    	ZIF_MD_ERROR_CHECKSUM_INVALID,
    	ZIF_MD_ERROR_LAST
    } ZifMdError;

`ZIF_MD_ERROR_FAILED` |
`ZIF_MD_ERROR_NO_SUPPORT` |
`ZIF_MD_ERROR_FAILED_TO_LOAD` |
`ZIF_MD_ERROR_FAILED_AS_OFFLINE` |
`ZIF_MD_ERROR_FAILED_DOWNLOAD` |
`ZIF_MD_ERROR_BAD_SQL` |
`ZIF_MD_ERROR_FILE_TOO_OLD` |
`ZIF_MD_ERROR_NO_FILENAME` |
`ZIF_MD_ERROR_FILE_NOT_EXISTS` |
`ZIF_MD_ERROR_CHECKSUM_INVALID` |
`ZIF_MD_ERROR_LAST` |

### enum ZifMdKind

    typedef enum {
    	ZIF_MD_KIND_UNKNOWN,
    	ZIF_MD_KIND_PRIMARY_SQL,
    	ZIF_MD_KIND_PRIMARY_XML,
    	ZIF_MD_KIND_FILELISTS_SQL,
    	ZIF_MD_KIND_FILELISTS_XML,
    	ZIF_MD_KIND_OTHER_SQL,
    	ZIF_MD_KIND_OTHER_XML,
    	ZIF_MD_KIND_COMPS_GZ,
    	ZIF_MD_KIND_COMPS,
    	ZIF_MD_KIND_METALINK,
    	ZIF_MD_KIND_MIRRORLIST,
    	ZIF_MD_KIND_PRESTODELTA,
    	ZIF_MD_KIND_UPDATEINFO,
    	ZIF_MD_KIND_PKGTAGS,
    	ZIF_MD_KIND_LAST
    } ZifMdKind;

`ZIF_MD_KIND_UNKNOWN` |
`ZIF_MD_KIND_PRIMARY_SQL` |
`ZIF_MD_KIND_PRIMARY_XML` |
`ZIF_MD_KIND_FILELISTS_SQL` |
`ZIF_MD_KIND_FILELISTS_XML` |
`ZIF_MD_KIND_OTHER_SQL` |
`ZIF_MD_KIND_OTHER_XML` |
`ZIF_MD_KIND_COMPS_GZ` |
`ZIF_MD_KIND_COMPS` |
`ZIF_MD_KIND_METALINK` |
`ZIF_MD_KIND_MIRRORLIST` |
`ZIF_MD_KIND_PRESTODELTA` |
`ZIF_MD_KIND_UPDATEINFO` |
`ZIF_MD_KIND_PKGTAGS` |
`ZIF_MD_KIND_LAST` |

### zif_md_check_compressed ()

    gboolean            zif_md_check_compressed             (ZifMd *md,
                                                             ZifState *state,
                                                             GError **error);

Check the metadata files to make sure they are valid.

`md` : | A ZifMd
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | `TRUE` if the MD file was read and checked.

Since 0.2.2

### zif_md_check_uncompressed ()

    gboolean            zif_md_check_uncompressed           (ZifMd *md,
                                                             ZifState *state,
                                                             GError **error);

Check the metadata files to make sure they are valid.

`md` : | A ZifMd
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | `TRUE` if the MD file was read and checked.

Since 0.2.2

### zif_md_clean ()

    gboolean            zif_md_clean                        (ZifMd *md,
                                                             GError **error);

Clean the metadata store.

`md` : | A ZifMd
`error` : | A GError, or `NULL`
Returns : | `TRUE` for success, `FALSE` otherwise

Since 0.1.0

### zif_md_error_quark ()

    GQuark              zif_md_error_quark                  (void);

Returns : | An error quark.

Since 0.1.0

### zif_md_file_check ()

    gboolean            zif_md_file_check                   (ZifMd *md,
                                                             gboolean use_uncompressed,
                                                             gboolean *valid,
                                                             ZifState *state,
                                                             GError **error);

Check the metadata files to make sure they are valid.

NOTE: Don't use this function, the semantics are horrible.

`md` : | A ZifMd
`use_uncompressed` : | If we should check only the uncompresed version
`valid` : | If the metadata is valid, i.e. the checksums are correct
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | `TRUE` if the MD file was read and checked.

Since 0.1.0

### zif_md_find_package ()

    GPtrArray *         zif_md_find_package                 (ZifMd *md,
                                                             const gchar *package_id,
                                                             ZifState *state,
                                                             GError **error);

Finds all packages that match PackageId.

`md` : | A ZifMd
`package_id` : | A PackageId to match
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifPackageRemote's. [element-type ZifPackageRemote][transfer container]

Since 0.1.0

### zif_md_get_changelog ()

    GPtrArray *         zif_md_get_changelog                (ZifMd *md,
                                                             const gchar *pkgid,
                                                             ZifState *state,
                                                             GError **error);

Gets the changelog data for a specific package

`md` : | A ZifMd
`pkgid` : | A internal pkgid to match
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifChangeset's. [element-type ZifChangeset][transfer container]

Since 0.1.0

### zif_md_get_conflicts ()

    GPtrArray *         zif_md_get_conflicts                (ZifMd *md,
                                                             ZifPackage *package,
                                                             ZifState *state,
                                                             GError **error);

Gets the conflicts for a specific package.

`md` : | A ZifMd
`package` : | A `ZifPackage`
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifDepend's. [element-type ZifDepend][transfer container]

Since 0.1.3

### zif_md_get_filename ()

    const gchar *       zif_md_get_filename                 (ZifMd *md);

Gets the compressed filename of the repo.

`md` : | A ZifMd
Returns : | The filename, e.g. "/var/cache/dave.xml.bz2"

Since 0.1.0

### zif_md_get_filename_uncompressed ()

    const gchar *       zif_md_get_filename_uncompressed    (ZifMd *md);

Gets the uncompressed filename of the repo.

`md` : | A ZifMd
Returns : | The uncompressed filename, e.g. "/var/cache/dave.xml"

Since 0.1.0

### zif_md_get_files ()

    GPtrArray *         zif_md_get_files                    (ZifMd *md,
                                                             ZifPackage *package,
                                                             ZifState *state,
                                                             GError **error);

Gets the file list for a specific package.

`md` : | A ZifMd
`package` : | A `ZifPackage`
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | an array of strings. [element-type utf8][transfer container]

Since 0.1.0

### zif_md_get_id ()

    const gchar *       zif_md_get_id                       (ZifMd *md);

Gets the md identifier, usually the repo name.

`md` : | A ZifMd
Returns : | The repo identifier.

Since 0.1.0

### zif_md_get_is_loaded ()

    gboolean            zif_md_get_is_loaded                (ZifMd *md);

Gets if the metadata has already been loaded.

`md` : | A ZifMd
Returns : | `TRUE` if the repo is loaded.

Since 0.1.0

### zif_md_get_kind ()

    ZifMdKind           zif_md_get_kind                     (ZifMd *md);

Gets the type of the repo.

`md` : | A ZifMd
Returns : | The type

Since 0.1.0

### zif_md_get_location ()

    const gchar *       zif_md_get_location                 (ZifMd *md);

Gets the location of the repo.

`md` : | A ZifMd
Returns : | The location

Since 0.1.0

### zif_md_get_obsoletes ()

    GPtrArray *         zif_md_get_obsoletes                (ZifMd *md,
                                                             ZifPackage *package,
                                                             ZifState *state,
                                                             GError **error);

Gets the obsoletes for a specific package.

`md` : | A ZifMd
`package` : | A `ZifPackage`
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifDepend's. [element-type ZifDepend][transfer container]

Since 0.1.3

### zif_md_get_packages ()

    GPtrArray *         zif_md_get_packages                 (ZifMd *md,
                                                             ZifState *state,
                                                             GError **error);

Returns all packages in the repo.

`md` : | A ZifMd
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifPackageRemote's. [element-type ZifPackageRemote][transfer container]

Since 0.1.0

### zif_md_get_provides ()

    GPtrArray *         zif_md_get_provides                 (ZifMd *md,
                                                             ZifPackage *package,
                                                             ZifState *state,
                                                             GError **error);

Gets the provides for a specific package.

`md` : | A ZifMd
`package` : | A `ZifPackage`
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifDepend's. [element-type ZifDepend][transfer container]

Since 0.1.3

### zif_md_get_requires ()

    GPtrArray *         zif_md_get_requires                 (ZifMd *md,
                                                             ZifPackage *package,
                                                             ZifState *state,
                                                             GError **error);

Gets the requires for a specific package.

`md` : | A ZifMd
`package` : | A `ZifPackage`
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifDepend's. [element-type ZifDepend][transfer container]

Since 0.1.3

### zif_md_get_store ()

    ZifStore *          zif_md_get_store                    (ZifMd *md);

Gets the remote store for this metadata.

`md` : | A ZifMd
Returns : | A ZifStore or `NULL` for unset. [transfer none]

Since 0.2.1

### zif_md_kind_to_text ()

    const gchar *       zif_md_kind_to_text                 (ZifMdKind type);

Since 0.1.0

### zif_md_load ()

    gboolean            zif_md_load                         (ZifMd *md,
                                                             ZifState *state,
                                                             GError **error);

Load the metadata store.

`md` : | A ZifMd
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | `TRUE` for success, `FALSE` otherwise

Since 0.1.0

### zif_md_new ()

    ZifMd *             zif_md_new                          (void);

Returns : | A new ZifMd instance.

Since 0.1.0

### zif_md_resolve ()

    GPtrArray *         zif_md_resolve                      (ZifMd *md,
                                                             gchar **search,
                                                             ZifState *state,
                                                             GError **error);

Finds all remote packages that match the name exactly.

`md` : | A ZifMd
`search` : | Search term, e.g. "gnome-power-manager"
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifPackageRemote's. [element-type ZifPackageRemote][transfer container]

Since 0.1.0

### zif_md_resolve_full ()

    GPtrArray *         zif_md_resolve_full                 (ZifMd *md,
                                                             gchar **search,
                                                             ZifStoreResolveFlags flags,
                                                             ZifState *state,
                                                             GError **error);

Finds all remote packages that match the name exactly.

`md` : | A ZifMd
`search` : | Search term, e.g. "gnome-power-manager"
`flags` : | A bitfield of `ZifStoreResolveFlags`, e.g. `ZIF_STORE_RESOLVE_FLAG_USE_NAME_ARCH`
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifPackageRemote's. [element-type ZifPackageRemote][transfer container]

Since 0.2.4

### zif_md_search_details ()

    GPtrArray *         zif_md_search_details               (ZifMd *md,
                                                             gchar **search,
                                                             ZifState *state,
                                                             GError **error);

Finds all packages that match the name or description.

`md` : | A ZifMd
`search` : | Search term, e.g. "advanced"
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifPackageRemote's. [element-type ZifPackageRemote][transfer container]

Since 0.1.0

### zif_md_search_file ()

    GPtrArray *         zif_md_search_file                  (ZifMd *md,
                                                             gchar **search,
                                                             ZifState *state,
                                                             GError **error);

Gets a list of all packages that contain the file. Results are pkgId's descriptors, i.e. 64 bit hashes as test.

`md` : | A ZifMd
`search` : | Search term, e.g. "/usr/bin/powertop"
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | A string list of pkgId's. [element-type utf8][transfer container]

Since 0.1.0

### zif_md_search_group ()

    GPtrArray *         zif_md_search_group                 (ZifMd *md,
                                                             gchar **search,
                                                             ZifState *state,
                                                             GError **error);

Finds all packages that match the group.

`md` : | A ZifMd
`search` : | Search term, e.g. "games/console"
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifPackageRemote's. [element-type ZifPackageRemote][transfer container]

Since 0.1.0

### zif_md_search_name ()

    GPtrArray *         zif_md_search_name                  (ZifMd *md,
                                                             gchar **search,
                                                             ZifState *state,
                                                             GError **error);

Finds all packages that match the name.

`md` : | A ZifMd
`search` : | Search term, e.g. "power"
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifPackageRemote's. [element-type ZifPackageRemote][transfer container]

Since 0.1.0

### zif_md_search_pkgid ()

    GPtrArray *         zif_md_search_pkgid                 (ZifMd *md,
                                                             gchar **search,
                                                             ZifState *state,
                                                             GError **error);

Finds all packages that match the given pkgId.

`md` : | A ZifMd
`search` : | The search terms as a 64 bit hash. [array zero-terminated=1][element-type utf8]
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifPackageRemote's. [element-type ZifPackageRemote][transfer container]

Since 0.1.0

### zif_md_set_checksum ()

    void                zif_md_set_checksum                 (ZifMd *md,
                                                             const gchar *checksum);

Sets the checksum of the compressed file.

`md` : | A ZifMd
`checksum` : | The checksum value

Since 0.1.0

### zif_md_set_checksum_type ()

    void                zif_md_set_checksum_type            (ZifMd *md,
                                                             GChecksumType checksum_type);

Sets the checksum_type of the files.

`md` : | A ZifMd
`checksum_type` : | The checksum type

Since 0.1.0

### zif_md_set_checksum_uncompressed ()

    void                zif_md_set_checksum_uncompressed    (ZifMd *md,
                                                             const gchar *checksum_uncompressed);

Sets the checksum of the uncompressed file.

`md` : | A ZifMd
`checksum_uncompressed` : | The uncompressed checksum value

Since 0.1.0

### zif_md_set_filename ()

    void                zif_md_set_filename                 (ZifMd *md,
                                                             const gchar *filename);

Sets the filename of the compressed file.

`md` : | A ZifMd
`filename` : | The base filename, e.g. "master.xml.bz2"

Since 0.1.0

### zif_md_set_id ()

    void                zif_md_set_id                       (ZifMd *md,
                                                             const gchar *id);

Sets the repository ID for this metadata.

`md` : | A ZifMd
`id` : | The repository id, e.g. "fedora"

Since 0.1.0

### zif_md_set_location ()

    void                zif_md_set_location                 (ZifMd *md,
                                                             const gchar *location);

Sets the location of the compressed file, e.g. "repodata/35d817e-primary.sqlite.bz2"

`md` : | A ZifMd
`location` : | The location

Since 0.1.0

### zif_md_set_max_age ()

    void                zif_md_set_max_age                  (ZifMd *md,
                                                             guint64 max_age);

Sets the maximum age of the metadata file. Any files older than this will be deleted and re-downloaded.

`md` : | A ZifMd
`max_age` : | The maximum permitted value of the metadata, or 0

Since 0.1.0

### zif_md_set_store ()

    void                zif_md_set_store                    (ZifMd *md,
                                                             ZifStore *remote);

Sets the remote store for this metadata.

`md` : | A ZifMd
`remote` : | The ZifStore that created this metadata

Since 0.2.1

### zif_md_set_timestamp ()

    void                zif_md_set_timestamp                (ZifMd *md,
                                                             guint timestamp);

Sets the timestamp of the compressed file.

`md` : | A ZifMd
`timestamp` : | The timestamp value

Since 0.1.0

### zif_md_unload ()

    gboolean            zif_md_unload                       (ZifMd *md,
                                                             ZifState *state,
                                                             GError **error);

Unload the metadata store.

`md` : | A ZifMd
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | `TRUE` for success, `FALSE` otherwise

Since 0.1.0

### zif_md_what_conflicts ()

    GPtrArray *         zif_md_what_conflicts               (ZifMd *md,
                                                             GPtrArray *depends,
                                                             ZifState *state,
                                                             GError **error);

Finds all packages that conflict with the given depends.

`md` : | A ZifMd
`depends` : | an array of ZifDepend's conflict
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifPackageRemote's. [element-type ZifPackageRemote][transfer container]

Since 0.1.3

### zif_md_what_obsoletes ()

    GPtrArray *         zif_md_what_obsoletes               (ZifMd *md,
                                                             GPtrArray *depends,
                                                             ZifState *state,
                                                             GError **error);

Finds all packages that obsolete the given provide.

`md` : | A ZifMd
`depends` : | an array of ZifDepend's obsolete
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifPackageRemote's. [element-type ZifPackageRemote][transfer container]

Since 0.1.3

### zif_md_what_provides ()

    GPtrArray *         zif_md_what_provides                (ZifMd *md,
                                                             GPtrArray *depends,
                                                             ZifState *state,
                                                             GError **error);

Finds all packages that match the given provide.

`md` : | A ZifMd
`depends` : | an array of ZifDepend's provide
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifPackageRemote's. [element-type ZifPackageRemote][transfer container]

Since 0.1.3

### zif_md_what_requires ()

    GPtrArray *         zif_md_what_requires                (ZifMd *md,
                                                             GPtrArray *depends,
                                                             ZifState *state,
                                                             GError **error);

Finds all packages that match the given provide.

`md` : | A ZifMd
`depends` : | an array of ZifDepend's provide
`state` : | A ZifState to use for progress reporting
`error` : | A GError, or `NULL`
Returns : | An array of ZifPackageRemote's. [element-type ZifPackageRemote][transfer container]

Since 0.1.3

## Property Details

### The `"filename"` property

      "filename"                 gchar*                : Read / Write

Default value: NULL

Since 0.1.3

### The `"kind"` property

      "kind"                     guint                 : Read / Write / Construct

Default value: 0

Since 0.1.3

### The `"location"` property

      "location"                 gchar*                : Read / Write

Default value: NULL

Since 0.1.3