69 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
josch
c87bbec03c fuse: when the hashtable fails to load, start a new one instead of failing 2015-01-19 17:18:10 +01:00
josch
e7671a6473 use correct error ENOSYS when function is not implemented 2015-01-18 08:59:14 +01: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
josch
d1a778ffe5 fix some indentation 2014-12-30 19:12:49 +01:00
josch
a1f39e8d4f fixed an include 2014-12-30 19:10:43 +01:00
josch
c09a663471 create ~/.config and ~/.cache should they not exist 2014-12-30 19:09:20 +01:00
josch
0fed0341fa update TODO list 2014-12-30 14:17:15 +01:00
josch
3fbb3b01ff on startup, check integrity of cached files and remove old cached files 2014-12-30 14:03:17 +01:00
josch
90dc1c2927 protect every fuse call by mutexes to allow mounting without -s option 2014-12-29 22:47:52 +01:00
josch
02e2eec1d4 only call device/get_status every 60 seconds (hardcoded for now) 2014-12-29 22:10:41 +01:00
josch
3b8ecf3bac store cache in subdirectory of user ekey 2014-12-29 19:32:15 +01:00
josch
80036b5bd9 move loop polling for upload completion into separate function 2014-12-29 13:57:53 +01:00
josch
07e545bd87 fuse/operations: explicitly cast pointer to uintptr_t to avoid problems on 32bit systems 2014-12-29 09:54:42 +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
53e85e0de1 added the framework for supporting new link types in the file-get-links API 2014-12-27 22:26:24 -06:00
root
59e7fe33f9 fix include for fcntl 2014-12-27 17:51:49 -06:00
root
e465d44bfe fix include for fcntl 2014-12-27 17:50:41 -06:00
root
b50191bb0e fixed broken include for fcntl 2014-12-27 17:41:36 -06:00
root
e83ed07070 fix up files in the fuse directory for getline and strdup on old systems 2014-12-27 17:26:51 -06:00
root
397063b026 added state 98 as a terminal state 2014-12-26 14:48:26 -06:00
josch
ddaf8ed86d fuse: make access a no-op 2014-12-20 23:38:19 +01:00
josch
40f09aebd6 fuse: add rename 2014-12-19 10:15:31 +01:00
josch
862bdcff80 add stubs for all fuse functions 2014-12-19 01:59:23 +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
5bd9e418c4 make everything work on freebsd 2014-12-09 15:30:13 +01:00
josch
8468a39c0a if apicall failed - retry 2014-12-06 11:04:04 +01:00
josch
dd3291a9c4 fix some error checking 2014-12-05 14:40:04 +01:00
josch
73123d87e9 move mfconn_update_secret_key into the apicalls 2014-12-05 14:02:33 +01:00
josch
816d79438f Allow to skip the device/get_status call when calling folder_tree_update
- this is useful to safe one extra call when it is known that there
   should be changes on the remote. In that case it will immediately
   skip forward to calling device/get_changes
2014-12-04 16:21:39 +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
1e15dcc16b fuse: add unlink to remove files 2014-12-02 11:04:25 +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
58e8e89771 move file integrity checks from fuse/filecache to utils/hash 2014-12-02 07:10:07 +01:00
josch
2f2ce91597 fix includes and indentation 2014-12-01 22:03:09 +01:00
josch
9c4195ebdd fuse: allow entering username and password via stdin
- when either username or password are not specified via commandline
   arguments or configuration file, ask them on standard input
 - unify function to read username and password
 - move function to read username and password from mfshell to
   utils/strings.c
 - remove commented cruft from utils/strings.c
2014-12-01 21:59:59 +01:00
josch
ffc933cf10 allow to start without a config file 2014-12-01 18:54:00 +01:00
josch
0abe0099be fail if hashtable cannot be loaded 2014-12-01 17:23:28 +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
5034d361ba store dircache in proper directory 2014-11-14 13:28:19 +01:00
josch
d748f5e686 fuse/main.c: eliminate all global variables by using fuse private_data 2014-11-14 13:20:31 +01:00
josch
c7cd1809fe look up parent again after having retrieved it 2014-11-14 09:48:41 +01:00
josch
f9b0fa8551 instead of storing whether or not the local version is up to date, store the revision of the meta data and the revision of the data behind it 2014-11-12 19:42:21 +01:00
josch
511cda2c8f calculate and check hash of downloaded file 2014-11-05 13:40:25 +01:00
josch
720d5da086 reorganize configuration and cache location handling
- follow XDG basedir spec
2014-11-03 20:33:48 +01:00
josch
1e4a217157 fix a typo that prevented the wrong directory being updated 2014-10-28 09:41:15 +01:00
josch
3db5ce5c42 implement preliminary support to read files
* no writing yet
  * no delta updates yet - new versions will be retrieved fully
2014-10-27 14:17:06 +01:00
josch
21465f8943 create config directory in HOME and read config from there 2014-10-26 14:11:22 +01:00