YaST2 Developers Documentation: Unknown YCP Module

Unknown YCP Module

This module has an unstable interface.

Imports

  • Popup
  • Summary

Global Functions

Info:

File: modules/Report.ycp Package: yast2 Summary: Messages handling Authors: Ladislav Slezak Flags: Stable

$Id$

Report module collects warnings and errors from modules in auto installation mode. Collected messages can be displayed later.

global SetModified () -> void

Function sets internal variable, which indicates, that any settings were modified, to "true"

global GetModified () -> boolean

Functions which returns if the settings were modified

Return value:
settings were modified
global Summary () -> string

Summary of current settings

Return value:
Html formatted configuration summary
global Import (map settings) -> boolean

Get all the Report configuration from a map.

the map may be empty.

Parameters:
settings Map with settings (keys: "messages", "errors", "warnings"; values: map
Return value:
success
global Export () -> map

Dump the Report settings to a map, for autoinstallation use.

Return value:
Map with settings
global ClearYesNoMessages () -> void

Clear stored yes/no messages

global ClearMessages () -> void

Clear stored messages

global ClearErrors () -> void

Clear stored errors

global ClearWarnings () -> void

Clear stored warnings

global ClearAll () -> void

Clear all stored messages (errors, messages and warnings)

global NumYesNoMessages () -> integer

Return number of stored yes/no messages

Return value:
number of messages
global NumMessages () -> integer

Return number of stored messages

Return value:
number of messages
global NumWarnings () -> integer

Return number of stored warnings

Return value:
number of warnings
global NumErrors () -> integer

Return number of stored errors

Return value:
number of errors
global AnyQuestion (string headline, string message, string yes_button_message, string no_button_message, symbol focus) -> boolean

Question with headline and Yes/No Buttons

Parameters:
headline Popup Headline
message Popup Message
yes_button_message Yes Button Message
no_button_message No Button Message
focus Which Button has the focus
Return value:
True if Yes is pressed, otherwise false
global ErrorAnyQuestion (string headline, string message, string yes_button_message, string no_button_message, symbol focus) -> boolean

Question with headline and Yes/No Buttons

Parameters:
headline Popup Headline
message Popup Message
yes_button_message Yes Button Message
no_button_message No Button Message
focus Which Button has the focus
Return value:
True if Yes is pressed, otherwise false
global Message (string message_string) -> void

Store new message text

Parameters:
message_string message text, it can contain new line characters ("\n")
global LongMessage (string message_string) -> void

Store new message text, the text is displayed in a richtext widget - long lines are automatically wrapped

Parameters:
message_string message text (it can contain rich text tags)
global ShowText (string headline_string, string message_string) -> void

Store new message text

Parameters:
headline_string Headline String
message_string message text, it can contain new line characters ("\n")
global Warning (string warning_string) -> void

Store new warning text

Parameters:
warning_string warning text, it can contain new line characters ("\n")
global LongWarning (string warning_string) -> void

Store new warning text, the text is displayed in a richtext widget - long lines are automatically wrapped

Parameters:
warning_string warning text (it can contain rich text tags)
global Error (string error_string) -> void

Store new error text

Parameters:
error_string error text, it can contain new line characters ("\n")
global LongError (string error_string) -> void

Store new error text, the text is displayed in a richtext widget - long lines are automatically wrapped

Parameters:
error_string error text (it can contain rich text tags)
global DisplayErrors (boolean display, integer timeout) -> void

Error popup dialog can displayed immediately when new error is stored.

This function enables or diables popuping of dialogs.

Parameters:
display if true then display error popups immediately
timeout dialog is automatically closed after timeout seconds. Value 0 means no time out, dialog will be closed only by user.
global DisplayWarnings (boolean display, integer timeout) -> void

Warning popup dialog can displayed immediately when new warningr is stored.

This function enables or diables popuping of dialogs.

Parameters:
display if true then display warning popups immediately
timeout dialog is automatically closed after timeout seconds. Value 0 means no time out, dialog will be closed only by user.
global DisplayMessages (boolean display, integer timeout) -> void

Message popup dialog can be displayed immediately when a new message is stored.

This function enables or diables popuping of dialogs.

Parameters:
display if true then display message popups immediately
timeout dialog is automatically closed after timeout seconds. Value 0 means no time out, dialog will be closed only by user.
global DisplayYesNoMessages (boolean display, integer timeout) -> void

Yes/No Message popup dialog can be displayed immediately when a new message is stored.

This function enables or diables popuping of dialogs.

Parameters:
display if true then display message popups immediately
timeout dialog is automatically closed after timeout seconds. Value 0 means no time out, dialog will be closed only by user.
global LogWarnings (boolean log) -> void

Set warnings logging to .y2log file

Parameters:
log if log is true then warning messages will be logged
global LogYesNoMessages (boolean log) -> void

Set yes/no messages logging to .y2log file

Parameters:
log if log is true then messages will be logged
global LogMessages (boolean log) -> void

Set messages logging to .y2log file

Parameters:
log if log is true then messages will be logged
global LogErrors (boolean log) -> void

Set warnings logging to .y2log file

Parameters:
log if log is true then warning messages will be logged
global GetMessages (boolean w, boolean e, boolean m, boolean ynm) -> string

Create rich text string from stored warning, message or error messages.

Every new line character "\n" is replaced by string "[BR]".

Parameters:
w include warnings in returned string
e include errors in returned string
m include messages in returned string
ynm include Yes/No messages in returned string
Return value:
rich text string