-
Notifications
You must be signed in to change notification settings - Fork 1
/
EDSDK.h
1364 lines (1218 loc) · 55.2 KB
/
EDSDK.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/******************************************************************************
* *
* PROJECT : EOS Digital Software Development Kit EDSDK *
* NAME : EDSDK.h *
* *
* Description: PROTO TYPE DEFINITION OF EDSDK API *
* *
*******************************************************************************
* *
* Written and developed by Canon Inc. *
* Copyright Canon Inc. 2006-2014 All Rights Reserved *
* *
******************************************************************************/
#ifndef _EDSDK_H_
#define _EDSDK_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __MACOS__
#include<CoreFoundation/CoreFoundation.h>
#else
#include <windows.h>
#endif
#include "EDSDKTypes.h"
#include "EDSDKErrors.h"
#if defined( BUILD_EDSDK_DLL )
#define EDSAPI EDSEXPORT EDSSTDCALL
#else
#define EDSAPI EDSIMPORT EDSSTDCALL
#endif
#define oldif 0
/*----------------------------------------------------------------------------*/
/******************************************************************************
*******************************************************************************
//
// Basic functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsInitializeSDK
//
// Description:
// Initializes the libraries.
// When using the EDSDK libraries, you must call this API once
// before using EDSDK APIs.
//
// Parameters:
// In: None
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsInitializeSDK();
/*-----------------------------------------------------------------------------
//
// Function: EdsTerminateSDK
//
// Description:
// Terminates use of the libraries.
// This function muse be called when ending the SDK.
// Calling this function releases all resources allocated by the libraries.
//
// Parameters:
// In: None
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsTerminateSDK();
/******************************************************************************
*******************************************************************************
//
// Reference-counter operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsRetain
//
// Description:
// Increments the reference counter of existing objects.
//
// Parameters:
// In: inRef - The reference for the item.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsUInt32 EDSAPI EdsRetain( EdsBaseRef inRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsRelease
//
// Description:
// Decrements the reference counter to an object.
// When the reference counter reaches 0, the object is released.
//
// Parameters:
// In: inRef - The reference of the item.
// Out: None
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsUInt32 EDSAPI EdsRelease( EdsBaseRef inRef );
/******************************************************************************
*******************************************************************************
//
// Item-tree operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsGetChildCount
//
// Description:
// Gets the number of child objects of the designated object.
// Example: Number of files in a directory
//
// Parameters:
// In: inRef - The reference of the list.
// Out: outCount - Number of elements in this list.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetChildCount( EdsBaseRef inRef,
EdsUInt32* outCount );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetChildAtIndex
//
// Description:
// Gets an indexed child object of the designated object.
//
// Parameters:
// In: inRef - The reference of the item.
// inIndex - The index that is passed in, is zero based.
// Out: outRef - The pointer which receives reference of the
// specified index .
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetChildAtIndex( EdsBaseRef inRef,
EdsInt32 inIndex,
EdsBaseRef* outRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetParent
//
// Description:
// Gets the parent object of the designated object.
//
// Parameters:
// In: inRef - The reference of the item.
// Out: outParentRef - The pointer which receives reference.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetParent( EdsBaseRef inRef,
EdsBaseRef* outParentRef );
/******************************************************************************
*******************************************************************************
//
// Property operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsGetPropertySize
//
// Description:
// Gets the byte size and data type of a designated property
// from a camera object or image object.
//
// Parameters:
// In: inRef - The reference of the item.
// inPropertyID - The ProprtyID
// inParam - Additional information of property.
// We use this parameter in order to specify an index
// in case there are two or more values over the same ID.
// Out: outDataType - Pointer to the buffer that is to receive the property
// type data.
// outSize - Pointer to the buffer that is to receive the property
// size.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetPropertySize( EdsBaseRef inRef,
EdsPropertyID inPropertyID,
EdsInt32 inParam,
EdsDataType* outDataType,
EdsUInt32* outSize );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetPropertyData
//
// Description:
// Gets property information from the object designated in inRef.
//
// Parameters:
// In: inRef - The reference of the item.
// inPropertyID - The ProprtyID
// inParam - Additional information of property.
// We use this parameter in order to specify an index
// in case there are two or more values over the same ID.
// inPropertySize - The number of bytes of the prepared buffer
// for receive property-value.
// Out: outPropertyData - The buffer pointer to receive property-value.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetPropertyData( EdsBaseRef inRef,
EdsPropertyID inPropertyID,
EdsInt32 inParam,
EdsUInt32 inPropertySize,
EdsVoid* outPropertyData );
/*-----------------------------------------------------------------------------
//
// Function: EdsSetPropertyData
//
// Description:
// Sets property data for the object designated in inRef.
//
// Parameters:
// In: inRef - The reference of the item.
// inPropertyID - The ProprtyID
// inParam - Additional information of property.
// inPropertySize - The number of bytes of the prepared buffer
// for set property-value.
// inPropertyData - The buffer pointer to set property-value.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSetPropertyData( EdsBaseRef inRef,
EdsPropertyID inPropertyID,
EdsInt32 inParam,
EdsUInt32 inPropertySize,
const EdsVoid* inPropertyData );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetPropertyDesc
//
// Description:
// Gets a list of property data that can be set for the object
// designated in inRef, as well as maximum and minimum values.
// This API is intended for only some shooting-related properties.
//
// Parameters:
// In: inRef - The reference of the camera.
// inPropertyID - The Property ID.
// Out: outPropertyDesc - Array of the value which can be set up.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetPropertyDesc( EdsBaseRef inRef,
EdsPropertyID inPropertyID,
EdsPropertyDesc* outPropertyDesc );
/******************************************************************************
*******************************************************************************
//
// Device-list and device operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsGetCameraList
//
// Description:
// Gets camera list objects.
//
// Parameters:
// In: None
// Out: outCameraListRef - Pointer to the camera-list.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetCameraList( EdsCameraListRef* outCameraListRef );
/******************************************************************************
*******************************************************************************
//
// Camera operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsGetDeviceInfo
//
// Description:
// Gets device information, such as the device name.
// Because device information of remote cameras is stored
// on the host computer, you can use this API
// before the camera object initiates communication
// (that is, before a session is opened).
//
// Parameters:
// In: inCameraRef - The reference of the camera.
// Out: outDeviceInfo - Information as device of camera.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetDeviceInfo( EdsCameraRef inCameraRef,
EdsDeviceInfo* outDeviceInfo );
/*-----------------------------------------------------------------------------
//
// Function: EdsOpenSession
//
// Description:
// Establishes a logical connection with a remote camera.
// Use this API after getting the camera's EdsCamera object.
//
// Parameters:
// In: inCameraRef - The reference of the camera
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsOpenSession( EdsCameraRef inCameraRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsCloseSession
//
// Description:
// Closes a logical connection with a remote camera.
//
// Parameters:
// In: inCameraRef - The reference of the camera
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCloseSession( EdsCameraRef inCameraRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsSendCommand
//
// Description:
// Sends a command such as "Shoot" to a remote camera.
//
// Parameters:
// In: inCameraRef - The reference of the camera which will receive the
// command.
// inCommand - Specifies the command to be sent.
// inParam - Specifies additional command-specific information.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSendCommand( EdsCameraRef inCameraRef,
EdsCameraCommand inCommand,
EdsInt32 inParam );
/*-----------------------------------------------------------------------------
//
// Function: EdsSendStatusCommand
//
// Description:
// Sets the remote camera state or mode.
//
// Parameters:
// In: inCameraRef - The reference of the camera which will receive the
// command.
// inStatusCommand - Specifies the command to be sent.
// inParam - Specifies additional command-specific information.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSendStatusCommand(
EdsCameraRef inCameraRef,
EdsCameraStatusCommand inStatusCommand,
EdsInt32 inParam );
/*-----------------------------------------------------------------------------
//
// Function: EdsSetCapacity
//
// Description:
// Sets the remaining HDD capacity on the host computer
// (excluding the portion from image transfer),
// as calculated by subtracting the portion from the previous time.
// Set a reset flag initially and designate the cluster length
// and number of free clusters.
// Some type 2 protocol standard cameras can display the number of shots
// left on the camera based on the available disk capacity
// of the host computer.
// For these cameras, after the storage destination is set to the computer,
// use this API to notify the camera of the available disk capacity
// of the host computer.
//
// Parameters:
// In: inCameraRef - The reference of the camera which will receive the
// command.
// inCapacity - The remaining capacity of a transmission place.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSetCapacity( EdsCameraRef inCameraRef,
EdsCapacity inCapacity );
/******************************************************************************
*******************************************************************************
//
// Volume operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsGetVolumeInfo
//
// Description:
// Gets volume information for a memory card in the camera.
//
// Parameters:
// In: inVolumeRef - The reference of the volume.
// Out: outVolumeInfo - information of the volume.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetVolumeInfo( EdsVolumeRef inVolumeRef,
EdsVolumeInfo* outVolumeInfo );
/*-----------------------------------------------------------------------------
//
// Function: EdsFormatVolume
//
// Description:
// Formats volumes of memory cards in a camera.
//
// Parameters:
// In: inVolumeRef - The reference of volume .
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsFormatVolume( EdsVolumeRef inVolumeRef );
/******************************************************************************
*******************************************************************************
//
// Directory-item operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsGetDirectoryItemInfo
//
// Description:
// Gets information about the directory or file objects
// on the memory card (volume) in a remote camera.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
// Out: outDirItemInfo - information of the directory item.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetDirectoryItemInfo(
EdsDirectoryItemRef inDirItemRef,
EdsDirectoryItemInfo* outDirItemInfo );
/*-----------------------------------------------------------------------------
//
// Function: EdsDeleteDirectoryItem
//
// Description:
// Deletes a camera folder or file.
// If folders with subdirectories are designated, all files are deleted
// except protected files.
// EdsDirectoryItem objects deleted by means of this API are implicitly
// released by the EDSDK. Thus, there is no need to release them
// by means of EdsRelease.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsDeleteDirectoryItem( EdsDirectoryItemRef inDirItemRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsDownload
//
// Description:
// Downloads a file on a remote camera
// (in the camera memory or on a memory card) to the host computer.
// The downloaded file is sent directly to a file stream created in advance.
// When dividing the file being retrieved, call this API repeatedly.
// Also in this case, make the data block size a multiple of 512 (bytes),
// excluding the final block.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
// inReadSize -
//
// Out: outStream - The reference of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsDownload( EdsDirectoryItemRef inDirItemRef,
EdsUInt32 inReadSize,
EdsStreamRef outStream );
/*-----------------------------------------------------------------------------
//
// Function: EdsDownloadCancel
//
// Description:
// Must be executed when downloading of a directory item is canceled.
// Calling this API makes the camera cancel file transmission.
// It also releases resources.
// This operation need not be executed when using EdsDownloadThumbnail.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsDownloadCancel( EdsDirectoryItemRef inDirItemRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsDownloadComplete
//
// Description:
// Must be called when downloading of directory items is complete.
// Executing this API makes the camera
// recognize that file transmission is complete.
// This operation need not be executed when using EdsDownloadThumbnail.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
//
// Out: outStream - None.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsDownloadComplete( EdsDirectoryItemRef inDirItemRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsDownloadThumbnail
//
// Description:
// Extracts and downloads thumbnail information from image files in a camera.
// Thumbnail information in the camera's image files is downloaded
// to the host computer.
// Downloaded thumbnails are sent directly to a file stream created in advance.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
//
// Out: outStream - The reference of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsDownloadThumbnail( EdsDirectoryItemRef inDirItemRef,
EdsStreamRef outStream );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetAttribute
//
// Description:
// Gets attributes of files on a camera.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
// Out: outFileAttribute - Indicates the file attributes.
// As for the file attributes, OR values of the value defined
// by enum EdsFileAttributes can be retrieved. Thus, when
// determining the file attributes, you must check
// if an attribute flag is set for target attributes.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetAttribute( EdsDirectoryItemRef inDirItemRef,
EdsFileAttributes* outFileAttribute );
/*-----------------------------------------------------------------------------
//
// Function: EdsSetAttribute
//
// Description:
// Changes attributes of files on a camera.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
// inFileAttribute - Indicates the file attributes.
// As for the file attributes, OR values of the value
// defined by enum EdsFileAttributes can be retrieved.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSetAttribute(
EdsDirectoryItemRef inDirItemRef,
EdsFileAttributes inFileAttribute );
/******************************************************************************
*******************************************************************************
//
// Stream operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsCreateFileStream
//
// Description:
// Creates a new file on a host computer (or opens an existing file)
// and creates a file stream for access to the file.
// If a new file is designated before executing this API,
// the file is actually created following the timing of writing
// by means of EdsWrite or the like with respect to an open stream.
//
// Parameters:
// In: inFileName - Pointer to a null-terminated string that specifies
// the file name.
// inCreateDisposition - Action to take on files that exist,
// and which action to take when files do not exist.
// inDesiredAccess - Access to the stream (reading, writing, or both).
// Out: outStream - The reference of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCreateFileStream(
const EdsChar* inFileName,
EdsFileCreateDisposition inCreateDisposition,
EdsAccess inDesiredAccess,
EdsStreamRef* outStream );
/*-----------------------------------------------------------------------------
//
// Function: EdsCreateMemoryStream
//
// Description:
// Creates a stream in the memory of a host computer.
// In the case of writing in excess of the allocated buffer size,
// the memory is automatically extended.
//
// Parameters:
// In: inBufferSize - The number of bytes of the memory to allocate.
// Out: outStream - The reference of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCreateMemoryStream(
EdsUInt32 inBufferSize,
EdsStreamRef* outStream );
/*-----------------------------------------------------------------------------
//
// Function: EdsCreateStreamEx
//
// Description:
// An extended version of EdsCreateStreamFromFile.
// Use this function when working with Unicode file names.
//
// Parameters:
// In: inURL (for Macintosh) - Designate CFURLRef.
// inFileName (for Windows) - Designate the file name.
// inCreateDisposition - Action to take on files that exist,
// and which action to take when files do not exist.
// inDesiredAccess - Access to the stream (reading, writing, or both).
//
// Out: outStream - The reference of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCreateFileStreamEx(
#if defined __MACOS__ || TARGET_OS_IPHONE
const CFURLRef inURL,
#elif defined TARGET_MOBILE
const char *inFileName,
#else
const WCHAR* inFileName,
#endif
EdsFileCreateDisposition inCreateDisposition,
EdsAccess inDesiredAccess,
EdsStreamRef* outStream );
/*-----------------------------------------------------------------------------
//
// Function: EdsCreateMemoryStreamFromPointer
//
// Description:
// Creates a stream from the memory buffer you prepare.
// Unlike the buffer size of streams created by means of EdsCreateMemoryStream,
// the buffer size you prepare for streams created this way does not expand.
//
// Parameters:
// In: inUserBuffer - Pointer to the buffer you have prepared.
// Streams created by means of this API lead to this buffer.
// inBufferSize - The number of bytes of the memory to allocate.
// Out: outStream - The reference of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCreateMemoryStreamFromPointer(
EdsVoid* inUserBuffer,
EdsUInt32 inBufferSize,
EdsStreamRef* outStream );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetPointer
//
// Description:
// Gets the pointer to the start address of memory managed by the memory stream.
// As the EDSDK automatically resizes the buffer, the memory stream provides
// you with the same access methods as for the file stream.
// If access is attempted that is excessive with regard to the buffer size
// for the stream, data before the required buffer size is allocated
// is copied internally, and new writing occurs.
// Thus, the buffer pointer might be switched on an unknown timing.
// Caution in use is therefore advised.
//
// Parameters:
// In: inStream - Designate the memory stream for the pointer to retrieve.
// Out: outPointer - If successful, returns the pointer to the buffer
// written in the memory stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetPointer(
EdsStreamRef inStream,
EdsVoid** outPointer );
/*-----------------------------------------------------------------------------
//
// Function: EdsRead
//
// Description:
// Reads data the size of inReadSize into the outBuffer buffer,
// starting at the current read or write position of the stream.
// The size of data actually read can be designated in outReadSize.
//
// Parameters:
// In: inStreamRef - The reference of the stream or image.
// inReadSize - The number of bytes to read.
// Out: outBuffer - Pointer to the user-supplied buffer that is to receive
// the data read from the stream.
// outReadSize - The actually read number of bytes.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsRead(
EdsStreamRef inStreamRef,
EdsUInt32 inReadSize,
EdsVoid* outBuffer,
EdsUInt32* outReadSize );
/*-----------------------------------------------------------------------------
//
// Function: EdsWrite
//
// Description:
// Writes data of a designated buffer
// to the current read or write position of the stream.
//
// Parameters:
// In: inStreamRef - The reference of the stream or image.
// inWriteSize - The number of bytes to write.
// inBuffer - A pointer to the user-supplied buffer that contains
// the data to be written to the stream.
// Out: outWrittenSize - The actually written-in number of bytes.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsWrite(
EdsStreamRef inStreamRef,
EdsUInt32 inWriteSize,
const EdsVoid* inBuffer,
EdsUInt32* outWrittenSize );
/*-----------------------------------------------------------------------------
//
// Function: EdsSeek
//
// Description:
// Moves the read or write position of the stream
(that is, the file position indicator).
//
// Parameters:
// In: inStreamRef - The reference of the stream or image.
// inSeekOffset - Number of bytes to move the pointer.
// inSeekOrigin - Pointer movement mode. Must be one of the following
// values.
// kEdsSeek_Cur Move the stream pointer inSeekOffset bytes
// from the current position in the stream.
// kEdsSeek_Begin Move the stream pointer inSeekOffset bytes
// forward from the beginning of the stream.
// kEdsSeek_End Move the stream pointer inSeekOffset bytes
// from the end of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSeek(
EdsStreamRef inStreamRef,
EdsInt32 inSeekOffset,
EdsSeekOrigin inSeekOrigin );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetPosition
//
// Description:
// Gets the current read or write position of the stream
// (that is, the file position indicator).
//
// Parameters:
// In: inStreamRef - The reference of the stream or image.
// Out: outPosition - The current stream pointer.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetPosition(
EdsStreamRef inStreamRef,
EdsUInt32* outPosition );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetLength
//
// Description:
// Gets the stream size.
//
// Parameters:
// In: inStreamRef - The reference of the stream or image.
// Out: outLength - The length of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetLength(
EdsStreamRef inStreamRef,
EdsUInt32* outLength );
/*-----------------------------------------------------------------------------
//
// Function: EdsCopyData
//
// Description:
// Copies data from the copy source stream to the copy destination stream.
// The read or write position of the data to copy is determined from
// the current file read or write position of the respective stream.
// After this API is executed, the read or write positions of the copy source
// and copy destination streams are moved an amount corresponding to
// inWriteSize in the positive direction.
//
// Parameters:
// In: inStreamRef - The reference of the stream or image.
// inWriteSize - The number of bytes to copy.
// Out: outStreamRef - The reference of the stream or image.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCopyData(
EdsStreamRef inStreamRef,
EdsUInt32 inWriteSize,
EdsStreamRef outStreamRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsSetProgressCallback
//
// Description:
// Register a progress callback function.
// An event is received as notification of progress during processing that
// takes a relatively long time, such as downloading files from a
// remote camera.
// If you register the callback function, the EDSDK calls the callback
// function during execution or on completion of the following APIs.
// This timing can be used in updating on-screen progress bars, for example.
//
// Parameters:
// In: inRef - The reference of the stream or image.
// inProgressCallback - Pointer to a progress callback function.
// inProgressOption - The option about progress is specified.
// Must be one of the following values.
// kEdsProgressOption_Done
// When processing is completed,a callback function
// is called only at once.
// kEdsProgressOption_Periodically
// A callback function is performed periodically.
// inContext - Application information, passed in the argument
// when the callback function is called. Any information
// required for your program may be added.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSetProgressCallback(
EdsBaseRef inRef,
EdsProgressCallback inProgressCallback,
EdsProgressOption inProgressOption,
EdsVoid* inContext );
/******************************************************************************
*******************************************************************************
//
// Image operating functions
//
*******************************************************************************
******************************************************************************/