obexd: Add prototypes for phonebook abstraction

This commit is contained in:
Marcel Holtmann 2008-10-18 06:25:57 +02:00
parent 20f1a8eb69
commit 94b83f5bc5
2 changed files with 38 additions and 0 deletions

View File

@ -25,4 +25,25 @@
#include <config.h>
#endif
#include <glib.h>
#include "phonebook.h"
static GSList *driver_list = NULL;
int phonebook_driver_register(struct phonebook_driver *driver)
{
driver_list = g_slist_append(driver_list, driver);
return 0;
}
void phonebook_driver_unregister(struct phonebook_driver *driver)
{
driver_list = g_slist_remove(driver_list, driver);
}
void phonebook_return(struct phonebook_context *context,
unsigned char *buf, size_t size)
{
}

View File

@ -21,3 +21,20 @@
*
*/
struct phonebook_context {
};
struct phonebook_driver {
const char *name;
int (*create) (struct phonebook_context *context);
void (*destroy) (struct phonebook_context *context);
int (*pullphonebook) (struct phonebook_context *context, ...);
int (*pullvcardlisting) (struct phonebook_context *context, ...);
int (*pullvcardentry) (struct phonebook_context *context, ...);
};
extern int phonebook_driver_register(struct phonebook_driver *driver);
extern void phonebook_driver_unregister(struct phonebook_driver *driver);
extern void phonebook_return(struct phonebook_context *context,
unsigned char *buf, size_t size);