summaryrefslogtreecommitdiffabout
path: root/src/eyefiworker.h
authorMichael Krelin <hacker@klever.net>2013-02-13 22:43:26 (UTC)
committer Michael Krelin <hacker@klever.net>2013-02-13 22:43:26 (UTC)
commit2a5950df692f8a2c9d51a2a3e0c4d41fe0d3e7c9 (patch) (unidiff)
tree9c8a49a1bd96177abdc9cd13435b66a3aea783e2 /src/eyefiworker.h
parentd6545bd95153a5e41cdae441643f4e4a0af94a49 (diff)
downloadiii-2a5950df692f8a2c9d51a2a3e0c4d41fe0d3e7c9.zip
iii-2a5950df692f8a2c9d51a2a3e0c4d41fe0d3e7c9.tar.gz
iii-2a5950df692f8a2c9d51a2a3e0c4d41fe0d3e7c9.tar.bz2
stream mime attachments directly to disk
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (limited to 'src/eyefiworker.h') (more/less context) (ignore whitespace changes)
-rw-r--r--src/eyefiworker.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/eyefiworker.h b/src/eyefiworker.h
index 6cdecff..61d92d2 100644
--- a/src/eyefiworker.h
+++ b/src/eyefiworker.h
@@ -1,16 +1,28 @@
1#ifndef __EYEFIWORKER_H 1#ifndef __EYEFIWORKER_H
2#define __EYEFIWORKER_H 2#define __EYEFIWORKER_H
3 3
4#include <tr1/memory>
5using std::tr1::shared_ptr;
6
4#include "soapeyefiService.h" 7#include "soapeyefiService.h"
5 8
9#include "eyekinfig.h"
10#include "eyetil.h"
11
12struct eyefi_session;
13
6class eyefiworker : public eyefiService { 14class eyefiworker : public eyefiService {
7 public: 15 public:
16 shared_ptr<eyekinfig_t> kinfig;
17 shared_ptr<tmpdir_t> indir;
18 shared_ptr<mimewrite_tarfile> mime_tarfile;
19 shared_ptr<mimewrite_string> mime_idigest;
8 20
9 eyefiworker(); 21 eyefiworker();
10 ~eyefiworker(); 22 ~eyefiworker() { }
11 23
12 int run(int port) __attribute__ ((noreturn)); 24 int run(int port) __attribute__ ((noreturn));
13 25
14 int StartSession(std::string macaddress, std::string cnonce, 26 int StartSession(std::string macaddress, std::string cnonce,
15 int transfermode, long transfermodetimestamp, 27 int transfermode, long transfermodetimestamp,
16 struct rns__StartSessionResponse &r); 28 struct rns__StartSessionResponse &r);
@@ -21,10 +33,15 @@ class eyefiworker : public eyefiService {
21 struct rns__MarkLastPhotoInRollResponse &r); 33 struct rns__MarkLastPhotoInRollResponse &r);
22 int UploadPhoto(int fileid, std::string macaddress, 34 int UploadPhoto(int fileid, std::string macaddress,
23 std::string filename, long filesize, std::string filesignature, 35 std::string filename, long filesize, std::string filesignature,
24 std::string encryption, int flags, 36 std::string encryption, int flags,
25 struct rns__UploadPhotoResponse &r); 37 struct rns__UploadPhotoResponse &r);
26 38
39 void *mime_writeopen(void *handle,const char *id,const char *type,const char *description,
40 enum soap_mime_encoding encoding);
41 int mime_write(void *handle,const char *buf,size_t len);
42 void mime_writeclose(void *handle);
43
27 eyefiService *copy() { throw std::logic_error("Not meant to be called"); } 44 eyefiService *copy() { throw std::logic_error("Not meant to be called"); }
28}; 45};
29 46
30#endif /* __EYEFIWORKER_H */ 47#endif /* __EYEFIWORKER_H */