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) (side-by-side diff)
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,30 +1,47 @@
#ifndef __EYEFIWORKER_H
#define __EYEFIWORKER_H
+#include <tr1/memory>
+using std::tr1::shared_ptr;
+
#include "soapeyefiService.h"
+#include "eyekinfig.h"
+#include "eyetil.h"
+
+struct eyefi_session;
+
class eyefiworker : public eyefiService {
public:
+ shared_ptr<eyekinfig_t> kinfig;
+ shared_ptr<tmpdir_t> indir;
+ shared_ptr<mimewrite_tarfile> mime_tarfile;
+ shared_ptr<mimewrite_string> mime_idigest;
eyefiworker();
- ~eyefiworker();
+ ~eyefiworker() { }
int run(int port) __attribute__ ((noreturn));
int StartSession(std::string macaddress, std::string cnonce,
int transfermode, long transfermodetimestamp,
struct rns__StartSessionResponse &r);
int GetPhotoStatus(std::string credential, std::string macaddress,
std::string filename, long filesize, std::string filesignature, int flags,
struct rns__GetPhotoStatusResponse &r);
int MarkLastPhotoInRoll(std::string macaddress, int mergedelta,
struct rns__MarkLastPhotoInRollResponse &r);
int UploadPhoto(int fileid, std::string macaddress,
std::string filename, long filesize, std::string filesignature,
std::string encryption, int flags,
struct rns__UploadPhotoResponse &r);
+ void *mime_writeopen(void *handle,const char *id,const char *type,const char *description,
+ enum soap_mime_encoding encoding);
+ int mime_write(void *handle,const char *buf,size_t len);
+ void mime_writeclose(void *handle);
+
eyefiService *copy() { throw std::logic_error("Not meant to be called"); }
};
#endif /* __EYEFIWORKER_H */