diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2013-01-18 15:36:54 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2013-01-18 15:36:54 +0000 |
commit | 34b1c19ffb694eccea4ef58f1acee59aa32e47ef (patch) | |
tree | 0baadc326cb45c32d589e11f1f57ff8ae9a45a93 | |
parent | dc8a62a772e2d78913c23dc94061cd941e49a349 (diff) | |
download | libgphoto2-34b1c19ffb694eccea4ef58f1acee59aa32e47ef.tar.gz |
allow 64bit writes (to support files > 4GB on MTP devices)
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14186 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r-- | camlibs/ptp2/ptp.c | 18 | ||||
-rw-r--r-- | camlibs/ptp2/ptp.h | 12 |
2 files changed, 15 insertions, 15 deletions
diff --git a/camlibs/ptp2/ptp.c b/camlibs/ptp2/ptp.c index d6acb43b2..c856b6ceb 100644 --- a/camlibs/ptp2/ptp.c +++ b/camlibs/ptp2/ptp.c @@ -136,8 +136,8 @@ ptp_error (PTPParams *params, const char *format, ...) **/ uint16_t ptp_transaction_new (PTPParams* params, PTPContainer* ptp, - uint16_t flags, unsigned int sendlen, - PTPDataHandler *handler + uint16_t flags, uint64_t sendlen, + PTPDataHandler *handler ) { int tries; uint16_t cmd; @@ -380,7 +380,7 @@ ptp_exit_fd_handler (PTPDataHandler *handler) { /* Old style transaction, based on memory */ uint16_t ptp_transaction (PTPParams* params, PTPContainer* ptp, - uint16_t flags, unsigned int sendlen, + uint16_t flags, uint64_t sendlen, unsigned char **data, unsigned int *recvlen ) { PTPDataHandler handler; @@ -1047,7 +1047,7 @@ ptp_sendobjectinfo (PTPParams* params, uint32_t* store, * ptp_sendobject: * params: PTPParams* * char* object - contains the object that is to be sent - * uint32_t size - object size + * uint64_t size - object size * * Sends object to Responder. * @@ -1055,7 +1055,7 @@ ptp_sendobjectinfo (PTPParams* params, uint32_t* store, * */ uint16_t -ptp_sendobject (PTPParams* params, unsigned char* object, uint32_t size) +ptp_sendobject (PTPParams* params, unsigned char* object, uint64_t size) { PTPContainer ptp; @@ -1070,7 +1070,7 @@ ptp_sendobject (PTPParams* params, unsigned char* object, uint32_t size) * ptp_sendobject_from_handler: * params: PTPParams* * PTPDataHandler* - File descriptor to read() object from - * uint32_t size - File/object size + * uint64_t size - File/object size * * Sends object from file descriptor by consecutive reads from this * descriptor. @@ -1078,7 +1078,7 @@ ptp_sendobject (PTPParams* params, unsigned char* object, uint32_t size) * Return values: Some PTP_RC_* code. **/ uint16_t -ptp_sendobject_from_handler (PTPParams* params, PTPDataHandler *handler, uint32_t size) +ptp_sendobject_from_handler (PTPParams* params, PTPDataHandler *handler, uint64_t size) { PTPContainer ptp; @@ -1093,7 +1093,7 @@ ptp_sendobject_from_handler (PTPParams* params, PTPDataHandler *handler, uint32_ * ptp_sendobject_fromfd: * params: PTPParams* * fd - File descriptor to read() object from - * uint32_t size - File/object size + * uint64_t size - File/object size * * Sends object from file descriptor by consecutive reads from this * descriptor. @@ -1101,7 +1101,7 @@ ptp_sendobject_from_handler (PTPParams* params, PTPDataHandler *handler, uint32_ * Return values: Some PTP_RC_* code. **/ uint16_t -ptp_sendobject_fromfd (PTPParams* params, int fd, uint32_t size) +ptp_sendobject_fromfd (PTPParams* params, int fd, uint64_t size) { PTPContainer ptp; PTPDataHandler handler; diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h index cbcc7ed08..a0cb06393 100644 --- a/camlibs/ptp2/ptp.h +++ b/camlibs/ptp2/ptp.h @@ -2078,7 +2078,7 @@ typedef struct _PTPDataHandler { */ typedef uint16_t (* PTPIOSendReq) (PTPParams* params, PTPContainer* req); typedef uint16_t (* PTPIOSendData) (PTPParams* params, PTPContainer* ptp, - unsigned long size, PTPDataHandler*getter); + uint64_t size, PTPDataHandler*getter); typedef uint16_t (* PTPIOGetResp) (PTPParams* params, PTPContainer* resp); typedef uint16_t (* PTPIOGetData) (PTPParams* params, PTPContainer* ptp, @@ -2233,11 +2233,11 @@ uint16_t ptp_generic_no_data (PTPParams* params, uint16_t opcode, unsigned int c uint16_t ptp_opensession (PTPParams *params, uint32_t session); uint16_t ptp_transaction_new (PTPParams* params, PTPContainer* ptp, - uint16_t flags, unsigned int sendlen, + uint16_t flags, uint64_t sendlen, PTPDataHandler *handler ); uint16_t ptp_transaction (PTPParams* params, PTPContainer* ptp, - uint16_t flags, unsigned int sendlen, + uint16_t flags, uint64_t sendlen, unsigned char **data, unsigned int *recvlen ); @@ -2317,9 +2317,9 @@ uint16_t ptp_sendobjectinfo (PTPParams* params, uint32_t* store, */ #define ptp_setobjectprotection(params,oid,newprot) ptp_generic_no_data(params,PTP_OC_SetObjectProtection,2,oid,newprot) uint16_t ptp_sendobject (PTPParams* params, unsigned char* object, - uint32_t size); -uint16_t ptp_sendobject_fromfd (PTPParams* params, int fd, uint32_t size); -uint16_t ptp_sendobject_from_handler (PTPParams* params, PTPDataHandler*, uint32_t size); + uint64_t size); +uint16_t ptp_sendobject_fromfd (PTPParams* params, int fd, uint64_t size); +uint16_t ptp_sendobject_from_handler (PTPParams* params, PTPDataHandler*, uint64_t size); /** * ptp_initiatecapture: * params: PTPParams* |