Name

org.opensuse.Agama1.Questions

Methods

New             (IN  s     class,
                 IN  s     text,
                 IN  as    options,
                 IN  s     default_option,
                 IN  a{ss} data,
                 OUT o     unnamed_arg5);
NewWithPassword (IN  s     class,
                 IN  s     text,
                 IN  as    options,
                 IN  s     default_option,
                 IN  a{ss} data,
                 OUT o     unnamed_arg5);
Delete          (IN  o     question);
AddAnswerFile   (IN  s     path);

Properties

Interactive  readwrite  b

Description

Agama offers a mechanism to communicate with clients. The D-Bus service exports a *Questions* object that implements the *org.freedesktop.DBus.ObjectManager* interface. Individual questions are dynamically exported in a tree under the */org/opensuse/Agama1.Questions* path, for example:

~~~ /org/opensuse/Agama1/Questions /org/opensuse/Agama1/Questions/1 /org/opensuse/Agama1/Questions/2 /org/opensuse/Agama1/Questions/4 ~~~

Each D-Bus question implements its own set of interfaces, depending on the type of question. For example, a generic question implements *org.opensuse.Agama.Question1*. And a question asking for the activation of a LUKS device also implements *org.opensuse.Agama1.Questions.WithPassword*. Questions can be "unexported" from the ObjectManager tree. The service typically unexports a question when the question is answered and the answer is successfully read.

Method Details

The New() method

New (IN  s     class,
     IN  s     text,
     IN  as    options,
     IN  s     default_option,
     IN  a{ss} data,
     OUT o     unnamed_arg5);

similar questions asked multiple times or for matching in automatic answers. text: human string with question text options: list of possible options that can be used as answer. Example is "OK", "Cancel". default_option: safe default answer that is used e.g. for focus in UI or by non-interactive answering. It has to be included in options parameter. data: additional data that is specific to given question class. Can be used for additional details about question that helps with UI or with matching automatic answers.

Creates new generic question. Returns the object path of the created question.

IN s class:

string identifier of the same questions. Useful to identify

IN s text:

IN as options:

IN s default_option:

IN a{ss} data:

OUT o unnamed_arg5:

The NewWithPassword() method

NewWithPassword (IN  s     class,
                 IN  s     text,
                 IN  as    options,
                 IN  s     default_option,
                 IN  a{ss} data,
                 OUT o     unnamed_arg5);

similar questions asked multiple times or for matching in automatic answers. text: human string with question text options: list of possible options that can be used as answer. Example is "OK", "Cancel". default_option: safe default answer that is used e.g. for focus in UI or by non-interactive answering. It has to be included in options parameter. data: additional data that is specific to given question class. Can be used for additional details about question that helps with UI or with matching automatic answers.

Creates new question with generic base and additional WithPassword interface. Returns the object path of the created question.

IN s class:

string identifier of the same questions. Useful to identify

IN s text:

IN as options:

IN s default_option:

IN a{ss} data:

OUT o unnamed_arg5:

The Delete() method

Delete (IN  o question);

Deletes question. Useful when question is answered and service that asks already read answer. Usually called by the one that previously created it.

IN o question:

object path of question that should be deleted.

The AddAnswerFile() method

AddAnswerFile (IN  s path);

Adds file with list of predefined answers that will be used to automatically answer matching questions.

IN s path:

Local fs path to answers file in yaml format.

Property Details

The "Interactive" property

Interactive  readwrite  b