-
Notifications
You must be signed in to change notification settings - Fork 2
/
gphoto2.i
144 lines (120 loc) · 4.13 KB
/
gphoto2.i
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
/*
* SWIG interface file for libgphoto2
*
* ChangeLog:
* * 23 Jan 2005 - Jason Watson <jason.watson@agrios.net>
* - initial version submitted to libgphoto2 project
*
* Original author for this file is Jason Watson <jason.watson@agrios.net>
*/
%module gphoto2
%javaconst(1);
%typemap(javagetcptr) SWIGTYPE %{
public static long getCPtr($javaclassname obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
%}
%{
#include <gphoto2/gphoto2-abilities-list.h>
#include <gphoto2/gphoto2-camera.h>
#include <gphoto2/gphoto2-context.h>
#include <gphoto2/gphoto2-endian.h>
#include <gphoto2/gphoto2-file.h>
#include <gphoto2/gphoto2-filesys.h>
#include <gphoto2/gphoto2.h>
#include <gphoto2/gphoto2-library.h>
#include <gphoto2/gphoto2-list.h>
#include <gphoto2/gphoto2-port.h>
#include <gphoto2/gphoto2-port-info-list.h>
#include <gphoto2/gphoto2-port-library.h>
#include <gphoto2/gphoto2-port-log.h>
#include <gphoto2/gphoto2-port-portability.h>
#include <gphoto2/gphoto2-port-portability-os2.h>
#include <gphoto2/gphoto2-port-result.h>
#include <gphoto2/gphoto2-port-version.h>
#include <gphoto2/gphoto2-result.h>
#include <gphoto2/gphoto2-setting.h>
#include <gphoto2/gphoto2-version.h>
#include <gphoto2/gphoto2-widget.h>
%}
%include "gphoto2/gphoto2-abilities-list.h"
%include "gphoto2/gphoto2-camera.h"
%include "gphoto2/gphoto2-context.h"
%include "gphoto2/gphoto2-endian.h"
%include "gphoto2/gphoto2-file.h"
%include "gphoto2/gphoto2-filesys.h"
%include "gphoto2/gphoto2.h"
%include "gphoto2/gphoto2-library.h"
%include "gphoto2/gphoto2-list.h"
%include "gphoto2/gphoto2-port.h"
%include "gphoto2/gphoto2-port-info-list.h"
%include "gphoto2/gphoto2-port-library.h"
%include "gphoto2/gphoto2-port-log.h"
%include "gphoto2/gphoto2-port-portability.h"
%include "gphoto2/gphoto2-port-portability-os2.h"
%include "gphoto2/gphoto2-port-result.h"
%include "gphoto2/gphoto2-port-version.h"
%include "gphoto2/gphoto2-result.h"
%include "gphoto2/gphoto2-setting.h"
%include "gphoto2/gphoto2-version.h"
%include "gphoto2/gphoto2-widget.h"
%inline %{
/* copied from gphoto2-context.c so that swig knows what the type is */
struct _GPContext
{
GPContextIdleFunc idle_func;
void *idle_func_data;
GPContextProgressStartFunc progress_start_func;
GPContextProgressUpdateFunc progress_update_func;
GPContextProgressStopFunc progress_stop_func;
void *progress_func_data;
GPContextErrorFunc error_func;
void *error_func_data;
GPContextQuestionFunc question_func;
void *question_func_data;
GPContextCancelFunc cancel_func;
void *cancel_func_data;
GPContextStatusFunc status_func;
void *status_func_data;
GPContextMessageFunc message_func;
void *message_func_data;
unsigned int ref_count;
};
/* copied from gphoto2-abilities-list.c so that swig knows what the type is */
struct _CameraAbilitiesList {
int count;
CameraAbilities *abilities;
};
/* copied from gphoto2-port-info-list.c so that swig knows what the type is */
struct _GPPortInfoList {
GPPortInfo *info;
unsigned int count;
};
Camera *
dereference_p_p__Camera( Camera **pp_C ) {
/* Given a pointer to a pointer to a Camera, return just the pointer to a Camera */
return (pp_C==NULL) ? NULL : *pp_C;
}
CameraAbilitiesList *
dereference_p_p__CameraAbilitiesList( CameraAbilitiesList **pp_CAL ) {
/* Given a pointer to a pointer to a CAL, return just the pointer to a CAL */
return (pp_CAL==NULL) ? NULL : *pp_CAL;
}
GPPortInfoList *
dereference_p_p__GPPortInfoList( GPPortInfoList **pp_GPPIL ) {
/* Given a pointer to a pointer to a GPPIL, return just the pointer to a GPPIL */
return (pp_GPPIL==NULL) ? NULL : *pp_GPPIL;
}
GPPortInfoList **
create_null_p_p__GPPortInfoList() {
return malloc(sizeof(GPPortInfoList **));
}
Camera **
create_null_p_p__Camera() {
return malloc(sizeof(Camera **));
}
CameraAbilitiesList **
create_null_p_p__CameraAbilitiesList() {
return malloc(sizeof(CameraAbilitiesList **));
}
%}