## KolabMailInfoDb KolabMailInfoDb — the Kolab2 PIM metadata database |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    struct              KolabMailInfoDbClass;
    gboolean            kolab_mail_info_db_bringup          (KolabMailInfoDb *self,
                                                             GError **err);
    gboolean            kolab_mail_info_db_configure        (KolabMailInfoDb *self,
                                                             KolabSettingsHandler *ksettings,
                                                             GError **err);
    gboolean            kolab_mail_info_db_exists_foldername
                                                            (KolabMailInfoDb *self,
                                                             const gchar *foldername,
                                                             GError **err);
    GList *             kolab_mail_info_db_query_changed_uids
                                                            (KolabMailInfoDb *self,
                                                             const gchar *foldername,
                                                             const gchar *sexp,
                                                             gboolean unset_changed,
                                                             GError **err);
    KolabFolderSummary * kolab_mail_info_db_query_folder_summary
                                                            (KolabMailInfoDb *self,
                                                             const gchar *foldername,
                                                             GError **err);
    GList *             kolab_mail_info_db_query_foldernames
                                                            (KolabMailInfoDb *self,
                                                             GError **err);
    GList *             kolab_mail_info_db_query_foldernames_anon
                                                            (gpointer self,
                                                             GError **err);
    KolabMailSummary *  kolab_mail_info_db_query_mail_summary
                                                            (KolabMailInfoDb *self,
                                                             const gchar *uid,
                                                             const gchar *foldername,
                                                             GError **err);
    KolabMailInfoDbRecord * kolab_mail_info_db_query_record (KolabMailInfoDb *self,
                                                             const gchar *uid,
                                                             const gchar *foldername,
                                                             GError **err);
    GList *             kolab_mail_info_db_query_uids       (KolabMailInfoDb *self,
                                                             const gchar *foldername,
                                                             const gchar *sexp,
                                                             gboolean sidecache_only,
                                                             gboolean include_deleted,
                                                             GError **err);
    gboolean            kolab_mail_info_db_remove_folder    (KolabMailInfoDb *self,
                                                             const gchar *foldername,
                                                             GError **err);
    gboolean            kolab_mail_info_db_remove_record    (KolabMailInfoDb *self,
                                                             const gchar *uid,
                                                             const gchar *foldername,
                                                             GError **err);
    gboolean            kolab_mail_info_db_shutdown         (KolabMailInfoDb *self,
                                                             GError **err);
    gboolean            kolab_mail_info_db_transaction_abort
                                                            (KolabMailInfoDb *self,
                                                             GError **err);
    gboolean            kolab_mail_info_db_transaction_commit
                                                            (KolabMailInfoDb *self,
                                                             GError **err);
    gboolean            kolab_mail_info_db_transaction_start
                                                            (KolabMailInfoDb *self,
                                                             GError **err);
    gboolean            kolab_mail_info_db_update_folder_summary
                                                            (KolabMailInfoDb *self,
                                                             const KolabFolderSummary *summary,
                                                             GError **err);
    gboolean            kolab_mail_info_db_update_record    (KolabMailInfoDb *self,
                                                             const KolabMailInfoDbRecord *record,
                                                             const gchar *foldername,
                                                             GError **err);

## Description

This class gathers information about Kolab mail objects and folders and stores the info in a persistent manner (SQLite-DB). The information gathered and stored for PIM emails includes

- Kolab UID, this is the primary key
- IMAP UID (if available)
- location of the mail object
  - in the KolabMailImapClient disk cache
  - in the KolabMailSideCache disk cache
  - both locations (means sync situation)
- the folder name (i.e. calendar name)
- start date, end date (for quick search)
- alarms, recurrences, ... (for quick search)
- ...

For more detail on which metadata is stored per PIM object, see KolabMailSummary. For folders, refer to KolabFolderSummary.

The information stored via this class is updated by KolabMailSynchronizer, which has access to KolabMailSideCache and KolabMailImapClient. The KolabMailSynchronizer itself is operated by KolabMailAccess.

## Details

### struct KolabMailInfoDbClass

    struct KolabMailInfoDbClass {
    	GObjectClass parent_class;
    };

### kolab_mail_info_db_bringup ()

    gboolean            kolab_mail_info_db_bringup          (KolabMailInfoDb *self,
                                                             GError **err);

### kolab_mail_info_db_configure ()

    gboolean            kolab_mail_info_db_configure        (KolabMailInfoDb *self,
                                                             KolabSettingsHandler *ksettings,
                                                             GError **err);

### kolab_mail_info_db_exists_foldername ()

    gboolean            kolab_mail_info_db_exists_foldername
                                                            (KolabMailInfoDb *self,
                                                             const gchar *foldername,
                                                             GError **err);

### kolab_mail_info_db_query_changed_uids ()

    GList *             kolab_mail_info_db_query_changed_uids
                                                            (KolabMailInfoDb *self,
                                                             const gchar *foldername,
                                                             const gchar *sexp,
                                                             gboolean unset_changed,
                                                             GError **err);

### kolab_mail_info_db_query_folder_summary ()

    KolabFolderSummary * kolab_mail_info_db_query_folder_summary
                                                            (KolabMailInfoDb *self,
                                                             const gchar *foldername,
                                                             GError **err);

### kolab_mail_info_db_query_foldernames ()

    GList *             kolab_mail_info_db_query_foldernames
                                                            (KolabMailInfoDb *self,
                                                             GError **err);

### kolab_mail_info_db_query_foldernames_anon ()

    GList *             kolab_mail_info_db_query_foldernames_anon
                                                            (gpointer self,
                                                             GError **err);

### kolab_mail_info_db_query_mail_summary ()

    KolabMailSummary *  kolab_mail_info_db_query_mail_summary
                                                            (KolabMailInfoDb *self,
                                                             const gchar *uid,
                                                             const gchar *foldername,
                                                             GError **err);

### kolab_mail_info_db_query_record ()

    KolabMailInfoDbRecord * kolab_mail_info_db_query_record (KolabMailInfoDb *self,
                                                             const gchar *uid,
                                                             const gchar *foldername,
                                                             GError **err);

### kolab_mail_info_db_query_uids ()

    GList *             kolab_mail_info_db_query_uids       (KolabMailInfoDb *self,
                                                             const gchar *foldername,
                                                             const gchar *sexp,
                                                             gboolean sidecache_only,
                                                             gboolean include_deleted,
                                                             GError **err);

### kolab_mail_info_db_remove_folder ()

    gboolean            kolab_mail_info_db_remove_folder    (KolabMailInfoDb *self,
                                                             const gchar *foldername,
                                                             GError **err);

### kolab_mail_info_db_remove_record ()

    gboolean            kolab_mail_info_db_remove_record    (KolabMailInfoDb *self,
                                                             const gchar *uid,
                                                             const gchar *foldername,
                                                             GError **err);

### kolab_mail_info_db_shutdown ()

    gboolean            kolab_mail_info_db_shutdown         (KolabMailInfoDb *self,
                                                             GError **err);

### kolab_mail_info_db_transaction_abort ()

    gboolean            kolab_mail_info_db_transaction_abort
                                                            (KolabMailInfoDb *self,
                                                             GError **err);

### kolab_mail_info_db_transaction_commit ()

    gboolean            kolab_mail_info_db_transaction_commit
                                                            (KolabMailInfoDb *self,
                                                             GError **err);

### kolab_mail_info_db_transaction_start ()

    gboolean            kolab_mail_info_db_transaction_start
                                                            (KolabMailInfoDb *self,
                                                             GError **err);

### kolab_mail_info_db_update_folder_summary ()

    gboolean            kolab_mail_info_db_update_folder_summary
                                                            (KolabMailInfoDb *self,
                                                             const KolabFolderSummary *summary,
                                                             GError **err);

### kolab_mail_info_db_update_record ()

    gboolean            kolab_mail_info_db_update_record    (KolabMailInfoDb *self,
                                                             const KolabMailInfoDbRecord *record,
                                                             const gchar *foldername,
                                                             GError **err);

## See Also

KolabMailSynchronizer, KolabMailSideCache, KolabMailImapClient, KolabMailSummary, KolabFolderSummary