58 Commits

Author SHA1 Message Date
Aaron Hamilton
cf22aa9ff5 Use _DEFAULT_SOURCE instead of _BSD_SOURCE, since _BSD_SOURCE is deprecated. 2015-01-21 23:43:45 +00:00
root
8773541f35 temporarily revert to 400 folder items per call until a more permanet fix can be made 2015-01-21 09:59:23 -06:00
josch
f0a55615ae urlencode all filenames, foldernames, username and password 2015-01-16 08:49:23 +01:00
josch
3bff628066 add support for instant uploads 2015-01-15 16:52:41 +01:00
root
e8d16e6c54 fetch 1000 folders and 1000 files per call instead of 100 2015-01-03 12:11:25 -06:00
josch
51b2ca1392 retrieve and store user's ekey when calling user/get_session_token 2014-12-29 15:11:53 +01:00
josch
a0c534b803 adjust includes according to iwyu 3.5 2014-12-29 09:54:42 +01:00
josch
0bd253bf28 fix indentation 2014-12-29 09:54:42 +01:00
root
ae52c4c647 fixed some reversed parameters introduced in the previous commit 2014-12-27 22:32:40 -06:00
root
53e85e0de1 added the framework for supporting new link types in the file-get-links API 2014-12-27 22:26:24 -06:00
root
70a6056d78 fixes for files in the apicalls directory for strdup on old systems 2014-12-27 17:24:04 -06:00
root
e046d726f1 the file_get_links low-level API was returning -1 because the share link was not being returned. this was an artifact of the new API update. even though the direct_download_link was being returned, we were erroneously returning -1 2014-12-26 22:56:58 -06:00
root
cfd93bfa08 call get links and specify only direct_download link. that is all we should need (for now) 2014-12-26 22:46:49 -06:00
josch
b1b32d9ad8 folder/move: in contrast to the API docs it's folder_key_dst and not folderkey_dst 2014-12-19 19:07:08 +01:00
josch
90b2bfa332 add new api calls: folder/move and folder/update 2014-12-19 10:15:22 +01:00
josch
30428ad027 add new api calls: file/move and file/update 2014-12-19 08:20:20 +01:00
josch
f788706680 mfconn_create_signed_get: add more verbosity to error conditions 2014-12-19 07:57:01 +01:00
josch
171fd815f2 allow to change local files
- fuse/filecache:
     * add filecache_upload_patch
     * allow opening files in modes other than RDONLY
 - fuse/hashtbl:
     * add folder_tree_upload_patch
 - fuse/operations:
     * allow opening files in modes other than RDONLY
     * add members to private context which allow tracking of
       not-yet-uploaded files and files opened for writing and
       files opened in read-only mode
 - mfapi/apicalls/upload_patch:
     * supply x-filename and x-filesize headers
 - mfapi/apicalls/upload_simple:
     * do not supply the x-filehash header as it is not used by the
       server
 - utils/hash:
     * hex characters must be lower case for the server
 - utils/strings:
     * clean up unused functions strdup_join, strdup_substr,
       string_chomp
 - utils/stringv:
     * complete rewrite with different string vector implementation
2014-12-18 20:29:47 +01:00
josch
c8a0f2a942 add upload/patch 2014-12-07 15:38:50 +01:00
josch
a95a0f5c48 fill headers outside of http_post_file 2014-12-07 15:03:38 +01:00
josch
8468a39c0a if apicall failed - retry 2014-12-06 11:04:04 +01:00
josch
c04151f2e1 remove json_object_by_path 2014-12-05 14:27:31 +01:00
josch
8300fcd4c8 file/get_info: fix wrong response check 2014-12-05 14:05:51 +01:00
josch
73123d87e9 move mfconn_update_secret_key into the apicalls 2014-12-05 14:02:33 +01:00
josch
972b47f449 file/get_info: change accidental ssl usage 2014-12-05 13:06:03 +01:00
josch
2ce7ae3fae rename mfapi/apicalls/user_session.c -> mfapi/apicalls/user_get_session_token.c 2014-12-05 11:38:57 +01:00
josch
1007caec7a check and return mediafire response code for every api call 2014-12-05 11:37:51 +01:00
josch
71f6396a9a Allow to create new files (but changing them is not allowed yet)
- since mediafire cannot deal with empty files, we put new files into a
   temporary location and upload them once they get closed
 - add create and write functions to fuse
 - pass a file handle to mfconn_api_upload_simple instead of a path
 - allow calc_sha256 to also compute the file size
 - error out when the key returned by upload/simple is empty
 - make valgrind.supp more lenient
2014-12-04 16:07:12 +01:00
josch
f1bf926145 Allow file upload
- add upload/simple
 - add upload/poll_upload
 - add "put" command to mfshell
 - add http POST method
2014-12-04 10:34:54 +01:00
josch
83eb1d9dcc add file/delete apicall and rm command to shell 2014-12-02 10:18:12 +01:00
josch
2f2ce91597 fix includes and indentation 2014-12-01 22:03:09 +01:00
josch
febb29f75c Add support for updating local cache through patches
- refactor some code:
   - code handling the file cache is now in fuse/filecache.c
   - base36 and base16 encoding and decoding moved to utils/hash.c
 - mfshell: add "updates" command calling device/get_updates
 - add container class to store patch information as mfapi/patch.c
 - apicalls: store more info retrieved by file/get_info
 - apicalls: add device/get_updates
 - apicalls: add device/get_patch
2014-12-01 16:30:32 +01:00
josch
511cda2c8f calculate and check hash of downloaded file 2014-11-05 13:40:25 +01:00
josch
5fa32f8878 build with std=c99 2014-10-02 08:20:08 +02:00
josch
b0410cc1ac make synchronization with remote more robust 2014-09-29 16:49:11 +02:00
josch
b6f35763fa Optimize device/get_changes updates
- don't use folder/get_content but rely on parent information
 - add many more debugging information and sanity checks
 - ignore trash
 - correctly update local device revision using device_response
 - remove "visited" member and change housekeeping function to check for
   consistency of parents and children (and retrieve fix from remote if
   necessary)
 - print key and parent key in the debugging function
 - check for remote updates on every fs function
 - introduce global defines for key and filename length
 - add parent member, getters and setters to file.h
2014-09-27 14:05:11 +02:00
josch
b4045f19ce Add hashtable implementation to maintain a local copy of the remote 2014-09-26 15:19:55 +02:00
josch
8ac6e70609 Don't let api_device_getchanges print but let it fill datastructures 2014-09-25 21:51:42 +02:00
josch
ebc70ee4c4 fix includes 2014-09-25 19:43:38 +02:00
josch
dcce69e66d limit line length to 79 characters 2014-09-25 19:38:48 +02:00
josch
32fcb30572 fix indentation 2014-09-25 19:34:03 +02:00
josch
0fab559a86 Don't let api_folder_get_content print but let it fill datastructures 2014-09-25 19:27:49 +02:00
josch
975e75cc6f mfshell: add changes command, mfapi: add device/get_changes 2014-09-25 13:04:40 +02:00
josch
c763863d27 remove epoch 2014-09-24 21:20:21 +02:00
josch
29a343267d mfshell: add the status command and the device/get_status api call 2014-09-24 18:33:04 +02:00
josch
6ca27f0a6a fix indent test and indentation 2014-09-24 11:28:35 +02:00
josch
0561a922c5 mfshell: add new folder command 2014-09-24 10:48:54 +02:00
josch
18db8742dd remove "myfiles" as a moniker for the root. Use NULL or empty string instead 2014-09-24 09:34:56 +02:00
josch
6e546fa3f3 some stderr output on error 2014-09-23 20:52:30 +02:00
josch
60e0824f68 mfapi/apicalls/user_session.c: don't use hardcoded application_id 2014-09-23 18:24:09 +02:00