3 static PyObject
*version_load_from_default_descriptions
() {
5 OSyncList
*list
= osync_version_load_from_default_descriptions
(&err);
7 if
(!raise_exception_on_error
(err
))
8 wrapper_exception
("osync_version_load_from_descriptions failed but did not set error code");
11 return osynclist_to_pylist
(list
, SWIGTYPE_p_Version
);
16 typedef struct
{} Version
;
20 Version
*version
= osync_version_new
(&err);
21 if
(raise_exception_on_error
(err
))
28 osync_version_unref
(self
);
33 return osync_version_get_plugin
(self
);
37 char
*get_priority
() {
38 return osync_version_get_priority
(self
);
43 return osync_version_get_vendor
(self
);
46 char
*get_modelversion
() {
47 return osync_version_get_modelversion
(self
);
50 char
*get_hardwareversion
() {
51 return osync_version_get_hardwareversion
(self
);
55 char
*get_firmwareversion
() {
56 return osync_version_get_firmwareversion
(self
);
60 char
*get_softwareversion
() {
61 return osync_version_get_softwareversion
(self
);
64 char
*get_identifier
() {
65 return osync_version_get_identifier
(self
);
69 void set_priority
(char
*priority
) {
70 osync_version_set_priority
(self
, priority
);
73 void set_vendor
(char
*vendor
) {
74 osync_version_set_vendor
(self
, vendor
);
77 void set_plugin
(char
*plugin
) {
78 osync_version_set_plugin
(self
, plugin
);
81 void set_modelversion
(char
*modelversion
) {
82 osync_version_set_modelversion
(self
, modelversion
);
85 void set_firmwareversion
(char
*firmwareversion
) {
86 osync_version_set_firmwareversion
(self
, firmwareversion
);
89 void set_softwareversion
(char
*softwareversion
) {
90 osync_version_set_softwareversion
(self
, softwareversion
);
93 void set_hardwareversion
(char
*hardwareversion
) {
94 osync_version_set_hardwareversion
(self
, hardwareversion
);
97 void set_identifier
(char
*identifier
) {
98 osync_version_set_identifier
(self
, identifier
);
101 int matches
(Version
*pattern
) {
103 int ret
= osync_version_matches
(pattern
, self
, &err);
104 if
(!raise_exception_on_error
(err
) && ret == -1)
105 wrapper_exception
("osync_version_matches failed but did not set error code");
109 Capabilities
*find_capabilities
() {
111 Capabilities
*ret
= osync_version_find_capabilities
(self
, &err);
112 if
(!raise_exception_on_error
(err
) && !ret)
113 wrapper_exception
("osync_version_find_capabilities failed but did not set error");
115 osync_capabilities_ref
(ret
);
120 plugin
= property
(get_plugin
, set_plugin
)
121 priority
= property
(get_priority
, set_priority
)
122 vendor
= property
(get_vendor
, set_vendor
)
123 modelversion
= property
(get_modelversion
, set_modelversion
)
124 firmwareversion
= property
(get_firmwareversion
, set_firmwareversion
)
125 softwareversion
= property
(get_softwareversion
, set_softwareversion
)
126 hardwareversion
= property
(get_hardwareversion
, set_hardwareversion
)
127 identifier
= property
(get_identifier
, set_identifier
)