From: <mar...@us...> - 2009-07-10 20:48:34
|
Revision: 12219 http://gphoto.svn.sourceforge.net/gphoto/?rev=12219&view=rev Author: marcusmeissner Date: 2009-07-10 20:48:27 +0000 (Fri, 10 Jul 2009) Log Message: ----------- last generic conversion Modified Paths: -------------- trunk/libgphoto2/camlibs/ptp2/ptp.c trunk/libgphoto2/camlibs/ptp2/ptp.h Modified: trunk/libgphoto2/camlibs/ptp2/ptp.c =================================================================== --- trunk/libgphoto2/camlibs/ptp2/ptp.c 2009-07-10 20:30:30 UTC (rev 12218) +++ trunk/libgphoto2/camlibs/ptp2/ptp.c 2009-07-10 20:48:27 UTC (rev 12219) @@ -919,30 +919,6 @@ } /** - * ptp_setobjectprotection: - * params: PTPParams* - * uint16_t newprot - object protection flag - * - * Set protection of object. - * - * Return values: Some PTP_RC_* code. - * - */ -uint16_t -ptp_setobjectprotection (PTPParams* params, uint32_t oid, uint16_t newprot) -{ - PTPContainer ptp; - - PTP_CNT_INIT(ptp); - ptp.Code = PTP_OC_SetObjectProtection; - ptp.Param1 = oid; - ptp.Param2 = newprot; - ptp.Nparam = 2; - return ptp_transaction(params, &ptp, PTP_DP_NODATA, 0, NULL, NULL); -} - - -/** * ptp_sendobject: * params: PTPParams* * char* object - contains the object that is to be sent @@ -1016,36 +992,7 @@ } -/** - * ptp_initiatecapture: - * params: PTPParams* - * storageid - destination StorageID on Responder - * ofc - object format code - * - * Causes device to initiate the capture of one or more new data objects - * according to its current device properties, storing the data into store - * indicated by storageid. If storageid is 0x00000000, the object(s) will - * be stored in a store that is determined by the capturing device. - * The capturing of new data objects is an asynchronous operation. - * - * Return values: Some PTP_RC_* code. - **/ - uint16_t -ptp_initiatecapture (PTPParams* params, uint32_t storageid, - uint32_t ofc) -{ - PTPContainer ptp; - - PTP_CNT_INIT(ptp); - ptp.Code=PTP_OC_InitiateCapture; - ptp.Param1=storageid; - ptp.Param2=ofc; - ptp.Nparam=2; - return ptp_transaction(params, &ptp, PTP_DP_NODATA, 0, NULL, NULL); -} - -uint16_t ptp_getdevicepropdesc (PTPParams* params, uint16_t propcode, PTPDevicePropDesc* devicepropertydesc) { Modified: trunk/libgphoto2/camlibs/ptp2/ptp.h =================================================================== --- trunk/libgphoto2/camlibs/ptp2/ptp.h 2009-07-10 20:30:30 UTC (rev 12218) +++ trunk/libgphoto2/camlibs/ptp2/ptp.h 2009-07-10 20:48:27 UTC (rev 12219) @@ -2059,15 +2059,37 @@ uint16_t ptp_sendobjectinfo (PTPParams* params, uint32_t* store, uint32_t* parenthandle, uint32_t* handle, PTPObjectInfo* objectinfo); -uint16_t ptp_setobjectprotection (PTPParams* params, uint32_t oid, uint16_t newprot); +/** + * ptp_setobjectprotection: + * params: PTPParams* + * uint16_t newprot - object protection flag + * + * Set protection of object. + * + * Return values: Some PTP_RC_* code. + * + */ +#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); +/** + * ptp_initiatecapture: + * params: PTPParams* + * storageid - destination StorageID on Responder + * ofc - object format code + * + * Causes device to initiate the capture of one or more new data objects + * according to its current device properties, storing the data into store + * indicated by storageid. If storageid is 0x00000000, the object(s) will + * be stored in a store that is determined by the capturing device. + * The capturing of new data objects is an asynchronous operation. + * + * Return values: Some PTP_RC_* code. + **/ +#define ptp_initiatecapture(params,storageid,ofc) ptp_generic_no_data(params,PTP_OC_InitiateCapture,2,storageid,ofc) -uint16_t ptp_initiatecapture (PTPParams* params, uint32_t storageid, - uint32_t ofc); - uint16_t ptp_getdevicepropdesc (PTPParams* params, uint16_t propcode, PTPDevicePropDesc *devicepropertydesc); uint16_t ptp_getdevicepropvalue (PTPParams* params, uint16_t propcode, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |