40 Commits

Author SHA1 Message Date
josch
3bff628066 add support for instant uploads 2015-01-15 16:52:41 +01:00
josch
9913f2948c add install target 2014-12-30 14:03:17 +01:00
josch
e5bb2e12e8 do not build shared library (we do not want to maintain its ABI) 2014-12-30 14:03:17 +01:00
josch
8c5bb77601 add compiler flags depending on compiler and version 2014-12-29 09:54:42 +01:00
root
d8670f99c5 enable anonymous unions (needed for GCC 3.X) 2014-12-27 17:49:17 -06:00
root
ac0a758b67 removed -Werror because it doesn't work on GCC 3.X systems 2014-12-27 17:09:10 -06:00
josch
3829011324 lower requirement on libjansson from 2.6 to 2.5 2014-12-27 23:41:50 +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
5bd9e418c4 make everything work on freebsd 2014-12-09 15:30:13 +01:00
josch
c8a0f2a942 add upload/patch 2014-12-07 15:38:50 +01:00
josch
c04151f2e1 remove json_object_by_path 2014-12-05 14:27:31 +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
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
48d803911f CMakeLists.txt: break long lines 2014-12-02 07:36:00 +01:00
josch
04dd1bcc71 now that we got rid of global variables, we can split the operations into their own file 2014-12-02 07:34:07 +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
f281b4233d add diff and patch functions for xdelta3 2014-11-04 11:02:33 +01:00
josch
524fdf5824 add valgrind test for mediafire-fuse and fix memleaks 2014-10-25 11:39:26 +02:00
josch
5fa32f8878 build with std=c99 2014-10-02 08:20:08 +02:00
josch
b4045f19ce Add hashtable implementation to maintain a local copy of the remote 2014-09-26 15:19:55 +02:00
josch
975e75cc6f mfshell: add changes command, mfapi: add device/get_changes 2014-09-25 13:04:40 +02:00
josch
063db92a97 temporary workaround for ubuntu: link with --no-as-needed 2014-09-24 21:07:07 +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
0561a922c5 mfshell: add new folder command 2014-09-24 10:48:54 +02:00
josch
00ff91c15a fuse: add more options and establish connection on startup 2014-09-23 20:53:29 +02:00
josch
8e1fd0e41d add skeleton for fuse module 2014-09-23 15:12:19 +02:00
josch
f85072e465 refactor option and config handling 2014-09-23 14:02:30 +02:00
josch
164de0782f allow in-tree builds (rename mfshell executable) 2014-09-23 09:28:30 +02:00
josch
042a1cdf09 Add valgrind tests and fix memleaks 2014-09-23 09:28:24 +02:00
josch
e45d0e883d add rmdir shell command and folder_delete api call 2014-09-20 14:37:24 +02:00
josch
097a855751 use gnu indent to enforce coding style and adapt source
- indent options are listed in ./.indent.pro
 - use test case to run indent
2014-09-20 12:29:39 +02:00
josch
d8e00119b4 add test with iwyu and fix all headers accordingly 2014-09-20 10:31:55 +02:00
josch
b322f68ad2 build with -Wall -Wextra -Werror and fix errors 2014-09-19 17:08:24 +02:00
josch
ef3b2aa844 Refactor code into utils, mfapi and mfshell
- utils is the low level library used by the others
 - mfapi uses utils and implements the api and some wrappers
 - mfshell uses mfapi and utils to provide a shell
2014-09-19 17:08:20 +02:00
josch
ebedf596db Replace cfile.c with connection.c
- cfile.h needed too many function calls and was too complex
 - connection.h does
     - only download in binary mode (json can handle that)
     - have no excess of getters and setters
     - allow to execute the whole request in a single function call
     - allow to be re-used for multiple requests
 - as a result, the code has 600 lines of code less
 - originally, connection.h was developed to use a global curl
   handle for all requests such that the same connection could be
   re-used. Unfortunately the MediaFire servers will close the
   connection after each request from their end:

      Bryan: "Unfortunately, we won't ever do keep-alive.  Closing the
      connection is a small part of a larger set of heuristics we have in
      place to prevent DOS/DDOS attacks."

   This causes massive performance impacts and those grow even larger when
   using SSL because the handshake has to be executed for every single
   request again.
2014-09-17 21:21:20 +02:00
josch
48ce3f7e95 compile with cmake 2014-09-16 08:04:06 +02:00