git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
contrib: Update talk.
[libguestfs.git]
/
generator
/
generator_c.ml
diff --git
a/generator/generator_c.ml
b/generator/generator_c.ml
index
4537475
..
b392809
100644
(file)
--- a/
generator/generator_c.ml
+++ b/
generator/generator_c.ml
@@
-180,6
+180,11
@@
and generate_actions_pod () =
generate_prototype ~extern:false ~indent:" " ~handle:"g" name style;
pr "\n\n";
generate_prototype ~extern:false ~indent:" " ~handle:"g" name style;
pr "\n\n";
+ (match deprecation_notice ~prefix:"guestfs_" flags with
+ | None -> ()
+ | Some txt -> pr "%s\n\n" txt
+ );
+
let uc_shortname = String.uppercase shortname in
if optargs <> [] then (
pr "You may supply a list of optional arguments to this call.\n";
let uc_shortname = String.uppercase shortname in
if optargs <> [] then (
pr "You may supply a list of optional arguments to this call.\n";
@@
-249,16
+254,10
@@
I<The caller must free the returned buffer after use>.\n\n"
pr "%s\n\n" progress_message;
if List.mem ProtocolLimitWarning flags then
pr "%s\n\n" protocol_limit_warning;
pr "%s\n\n" progress_message;
if List.mem ProtocolLimitWarning flags then
pr "%s\n\n" protocol_limit_warning;
- if List.mem DangerWillRobinson flags then
- pr "%s\n\n" danger_will_robinson;
if List.exists (function Key _ -> true | _ -> false) (args@optargs) then
pr "This function takes a key or passphrase parameter which
could contain sensitive material. Read the section
L</KEYS AND PASSPHRASES> for more information.\n\n";
if List.exists (function Key _ -> true | _ -> false) (args@optargs) then
pr "This function takes a key or passphrase parameter which
could contain sensitive material. Read the section
L</KEYS AND PASSPHRASES> for more information.\n\n";
- (match deprecation_notice flags with
- | None -> ()
- | Some txt -> pr "%s\n\n" txt
- );
(match lookup_api_version name with
| Some version -> pr "(Added in %s)\n\n" version
| None -> ()
(match lookup_api_version name with
| Some version -> pr "(Added in %s)\n\n" version
| None -> ()
@@
-483,6
+482,10
@@
extern void guestfs_set_close_callback (guestfs_h *g, guestfs_close_cb cb, void
extern void guestfs_set_progress_callback (guestfs_h *g, guestfs_progress_cb cb, void *opaque)
GUESTFS_DEPRECATED_BY(\"set_event_callback\");
extern void guestfs_set_progress_callback (guestfs_h *g, guestfs_progress_cb cb, void *opaque)
GUESTFS_DEPRECATED_BY(\"set_event_callback\");
+/* User cancellation. */
+#define LIBGUESTFS_HAVE_USER_CANCEL 1
+extern void guestfs_user_cancel (guestfs_h *g);
+
/* Private data area. */
#define LIBGUESTFS_HAVE_SET_PRIVATE 1
extern void guestfs_set_private (guestfs_h *g, const char *key, void *data);
/* Private data area. */
#define LIBGUESTFS_HAVE_SET_PRIVATE 1
extern void guestfs_set_private (guestfs_h *g, const char *key, void *data);
@@
-625,7
+628,7
@@
extern void *guestfs_safe_malloc (guestfs_h *g, size_t nbytes);
extern void *guestfs_safe_calloc (guestfs_h *g, size_t n, size_t s);
extern const char *guestfs_tmpdir (void);
#ifdef GUESTFS_PRIVATE_FOR_EACH_DISK
extern void *guestfs_safe_calloc (guestfs_h *g, size_t n, size_t s);
extern const char *guestfs_tmpdir (void);
#ifdef GUESTFS_PRIVATE_FOR_EACH_DISK
-extern int guestfs___for_each_disk (guestfs_h *g, virDomainPtr dom, int (*)(guestfs_h *g, const char *filename, const char *format, void *data), void *data);
+extern int guestfs___for_each_disk (guestfs_h *g, virDomainPtr dom, int (*)(guestfs_h *g, const char *filename, const char *format,
int readonly,
void *data), void *data);
#endif
/* End of private functions. */
#endif
/* End of private functions. */
@@
-753,6
+756,13
@@
trace_send_line (guestfs_h *g)
";
";
+ (* Generate code for enter events. *)
+ let enter_event shortname =
+ pr " guestfs___call_callbacks_message (g, GUESTFS_EVENT_ENTER,\n";
+ pr " \"%s\", %d);\n"
+ shortname (String.length shortname)
+ in
+
(* Generate code to check String-like parameters are not passed in
* as NULL (returning an error if they are).
*)
(* Generate code to check String-like parameters are not passed in
* as NULL (returning an error if they are).
*)
@@
-1022,6
+1032,7
@@
trace_send_line (guestfs_h *g)
pr " struct guestfs_%s_list *r;\n" typ
);
pr "\n";
pr " struct guestfs_%s_list *r;\n" typ
);
pr "\n";
+ enter_event shortname;
check_null_strings shortname style;
reject_unknown_optargs shortname style;
trace_call shortname style;
check_null_strings shortname style;
reject_unknown_optargs shortname style;
trace_call shortname style;
@@
-1114,6
+1125,7
@@
trace_send_line (guestfs_h *g)
pr " const uint64_t progress_hint = 0;\n";
pr "\n";
pr " const uint64_t progress_hint = 0;\n";
pr "\n";
+ enter_event shortname;
check_null_strings shortname style;
reject_unknown_optargs shortname style;
trace_call shortname style;
check_null_strings shortname style;
reject_unknown_optargs shortname style;
trace_call shortname style;
@@
-1488,6
+1500,7
@@
and generate_linker_script () =
"guestfs_set_private";
"guestfs_set_progress_callback";
"guestfs_set_subprocess_quit_callback";
"guestfs_set_private";
"guestfs_set_progress_callback";
"guestfs_set_subprocess_quit_callback";
+ "guestfs_user_cancel";
(* Unofficial parts of the API: the bindings code use these
* functions, so it is useful to export them.
(* Unofficial parts of the API: the bindings code use these
* functions, so it is useful to export them.