+#endif
+
+void bsendmsg(void *ctx, const char *fmt, ...)
+{
+ va_list arg_ptr;
+ va_start(arg_ptr, fmt);
+ bmsg((UAContext *)ctx, fmt, arg_ptr);
+ va_end(arg_ptr);
+}
+
+/*
+ * The following UA methods are mainly intended for GUI
+ * programs
+ */
+/*
+ * This is a message that should be displayed on the user's
+ * console.
+ */
+void UAContext::send_msg(const char *fmt, ...)
+{
+ va_list arg_ptr;
+ va_start(arg_ptr, fmt);
+ bmsg(this, fmt, arg_ptr);
+ va_end(arg_ptr);
+}
+
+
+/*
+ * This is an error condition with a command. The gui should put
+ * up an error or critical dialog box. The command is aborted.
+ */
+void UAContext::error_msg(const char *fmt, ...)
+{
+ BSOCK *bs = UA_sock;
+ va_list arg_ptr;
+
+ if (bs && api) bs->signal(BNET_ERROR_MSG);
+ va_start(arg_ptr, fmt);
+ bmsg(this, fmt, arg_ptr);
+ va_end(arg_ptr);
+}
+
+/*
+ * This is a warning message, that should bring up a warning
+ * dialog box on the GUI. The command is not aborted, but something
+ * went wrong.
+ */
+void UAContext::warning_msg(const char *fmt, ...)
+{
+ BSOCK *bs = UA_sock;
+ va_list arg_ptr;
+
+ if (bs && api) bs->signal(BNET_WARNING_MSG);
+ va_start(arg_ptr, fmt);
+ bmsg(this, fmt, arg_ptr);
+ va_end(arg_ptr);
+}
+
+/*
+ * This is an information message that should probably be put
+ * into the status line of a GUI program.
+ */
+void UAContext::info_msg(const char *fmt, ...)
+{
+ BSOCK *bs = UA_sock;
+ va_list arg_ptr;
+
+ if (bs && api) bs->signal(BNET_INFO_MSG);
+ va_start(arg_ptr, fmt);
+ bmsg(this, fmt, arg_ptr);
+ va_end(arg_ptr);
+}