From 175a436839073d5540d0d48e2dd7f7e9102071ad Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 30 Nov 2012 10:21:54 +0100 Subject: [PATCH] PBAP: databaseFormat + filter fields Print filter fields as part of the debug output and document the semantic of databaseFormat (was only in a commit message before). --- src/backends/pbap/PbapSyncSource.cpp | 2 ++ src/backends/pbap/README | 44 ++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/src/backends/pbap/PbapSyncSource.cpp b/src/backends/pbap/PbapSyncSource.cpp index 55838cc3..435c3986 100644 --- a/src/backends/pbap/PbapSyncSource.cpp +++ b/src/backends/pbap/PbapSyncSource.cpp @@ -255,6 +255,8 @@ void PbapSession::initSession(const std::string &address, const std::string &for // get filter list so that we can continue validating our format specifier std::vector filterFields = GDBusCXX::DBusClientCall1< std::vector >(*m_session, "ListFilterFields")(); + SE_LOG_DEBUG(NULL, NULL, "supported PBAP filter fields:\n %s", + boost::join(filterFields, "\n ").c_str()); std::list filter; if (negated) { diff --git a/src/backends/pbap/README b/src/backends/pbap/README index 6cc7e82d..33497720 100644 --- a/src/backends/pbap/README +++ b/src/backends/pbap/README @@ -9,6 +9,50 @@ be running. The "database" property specifies the Bluetooth address of the device to be connected. +The "databaseFormat" can be used as follows: + + [(2.1|3.0)][:][^]propname,propname,... + + 3.0 = download in vCard 3.0 instead of the default 2.1 + 3.0:^PHOTO = download in vCard 3.0 format, excluding PHOTO + PHOTO = download in vCard 2.1 format, only the PHOTO + +Valid property names are the ones listed by obexd in +ListFilterFields(). These fields may include: + VERSION + FN + N + PHOTO + BDAY + ADR + LABEL + TEL + EMAIL + MAILER + TZ + GEO + TITLE + ROLE + LOGO + AGENT + ORG + NOTE + REV + SOUND + URL + UID + KEY + NICKNAME + CATEGORIES + CLASS + BITxy (for different values of xy) + +Set "SYNCEVOLUTION_DEBUG=1" as environment variable when using the +backend to see a list of filter fields supported by obexd. + +Syncing +======= + The backend itself is not able to detect changes since the last sync, mostly because PBAP as a protocol makes that hard. For example, it makes no guarantee that an item has the same ID in two different