YaST2 Developers Documentation: Unknown YCP Module

Unknown YCP Module

modules/DontShowAgain.ycp
Handling "Don Not Show This Dialog Again"
  • Lukas Ocilka

This module has an unstable interface.

Imports

  • Directory
  • FileUtils

Structures

Global Functions

Local Variables

Local Functions

Info:

Module for that stores and returns the information for "Don't Show This Dialog/Question Again"

local current_configuration -> map <string, map <string, map <string, any> > >

Current configuration map

Structure $[

     // question type
     "inst-source" : $[
         // question identification (MD5sum of the question in the future?)
         "-question-ident-" : $[
             // url of the file or directory
             "ftp://abc.xyz/rtf" : $[
                 // show the dialog again
                 "show_again" : false,
                 // additional question return
                 "return" : true,
             ]
         ]
     ]
 ]
local LazyLoadCurrentConf () -> void

Function that reads the current configuration if it hasn't been read already. It must be called before every Get or Set command.

local SaveCurrentConfiguration () -> boolean

Saves the current configuration into the configuration file

global GetShowQuestionAgain (map <string, string> params) -> boolean

Returns whether the question should be shown again

Parameters:
params
Return value:
it should be shown
See
current_configuration
global SetShowQuestionAgain (map <string, string> params, boolean new_value) -> boolean

Sets and stores whether the question should be shown again. If it should be, the result is not stored since the 'show again' is the default value.

Parameters:
params
new_value
Return value:
if success
See
current_configuration
global GetDefaultReturn (map <string, string> params) -> any

Return the default return value for question that should not be shown again

Parameters:
params
Return value:
default return value
See
current_configuration
global SetDefaultReturn (map <string, string> params, any default_return) -> boolean

Sets the default return value for the question that should not be shown

Parameters:
params
default_return
Return value:
if success
See
current_configuration
global GetCurrentConfigurationMap () -> map <string, map <string, map <string, any> > >

Returns the current configuration map

Return value:
with the current configuration
See
current_configuration
global RemoveShowQuestionAgain (map <string, string> params) -> boolean

Removes one entry defined with map params

Parameters:
params
Return value:
if success
See
current_configuration