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 1/4] client: add obc_transfer_set_filename
Date: Wed,  7 Mar 2012 15:50:26 +0100	[thread overview]
Message-ID: <1331131829-28509-2-git-send-email-mikel.astiz.oss@gmail.com> (raw)
In-Reply-To: <1331131829-28509-1-git-send-email-mikel.astiz.oss@gmail.com>

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

This is just a setter for the filename field in transfers.
---
 client/transfer.c |    7 +++++++
 client/transfer.h |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/client/transfer.c b/client/transfer.c
index d1edef2..3471655 100644
--- a/client/transfer.c
+++ b/client/transfer.c
@@ -645,6 +645,13 @@ void obc_transfer_set_name(struct obc_transfer *transfer, const char *name)
 	transfer->name = g_strdup(name);
 }
 
+void obc_transfer_set_filename(struct obc_transfer *transfer,
+					const char *filename)
+{
+	g_free(transfer->filename);
+	transfer->filename = g_strdup(filename);
+}
+
 const char *obc_transfer_get_path(struct obc_transfer *transfer)
 {
 	return transfer->path;
diff --git a/client/transfer.h b/client/transfer.h
index e7e1000..da7d151 100644
--- a/client/transfer.h
+++ b/client/transfer.h
@@ -56,6 +56,8 @@ void obc_transfer_set_buffer(struct obc_transfer *transfer, char *buffer);
 void obc_transfer_clear_buffer(struct obc_transfer *transfer);
 
 void obc_transfer_set_name(struct obc_transfer *transfer, const char *name);
+void obc_transfer_set_filename(struct obc_transfer *transfer,
+					const char *filename);
 const char *obc_transfer_get_path(struct obc_transfer *transfer);
 gint64 obc_transfer_get_size(struct obc_transfer *transfer);
 int obc_transfer_set_file(struct obc_transfer *transfer);
-- 
1.7.6.5


  reply	other threads:[~2012-03-07 14:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 14:50 [PATCH obexd v2 0/4] client: parameter naming convention Mikel Astiz
2012-03-07 14:50 ` Mikel Astiz [this message]
2012-03-07 14:50 ` [PATCH obexd v2 2/4] client: fix naming convention in transfer api Mikel Astiz
2012-03-07 14:50 ` [PATCH obexd v2 3/4] client: refactor naming convention in session api Mikel Astiz
2012-03-07 14:50 ` [PATCH obexd v2 4/4] client: simplify obc_session_pull Mikel Astiz
2012-03-08 10:28 ` [PATCH obexd v2 0/4] client: parameter naming convention Luiz Augusto von Dentz
2012-03-09  0:01 ` Johan Hedberg

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=1331131829-28509-2-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).