yast2 |
modules/Summary.ycp |
Support for summaries of the configured devices | |
|
|
This module has an unstable interface. |
Create a unified-looking RichText description of the not configured
and configured devices.
Imports
Global Functions
|
Info:
Example of Summary.ycp usage
- Example
-
{ import "Summary"; return Summary::DevicesList( [ Summary::Device("Cannon BJC-6100", "Configured as lp."), Summary::Device("Epson Stylus Color", Summary::NotConfigured()) ]); } Another example of Summary.ycp usage { import "Summary"; return Summary::DevicesList([]); }
global
NotConfigured ()
->
string
Function that creates a 'Not configured.' message.
- Return value:
-
String with the message.
global
DevicesList (list<string> devices)
->
string
Function that creates the whole final product. "Not detected" will be returned if the list is empty.
- Parameters:
-
devices A list of output of the summaryDevice() calls
- Return value:
-
The resulting text.
global
Device (string name, string description)
->
string
Function that creates description of one device.
- Parameters:
-
name The name of the device given by probing description Additional description (how it was confgured or so)
- Return value:
-
String with the item.
global
AddHeader (string summary, string header)
->
string
Add a RichText section header to an existing summary.
- Parameters:
-
summary previous RichText (HTML) summary to add to header header to add (plain text, no HTML)
- Return value:
-
the new summary including the new header
global
AddLine (string summary, string line)
->
string
Add a line to an existing summary.
- Parameters:
-
summary previous RichText (HTML) summary to add to line line to add (plain text, no HTML)
- Return value:
-
the new summary including the new line
global
AddNewLine (string summary)
->
string
Add a newline to an existing summary.
- Parameters:
-
summary previous RichText (HTML) summary to add to
- Return value:
-
the new summary
global
OpenList (string summary)
->
string
Start a list within a summary.
- Parameters:
-
summary previous RichText (HTML) summary to add to
- Return value:
-
the new summary
global
CloseList (string summary)
->
string
End a list within a summary.
- Parameters:
-
summary previous RichText (HTML) summary to add to
- Return value:
-
the new summary
global
AddListItem (string summary, string item)
->
string
Add a list item to an existing summary. Requires a previous call to 'summaryOpenList()'.
- Parameters:
-
summary previous RichText (HTML) summary to add to item item to add (plain text, no HTML)
- Return value:
-
the new summary including the new line
global
AddSimpleSection (string summary, string header, string item)
->
string
Add a simple section to an existing summary, consisting of a header and one single item.
- Parameters:
-
summary previous RichText (HTML) summary to add to header section header (plain text, no HTML) item section item (plain text, no HTML)
- Return value:
-
the new summary including the new line