summaryrefslogtreecommitdiffstats
path: root/src/AFC.c
AgeCommit message (Collapse)AuthorFilesLines
2010-01-12Rename utils to debug as it does exactly that, contain debug codeGravatar Martin Szulecki1-1/+1
2009-11-30afc_truncate: use uint64_t instead of off_tGravatar Nikias Bassen1-1/+1
This makes afc_truncate look more like afc_file_truncate which is also using uint64_t for the file size. [#82 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-11-30uint32_t type fixes for afc_file_read/afc_file_writeGravatar Nikias Bassen1-108/+122
This patch also adapts all corresponding internal functions. The buffer lengths are now consistently handled as uint32_t.
2009-11-30added endian safety to AFCGravatar Nikias Bassen1-15/+19
This should make libiphone compatible with big endian machines. [#85 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-11-05afc_dispatch_packet optimization: remove additional bufferGravatar Nikias Bassen1-20/+29
This patch removes the additional buffer that was used inside afc_dispatch_packet. So instead of 'alloc, copy header, copy data, send, free' it will now simply do 'send header, send data'. This should reduce cpu usage.
2009-11-05MAXIMUM_PACKET_SIZE should be staticGravatar Christophe Fergeau1-1/+1
2009-11-05make sure 'length' is >=0 in afc_file_readGravatar Christophe Fergeau1-1/+1
trying to read a negative amount of data doesn't make much sense, and the returned 'bytes' value will overflow if we try to do that. Just treat negative length values as an invalid argument. An alternative way of handling it would be to silently return OK/0 bytes read.
2009-11-05make sure 'length' is >=0 in afc_file_writeGravatar Christophe Fergeau1-1/+1
trying to write a negative amount of data doesn't make much sense, and bad things will happen if we try to do that. Just treat negative length values as an invalid argument. An alternative way of handling it would be to silently return OK/0 bytes written.
2009-11-02AFC: new function afc_set_file_timeGravatar Nikias Bassen1-0/+43
This function allows to set the modification time of a file. The time value needs to be specified as nanoseconds since epoch. [#81 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-09-12Public API rework, extension and adaption to latest libusbmuxd-1.0 API.Gravatar Nikias Bassen1-20/+20
2009-09-12Update the afc_get_device_info helper to return an afc_error_tGravatar Martin Szulecki1-11/+17
We should return any underlying error afc_get_device_info returns so one is able to act properly. Also renamed it to "key" instead of "field" to be more generic.
2009-08-01Add afc_get_device_info_field() helper functionGravatar Bastien Nocera1-0/+29
For use in front-end applications, also serves to document the available keys.
2009-07-29Add handling of afc_remove_path's unknown error code which is an ENOTEMPTYGravatar Martin Szulecki1-0/+4
2009-07-26Merge commit 'martin-s/martin'Gravatar Matt Colyer1-377/+326
[#46 state:resolved]
2009-07-26fix most -Wall warningsGravatar Christophe Fergeau1-1/+1
add missing includes, add some casts to avoid format warnings, mark one function as static. There are still warnings about unused argc/argv [#61 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-07-25Implement afc_file_tell() and adjust afc_receive_data() to handle itGravatar Martin Szulecki1-2/+43
2009-07-25Remove AFC to errno conversion and make afc_receive_data() return AFC errorsGravatar Martin Szulecki1-161/+81
2009-07-25Update AFC API and use error codes from the STATUS operation responseGravatar Martin Szulecki1-155/+151
2009-07-25Define remaining unknown AFC operations; SUCCESS is actually a DATA operationGravatar Martin Szulecki1-21/+22
2009-07-24Improve debug output messages by using __func__ everywhere and adjust wordingGravatar Martin Szulecki1-37/+30
2009-07-20New type afc_lock_op_t with allowed lock operations for afc_lock_file. Only ↵Gravatar Nikias Bassen1-12/+10
non-blocking locks are supported via AFC. Signed-off-by: Martin Szulecki <opensuse@sukimashita.com>
2009-07-18API cleanup for AFCGravatar Nikias Bassen1-27/+30
2009-07-07API cleanup for AFCGravatar Nikias Bassen1-27/+30
Signed-off-by: Martin Szulecki <opensuse@sukimashita.com>
2009-07-07Support for creating hard- and symlinksGravatar Nikias Bassen1-0/+52
2009-07-07AFC cleanup: remove iphone_afc_file_* and use handles instead. Removed ↵Gravatar Nikias Bassen1-152/+66
afc_get_file_attr because this function has to go into the program (like ifuse); afc_get_file_info has to be used instead. Modified dispatch_AFC_Packet so that the real buffer size has to be specified (instead of length-1).
2009-06-29Silence compiler warning for dispatch_AFC_packet()Gravatar Martin Szulecki1-1/+1
2009-05-18Make use of usbmuxd and remove libusb dependenciesGravatar Nikias Bassen1-36/+39
Signed-off-by: Matt Colyer <matt@colyer.name>
2009-05-08AFC cleanup and improved error handlingGravatar Nikias Bassen1-111/+239
2009-04-19This is a fix for iphone_afc_get_file_attr. As the file is not opened when ↵Gravatar Nikias Bassen1-1/+2
getting its information with afc_get_file_info, there's no need to close the file (because the handle is invalid). [#26 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-03-16Merge branch 'master' into contact_syncGravatar Jonathan Beck1-1/+105
Conflicts: configure.ac dev/Makefile.am include/libiphone/libiphone.h src/AFC.c src/AFC.h src/Makefile.am
2009-03-08Adds ability to show notification screen to the user.Gravatar Nikias Bassen1-0/+57
Signed-off-by: Matt Colyer <matt@colyer.name>
2009-03-08Adds the iphone_afc_truncate function and fixes a small log_debug issue.Gravatar Nikias Bassen1-1/+48
Signed-off-by: Matt Colyer <matt@colyer.name>
2009-01-29Merge branch 'master' into contact_syncGravatar Jonathan Beck1-1/+1
Conflicts: src/Makefile.am src/iphone.c src/lockdown.c src/lockdown.h src/utils.c
2009-01-13Removed fprintf, use the debug message method.Gravatar Matt Colyer1-1/+1
2009-01-04Merge branch 'master' into plistGravatar Jonathan Beck1-4/+9
Conflicts: src/AFC.c src/lockdown.c src/lockdown.h src/plist.c src/plist.h
2009-01-02Fix indent issues.Gravatar Matt Colyer1-1/+1
2009-01-02Some variables were unsigned while they should beGravatar Christophe Fergeau1-3/+7
dispatch_AFC_packet returns an int, but it was sometimes incorrectly assigned to a variable of type uint32_t which was then compared for being less or more than 0.
2009-01-02Fix function prototypesGravatar Christophe Fergeau1-1/+1
Add missing static, const, change function() to function(void)
2009-01-02Add missing #include "utils.h"Gravatar Christophe Fergeau1-0/+1
2008-12-13fork out plist stuff in libplist and migrate libiphone to use it.Gravatar Jonathan Beck1-1/+0
2008-11-24Added binary-plist support (tweaked slightly to move stuff around)Gravatar Zach C1-23/+23
Signed-off-by: Matt Colyer <matt@colyer.name> fix makefile to take correct main function into account
2008-10-31reduce chunk size in AFC since it was generating error for large fileGravatar Jonathan Beck1-1/+1
fix include in afccheck.c
2008-10-25Change lock to mutex and add tool to check AFC in multithreaded env.Gravatar Jonathan Beck1-5/+12
2008-10-25Handle debugging through utilitary functionsGravatar Jonathan Beck1-77/+39
2008-10-23Indent fixes.Gravatar Matt Colyer1-1/+2
2008-10-23Exposes AFC file handle.Gravatar Zach C1-0/+4
2008-09-01Enforce a modified kr style.Gravatar Matt Colyer1-258/+339
Use "make indent" from now on before committing.
2008-08-31fix afc_getattr and more error handling in ifuse.cGravatar Jonathan Beck1-2/+3
2008-08-31prefix public enum with IPHONE_Gravatar Jonathan Beck1-1/+1
2008-08-31use new function signature and few bugfixes.Gravatar Jonathan Beck1-11/+11