## ZifStoreRhn ZifStoreRhn — Store for installed packages |

## Synopsis

    struct              ZifStoreRhn;
    struct              ZifStoreRhnClass;
    const gchar *       zif_store_rhn_get_session_key       (ZifStoreRhn *store);
    gchar *             zif_store_rhn_get_version           (ZifStoreRhn *store,
                                                             GError **error);
    gboolean            zif_store_rhn_login                 (ZifStoreRhn *store,
                                                             const gchar *username,
                                                             const gchar *password,
                                                             GError **error);
    gboolean            zif_store_rhn_logout                (ZifStoreRhn *store,
                                                             GError **error);
    ZifStore *          zif_store_rhn_new                   (void);
    void                zif_store_rhn_set_channel           (ZifStoreRhn *store,
                                                             const gchar *channel);
    void                zif_store_rhn_set_precache          (ZifStoreRhn *store,
                                                             ZifPackageRhnPrecache precache);
    void                zif_store_rhn_set_server            (ZifStoreRhn *store,
                                                             const gchar *server);

## Object Hierarchy

      GObject
       +----ZifStore
             +----ZifStoreRhn

## Description

A ZifStoreRhn is a subclassed ZifStore and operates on remote objects.

## Details

### struct ZifStoreRhn

    struct ZifStoreRhn;

### struct ZifStoreRhnClass

    struct ZifStoreRhnClass {
    	ZifStoreClass		 parent_class;
    	/* Padding for future expansion */
    	void (*_zif_reserved1) (void);
    	void (*_zif_reserved2) (void);
    	void (*_zif_reserved3) (void);
    	void (*_zif_reserved4) (void);
    };

### zif_store_rhn_get_session_key ()

    const gchar *       zif_store_rhn_get_session_key       (ZifStoreRhn *store);

Gets the session_key to use for the install root.

`store` : | A ZifStoreRhn
Returns : | The install session_key, e.g. "/"

Since 0.1.3

### zif_store_rhn_get_version ()

    gchar *             zif_store_rhn_get_version           (ZifStoreRhn *store,
                                                             GError **error);

Gets the RHN version.

`store` : | A ZifStoreRhn
`error` : | A GError, or `NULL`
Returns : | a string for success, `NULL` otherwise

Since 0.1.6

### zif_store_rhn_login ()

    gboolean            zif_store_rhn_login                 (ZifStoreRhn *store,
                                                             const gchar *username,
                                                             const gchar *password,
                                                             GError **error);

Logs into RHN using the specified username and password.

`store` : | A ZifStoreRhn
`username` : | The username to login to RHN with
`password` : | The password to login to RHN with
`error` : | A GError, or `NULL`
Returns : | `TRUE` for success, `FALSE` otherwise

Since 0.1.6

### zif_store_rhn_logout ()

    gboolean            zif_store_rhn_logout                (ZifStoreRhn *store,
                                                             GError **error);

Logs out of RHN.

`store` : | A ZifStoreRhn
`error` : | A GError, or `NULL`
Returns : | `TRUE` for success, `FALSE` otherwise

Since 0.1.6

### zif_store_rhn_new ()

    ZifStore *          zif_store_rhn_new                   (void);

Returns : | A new ZifStoreRhn instance.

Since 0.1.6

### zif_store_rhn_set_channel ()

    void                zif_store_rhn_set_channel           (ZifStoreRhn *store,
                                                             const gchar *channel);

Sets the RHN channel to use.

`store` : | A ZifStoreRhn
`channel` : | The server to use, e.g. "rhel-i386-client-6"

Since 0.1.6

### zif_store_rhn_set_precache ()

    void                zif_store_rhn_set_precache          (ZifStoreRhn *store,
                                                             ZifPackageRhnPrecache precache);

Sets the precache policy. Precaching slows down `zif_store_load()` but dramatically speeds up any data access because each request is multithreaded on up to 50 threads at once.

`store` : | A ZifStoreRhn
`precache` : | The data to cache, e.g. `ZIF_PACKAGE_RHN_PRECACHE_GET_DETAILS`

Since 0.1.6

### zif_store_rhn_set_server ()

    void                zif_store_rhn_set_server            (ZifStoreRhn *store,
                                                             const gchar *server);

Sets the XMLRPC server to use for RHN.

`store` : | A ZifStoreRhn
`server` : | The server to use, e.g. "https://rhn.redhat.com/rpc/api"

Since 0.1.6