diff --git a/obexd/src/map_ap.c b/obexd/src/map_ap.c
index 54e3bcf..1f56748 100644
--- a/obexd/src/map_ap.c
+++ b/obexd/src/map_ap.c
gboolean map_ap_get_u8(map_ap_t *ap, enum map_ap_tag tag, uint8_t *val)
{
- return FALSE;
+ struct ap_entry *entry;
+ int offset = find_ap_def_offset(tag);
+
+ if (offset < 0 || ap_defs[offset].type != APT_UINT8)
+ return FALSE;
+
+
+ entry = g_hash_table_lookup(ap, GINT_TO_POINTER(tag));
+ if (entry == NULL)
+ return FALSE;
+
+ *val = entry->val.u8;
+
+ return TRUE;
}
gboolean map_ap_get_u16(map_ap_t *ap, enum map_ap_tag tag, uint16_t *val)
{
- return FALSE;
+ struct ap_entry *entry;
+ int offset = find_ap_def_offset(tag);
+
+ if (offset < 0 || ap_defs[offset].type != APT_UINT16)
+ return FALSE;
+
+
+ entry = g_hash_table_lookup(ap, GINT_TO_POINTER(tag));
+ if (entry == NULL)
+ return FALSE;
+
+ *val = entry->val.u16;
+
+ return TRUE;
}
gboolean map_ap_get_u32(map_ap_t *ap, enum map_ap_tag tag, uint32_t *val)
{
- return FALSE;
+ struct ap_entry *entry;
+ int offset = find_ap_def_offset(tag);
+
+ if (offset < 0 || ap_defs[offset].type != APT_UINT32)
+ return FALSE;
+
+
+ entry = g_hash_table_lookup(ap, GINT_TO_POINTER(tag));
+ if (entry == NULL)
+ return FALSE;
+
+ *val = entry->val.u32;
+
+ return TRUE;
}
const char *map_ap_get_string(map_ap_t *ap, enum map_ap_tag tag)
{
- return NULL;
+ struct ap_entry *entry;
+ int offset = find_ap_def_offset(tag);
+
+ if (offset < 0 || ap_defs[offset].type != APT_STR)
+ return NULL;
+
+
+ entry = g_hash_table_lookup(ap, GINT_TO_POINTER(tag));
+ if (entry == NULL)
+ return NULL;
+
+ return entry->val.str;
}
gboolean map_ap_set_u8(map_ap_t *ap, enum map_ap_tag tag, uint8_t val)