From f45ea4384bb887cc7b6a63f7cadb372ab2ea69f3 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Wed, 9 Jan 2002 21:05:02 +0000 Subject: [PATCH] * library.c: * ptp.c: * ptp.h: Moved include of time.h to ptp.h to get time_t definition Moved typedef lines after their dependent definitions. Fixed spelling of PTPDeviceInfo. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3784 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/ptp/ChangeLog | 8 ++++++++ camlibs/ptp/library.c | 1 - camlibs/ptp/ptp.c | 3 +-- camlibs/ptp/ptp.h | 11 ++++++----- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/camlibs/ptp/ChangeLog b/camlibs/ptp/ChangeLog index 93ae38be3..264fc7e97 100644 --- a/camlibs/ptp/ChangeLog +++ b/camlibs/ptp/ChangeLog @@ -1,3 +1,11 @@ +2002-01-09 Dan Fandrich + + * library.c: + * ptp.c: + * ptp.h: Moved include of time.h to ptp.h to get time_t definition + Moved typedef lines after their dependent definitions. + Fixed spelling of PTPDeviceInfo. + 2002-01-09 Mariusz Woloszyn * Started ptp fs implementation diff --git a/camlibs/ptp/library.c b/camlibs/ptp/library.c index c252e2fc7..7da84e2cc 100644 --- a/camlibs/ptp/library.c +++ b/camlibs/ptp/library.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/camlibs/ptp/ptp.c b/camlibs/ptp/ptp.c index 65b8a46cc..ab6e05c96 100644 --- a/camlibs/ptp/ptp.c +++ b/camlibs/ptp/ptp.c @@ -25,7 +25,6 @@ #include #include #include -#include #ifdef ENABLE_NLS # include @@ -233,7 +232,7 @@ ptp_transaction (PTPParams* params, PTPReq* req, uint16_t code, #if 0 // Do GetDevInfo (we may use it for some camera_about) uint16_t -ptp_getdevinfo (PTPParams* params, PTPDedviceInfo* devinfo) +ptp_getdevinfo (PTPParams* params, PTPDeviceInfo* devinfo) { } #endif diff --git a/camlibs/ptp/ptp.h b/camlibs/ptp/ptp.h index e93f8822b..c78253e2a 100644 --- a/camlibs/ptp/ptp.h +++ b/camlibs/ptp/ptp.h @@ -22,6 +22,7 @@ #define __PTP_H__ #include +#include #include // PTP datalayer byteorder @@ -36,7 +37,6 @@ #define PTP_REQ_HDR_LEN (2*sizeof(uint32_t)+2*sizeof(uint16_t)) #define PTP_REQ_DATALEN 16384 -typedef struct _PTPReq PTPReq; struct _PTPReq { uint32_t len; uint16_t type; @@ -44,6 +44,7 @@ struct _PTPReq { uint32_t trans_id; char data[PTP_REQ_DATALEN]; }; +typedef struct _PTPReq PTPReq; // Container types @@ -135,7 +136,6 @@ struct _PTPReq { // PTP device info structure (returned by GetDevInfo) -typedef struct _PTPDeviceInfo PTPDedviceInfo; struct _PTPDeviceInfo { uint16_t StaqndardVersion; uint32_t VendorExtensionID; @@ -152,20 +152,20 @@ struct _PTPDeviceInfo { char *DeviceVersionl; char *SerialNumber; }; +typedef struct _PTPDeviceInfo PTPDeviceInfo; // PTP objecthandles structure (returned by GetObjectHandles) -typedef struct _PTPObjectHandles PTPObjectHandles; struct _PTPObjectHandles { uint32_t n; uint32_t handler[(PTP_REQ_DATALEN-sizeof(uint32_t))/sizeof(uint32_t)]; }; +typedef struct _PTPObjectHandles PTPObjectHandles; // PTP objectinfo structure (returned by GetObjectInfo) -typedef struct _PTPObjectInfo PTPObjectInfo; struct _PTPObjectInfo { uint32_t StorageID; uint16_t ObjectFormat; @@ -187,6 +187,7 @@ struct _PTPObjectInfo { time_t ModificationDate; char *Keywords; }; +typedef struct _PTPObjectInfo PTPObjectInfo; #define MAXFILENAMELEN 255 @@ -252,7 +253,6 @@ typedef short (* PTPIOWriteFunc) (unsigned char *bytes, unsigned int size, typedef void (* PTPErrorFunc) (void *data, const char *format, va_list args); typedef void (* PTPDebugFunc) (void *data, const char *format, va_list args); -typedef struct _PTPParams PTPParams; struct _PTPParams { /* data layer byteorder */ uint8_t byteorder; @@ -274,6 +274,7 @@ struct _PTPParams { PTPObjectInfo * objectinfo; }; +typedef struct _PTPParams PTPParams; // ptp functions