summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Fetzer <christian.fetzer@bmw-carit.de>2013-04-12 11:29:04 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-04-17 13:43:45 +0300
commitf4bf087572208d0f382babec61cbbce9c9822017 (patch)
treedcc5950f07edd0d1dcf7c84467923555cd9eab6d
parentcb59ec7853da1001702e3a7feeb57473482b5a74 (diff)
obexd: Add obc_session_get_attribute to session
This adds a obc_session_get_attribute function to the client session. The function allows querying the session specific service attributes.
-rw-r--r--obexd/client/session.c9
-rw-r--r--obexd/client/session.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/obexd/client/session.c b/obexd/client/session.c
index 2e8b11300..32c847c0a 100644
--- a/obexd/client/session.c
+++ b/obexd/client/session.c
@@ -827,6 +827,15 @@ fail:
return NULL;
}
+const void *obc_session_get_attribute(struct obc_session *session,
+ int attribute_id)
+{
+ if (session == NULL || session->id == 0)
+ return NULL;
+
+ return session->transport->getattribute(session->id, attribute_id);
+}
+
const char *obc_session_get_owner(struct obc_session *session)
{
if (session == NULL)
diff --git a/obexd/client/session.h b/obexd/client/session.h
index 402c042bd..b0b36557c 100644
--- a/obexd/client/session.h
+++ b/obexd/client/session.h
@@ -54,6 +54,9 @@ const char *obc_session_get_target(struct obc_session *session);
const char *obc_session_register(struct obc_session *session,
GDBusDestroyFunction destroy);
+const void *obc_session_get_attribute(struct obc_session *session,
+ int attribute_id);
+
guint obc_session_queue(struct obc_session *session,
struct obc_transfer *transfer,
session_callback_t func, void *user_data,