mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-03 17:14:21 +08:00
obexd: Add prototypes for phonebook abstraction
This commit is contained in:
parent
20f1a8eb69
commit
94b83f5bc5
@ -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)
|
||||
{
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user