Luiz Augusto von Dentz
5e8a10df92
obexd: introduce obc_session_cancel
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
514cc9d0bb
obexd: introduce obc_session_delete
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
2e91048ed5
obexd: introduce obc_session_move
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
5c1c3c5d11
obexd: introduce obc_session_copy
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
aa38bd0529
obexd: introduce obc_session_mkdir
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
ed58b41924
obexd: introduce obc_session_setpath
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
5da12f4189
obexd: fix not queuing requests properly
...
OBEX does not support requests in parallel so they have to be queued
like in SendFiles.
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
65d9c7f8a5
obexd: remove unused field from obc_session
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
f427608f89
obexd: fix not checking session_request return
...
In case session_request return an error proceed to the next
2012-12-04 22:48:52 +01:00
Mikel Astiz
685ed406d0
obexd: Fix possible GLib assertion failure
...
In case of error there might be no io channel to shutdown.
2012-12-04 22:48:52 +01:00
Luiz Augusto von Dentz
4e4c8e2348
obexd: simplify handling of D-Bus pending calls in bluetooth.c
...
There is no much of point to have a user_data if it is always the same
type, besides this code is very inefficient and cause a lookup in the list
of pending calls everytime a reply is received.
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
bab4ca5f16
obexd: move bluetooth specific code from session.c to bluetooth.c
...
This simplifies session.c code quite a bit and enables supporting other
transports in the future.
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
8c97039f4e
obexd: add bluetooth transport driver
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
6a3f42a5bc
obexd: add support for transport drivers
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
3c51a36628
obexd: remove unused field
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
7aa89d5567
obexd: fix circular dependency of session and transfer
...
Currently the code has to to pass session to transfer via user data
(void *) only to be casted to session.
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
cb74e05c97
obexd: fix not being able to read apparams when transfer is complete
...
Transfer id/xfer is set to zero when it is completed which should not
prevent the profiles to read the apparam of the last response.
2012-12-04 22:48:51 +01:00
Luiz Augusto von Dentz
f435b5843e
obexd: fix parsing of apparam on pbap driver
...
Both hdr and size need to be updated otherwise no parameters will be
parsed.
2012-12-04 22:48:51 +01:00
Johan Hedberg
9b2277a879
obexd: map: Rename GetMessagesListing to GetMessageListing
2012-12-04 22:48:50 +01:00
Bartosz Szatkowski
7ee7a67ce0
obexd: Add support for PullMessagesListing in MAP client
...
Just basic functionality for now, returning whole listing as a string
(no parsing) and no apparams handling.
2012-12-04 22:48:50 +01:00
Bartosz Szatkowski
8b15cbab9f
obexd: Add basic support for MAP folder listing
...
For now just basic functionality - returning whole listing as a string
(no parsing for now) and no apparams handling.
2012-12-04 22:48:50 +01:00
Bartosz Szatkowski
76acb638b0
obexd: Add support for SetFolder in MAP client
2012-12-04 22:48:50 +01:00
Bartosz Szatkowski
9a9af3203b
obexd: Add basic support for MAP client in obex-client
2012-12-04 22:48:50 +01:00
Jaganath Kanakkassery
320dc79f0f
obexd: Fix file size issue in GetProperties
...
In SendFiles, If application calls GetProperties before
Request method returns then the file size is zero.
2012-12-04 22:48:49 +01:00
Bartosz Szatkowski
d6fdefe906
obexd: Fix app params memory management
2012-12-04 22:48:49 +01:00
Slawomir Bochenski
c0ad77f7e8
obexd: Fix crash on error in agent_request_reply
...
This fixes regression introduced by
63becff48820dc50a30ae495e286e858a886d9dd, causing obex-client to crash
in cases of e.g. remote site rejecting pushed file.
The req->function set by user of agent API may request agent object
deletion. This in turn checks if agent->pending is set and if it is,
it tries to cancel the pending call and frees pending call data. As at
this point we are already handling call response and we are going to
free this pending call data, agent->pending can be set to NULL prior to
calling req->function, thus preventing premature freeing of later
dereferenced req.
2012-12-04 22:48:46 +01:00
Slawomir Bochenski
9857369dc8
obexd: Fix missing format in call to g_error_new
2012-12-04 22:48:45 +01:00
Luiz Augusto von Dentz
230e706f80
obexd: Fix possible crash when indicating progress
...
The amount of transferred bytes should only be updated after it has
been sent.
2012-12-04 22:48:45 +01:00
Luiz Augusto von Dentz
9d1f970eb2
obexd: fix possible crash on GetFile
...
Invalid read of size 8
at 0x413DA1: get_file_callback (ftp.c:184)
by 0x40A74E: transfer_complete (gobex-transfer.c:73)
by 0x40AB91: transfer_response (gobex-transfer.c:172)
by 0x40847A: handle_response (gobex.c:629)
by 0x408C06: incoming_data (gobex.c:811)
by 0x3E01043DBC: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.2910.0)
by 0x3E010445A7: ??? (in /lib64/libglib-2.0.so.0.2910.0)
by 0x3E01044AF4: g_main_loop_run (in /lib64/libglib-2.0.so.0.2910.0)
by 0x404CD4: main (main.c:102)
Address 0x8 is not stack'd, malloc'd or (recently) free'd
2012-12-04 22:48:44 +01:00
Johan Hedberg
081807736b
obexd: Remove g_obex_packet_find_header
...
This was exactly the same as g_obex_packet_get_header.
2012-12-04 22:48:44 +01:00
Luiz Augusto von Dentz
0e31d0f56b
obexd: port to gobex
...
This remove gwobex dependency of the client using gobex instead.
Based on initial work by Johan Hedberg <johan.hedberg@intel.com>
2012-12-04 22:48:43 +01:00
Luiz Augusto von Dentz
6b7b19c972
obexd: add FileTransfer.CopyFile implementation
2012-12-04 22:48:43 +01:00
Luiz Augusto von Dentz
501fa35265
obexd: add FileTransfer.MoveFile implementation
2012-12-04 22:48:43 +01:00
Luiz Augusto von Dentz
3fbffebe57
obexd: add sync target
...
sync target implements sync driver
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
e976fc0a57
obexd: add pbap target
...
pbap target implements phonebook access driver
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
044d002f1f
obexd: add ftp target
...
ftp target implements file transfer and Nokia Pc Suite drivers.
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
9e64065e4f
obexd: add opp target
...
opp target implements object push driver
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
29eb13b108
obexd: make use of obc_ prefix for public functions
...
This should indicate more clearer which function are public to the
drivers.
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
590fd450bb
obexd: add target driver support
...
This simplify target matching to a single place making it easier to add
new targets/profiles.
Matching is done by either friendly name e.g. opp, ftp... or Bluetooth
UUID.
Drivers are probed when a session is established and removed when the
session is destroyed.
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
ec0e7836cf
obexd: move __obex_log_init before manager_init
...
This enables us to log target during initialization
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
7605e6c809
obexd: add target module vtable
...
New targets/profiles can be introduced by just adding an entry to the
table and register their drivers similarly to a plugin.
2012-12-04 22:48:42 +01:00
Luiz Augusto von Dentz
c3dee209a0
obexd: separate manager interface code from main
...
Move manager interface code to it own file.
2012-12-04 22:48:41 +01:00
Luiz Augusto von Dentz
22c7e9f390
obexd: separate agent code from session
...
This should improve modularization of code
2012-12-04 22:48:41 +01:00
Luiz Augusto von Dentz
fd15f3a28a
obexd: separate ftp code from session
...
This should improve modularization of code
2012-12-04 22:48:41 +01:00
Luiz Augusto von Dentz
b5c28914a1
obexd: make transfer structure private
...
This make it easier to modularize obex-client
2012-12-04 22:48:41 +01:00
Luiz Augusto von Dentz
d06d20882a
obexd: make session structure private
...
Session data should not be acessible directly otherwise it cause too
much dependency by profile specific code which is quite inefficient in
the long term.
2012-12-04 22:48:41 +01:00
Dmitriy Paliy
b17209a9b4
obexd: Add adapter ReleaseSession to obex-client
...
Release of adapter session is added to obex-client when closing OBEX
transfer.
2012-12-04 22:48:39 +01:00
Dmitriy Paliy
821da85bb6
obexd: Add handling of system D-Bus method calls
...
Sending system D-Bus method calls (DefaultAdapter, FindAdapter
and RequestSession) and handling of pending D-Bus calls is added
to obex-client.
2012-12-04 22:48:39 +01:00
Dmitriy Paliy
d89ad62c05
obexd: Split up session_create in separate functions
...
Connection of RFCOMM and SDP are extracted from session_create function
into session_connect. Such allows making asynchronous calls before
creating connections.
2012-12-04 22:48:39 +01:00
Dmitriy Paliy
bbcc0f34da
obexd: Add system bus connection in obex-client
...
Connection to system bus is added in obex-client. Purpose is to carry
out OBEX transfers within a single adapter's session.
2012-12-04 22:48:39 +01:00