linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mikel Astiz <mikel.astiz.oss@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Mikel Astiz <mikel.astiz@bmw-carit.de>
Subject: [PATCH obexd v2 5/6] client: Remove deprecated part of session API
Date: Thu,  3 May 2012 10:28:29 +0200	[thread overview]
Message-ID: <1336033710-2471-5-git-send-email-mikel.astiz.oss@gmail.com> (raw)
In-Reply-To: <1336033710-2471-1-git-send-email-mikel.astiz.oss@gmail.com>

From: Mikel Astiz <mikel.astiz@bmw-carit.de>

Once the modules are using the new callback style, the session API can
be simplified and the old functions to access session->p removed.
---
 client/session.c |   40 ----------------------------------------
 client/session.h |    3 ---
 2 files changed, 0 insertions(+), 43 deletions(-)

diff --git a/client/session.c b/client/session.c
index 408428c..b994080 100644
--- a/client/session.c
+++ b/client/session.c
@@ -1132,46 +1132,6 @@ const char *obc_session_get_target(struct obc_session *session)
 	return session->driver->target;
 }
 
-static struct obc_transfer *obc_session_get_transfer(
-						struct obc_session *session)
-{
-	if (session->p == NULL)
-		return NULL;
-
-	return session->p->transfer;
-}
-
-int obc_session_get_contents(struct obc_session *session, char **contents,
-								size_t *size)
-{
-	struct obc_transfer *transfer;
-
-	transfer = obc_session_get_transfer(session);
-	if (transfer == NULL) {
-		if (size != NULL)
-			*size = 0;
-
-		return -EINVAL;
-	}
-
-	return obc_transfer_get_contents(transfer, contents, size);
-}
-
-const void *obc_session_get_params(struct obc_session *session, size_t *size)
-{
-	struct obc_transfer *transfer;
-
-	transfer = obc_session_get_transfer(session);
-	if (transfer == NULL) {
-		if (size != NULL)
-			*size = 0;
-
-		return NULL;
-	}
-
-	return obc_transfer_get_params(transfer, size);
-}
-
 static void setpath_complete(struct obc_session *session,
 						struct obc_transfer *transfer,
 						GError *err, void *user_data)
diff --git a/client/session.h b/client/session.h
index ca97900..06aaa1b 100644
--- a/client/session.h
+++ b/client/session.h
@@ -53,9 +53,6 @@ const char *obc_session_get_agent(struct obc_session *session);
 
 const char *obc_session_get_path(struct obc_session *session);
 const char *obc_session_get_target(struct obc_session *session);
-int obc_session_get_contents(struct obc_session *session, char **contents,
-								size_t *size);
-const void *obc_session_get_params(struct obc_session *session, size_t *size);
 
 guint obc_session_send(struct obc_session *session, const char *filename,
 				const char *name, GError **err);
-- 
1.7.7.6


  parent reply	other threads:[~2012-05-03  8:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03  8:28 [PATCH obexd v2 1/6] client: Minor buffer access API changes Mikel Astiz
2012-05-03  8:28 ` [PATCH obexd v2 2/6] client: Avoid GObex dependency from transfer.h Mikel Astiz
2012-05-03  8:28 ` [PATCH obexd v2 3/6] client: Give transfer pointer in session callbacks Mikel Astiz
2012-05-03  8:28 ` [PATCH obexd v2 4/6] client: Use new session callback style in modules Mikel Astiz
2012-05-03  8:28 ` Mikel Astiz [this message]
2012-05-03  8:28 ` [PATCH obexd v2 6/6] client: Remove transfer from queue before callback Mikel Astiz
2012-05-03  9:32 ` [PATCH obexd v2 1/6] client: Minor buffer access API changes Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1336033710-2471-5-git-send-email-mikel.astiz.oss@gmail.com \
    --to=mikel.astiz.oss@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=mikel.astiz@bmw-carit.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).