Message maps

Message maps — Mapping of generic logical ids to context specific ids.

Synopsis

                    OssoABookMessageMapping;
GHashTable*         osso_abook_message_map_new          (const OssoABookMessageMapping *mappings);
const char*         osso_abook_message_map_lookup       (GHashTable *map,
                                                         const char *msgid);

Description

This module provides OssoABookMessageMapping functions.

Details

OssoABookMessageMapping

typedef struct {
        const char *generic_id;
        const char *context_id;
} OssoABookMessageMapping;

osso_abook_message_map_new ()

GHashTable*         osso_abook_message_map_new          (const OssoABookMessageMapping *mappings);

Creates a new message map based on the specified mappings

mappings : An array of mappings from a generic to contextual ids
Returns : a newly allocated GHashTable populated with the mappings

osso_abook_message_map_lookup ()

const char*         osso_abook_message_map_lookup       (GHashTable *map,
                                                         const char *msgid);

Looks up a contextual id for the specified msgid.

map : a message map created with osso_abook_message_map_new()
msgid : a generic id to look up in the message map
Returns : The contextual id corresponding to the generic id