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,13 +1,25 @@
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
@@ -24,6 +36,11 @@ class eyefiworker : public eyefiService {
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