Liboobs (System configuration management) Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
Synopsis
OobsObject; OobsObjectClass; void (*OobsObjectAsyncFunc) (OobsObject *object
,OobsResult result
,gpointer data
); OobsResult oobs_object_commit (OobsObject *object
); OobsResult oobs_object_commit_async (OobsObject *object
,OobsObjectAsyncFunc func
,gpointer data
); OobsResult oobs_object_add (OobsObject *object
); OobsResult oobs_object_add_async (OobsObject *object
,OobsObjectAsyncFunc func
,gpointer data
); OobsResult oobs_object_delete (OobsObject *object
); OobsResult oobs_object_delete_async (OobsObject *object
,OobsObjectAsyncFunc func
,gpointer data
); OobsResult oobs_object_update (OobsObject *object
); OobsResult oobs_object_update_async (OobsObject *object
,OobsObjectAsyncFunc func
,gpointer data
); void oobs_object_process_requests (OobsObject *object
); gboolean oobs_object_has_updated (OobsObject *object
); void oobs_object_ensure_update (OobsObject *object
); gboolean oobs_object_authenticate (OobsObject *object
,GError **error
);
Object Hierarchy
GObject +----OobsObject +----OobsGroup +----OobsGroupsConfig +----OobsHostsConfig +----OobsIfacesConfig +----OobsNFSConfig +----OobsNTPConfig +----OobsSelfConfig +----OobsService +----OobsServicesConfig +----OobsSMBConfig +----OobsTimeConfig +----OobsUser +----OobsUsersConfig
Details
OobsObjectClass
typedef struct { GObjectClass parent_class; /* virtual methods */ void (*commit) (OobsObject *object); void (*get_update_message) (OobsObject *object); void (*update) (OobsObject *object); /* signals */ void (*updated) (OobsObject *object); void (*committed) (OobsObject *object); void (*changed) (OobsObject *object); void (*_oobs_padding1) (void); void (*_oobs_padding2) (void); } OobsObjectClass;
OobsObjectAsyncFunc ()
void (*OobsObjectAsyncFunc) (OobsObject *object
,OobsResult result
,gpointer data
);
|
|
|
|
|
oobs_object_commit ()
OobsResult oobs_object_commit (OobsObject *object
);
Commits to the system all the changes done to the configuration held by an OobsObject.
|
an OobsObject |
Returns : |
an OobsResult enum with the error code. |
oobs_object_commit_async ()
OobsResult oobs_object_commit_async (OobsObject *object
,OobsObjectAsyncFunc func
,gpointer data
);
Commits to the system all the changes done to the configuration held by an OobsObject.
This change will be asynchronous, being run the function func
when the change has been done.
|
An OobsObject. |
|
An OobsObjectAsyncFunc that will be called when the asynchronous operation has ended. |
|
Additional data to pass to func .
|
Returns : |
an OobsResult enum with the error code. Due to the asynchronous nature of the function, only OOBS_RESULT_MALFORMED and OOBS_RESULT_OK can be returned. |
oobs_object_add ()
OobsResult oobs_object_add (OobsObject *object
);
Add an OobsObject to the system's configuration. This is only supported by certain individual objects, others are added by committing a modified objects list.
|
an OobsObject |
Returns : |
an OobsResult enum with the error code. |
oobs_object_add_async ()
OobsResult oobs_object_add_async (OobsObject *object
,OobsObjectAsyncFunc func
,gpointer data
);
Add an OobsObject to the system's configuration.
This change will be asynchronous, being run the function func
when the change has been done.
|
An OobsObject. |
|
An OobsObjectAsyncFunc that will be called when the asynchronous operation has ended. |
|
Additional data to pass to func .
|
Returns : |
an OobsResult enum with the error code. Due to the asynchronous nature of the function, only OOBS_RESULT_MALFORMED and OOBS_RESULT_OK can be returned. |
oobs_object_delete ()
OobsResult oobs_object_delete (OobsObject *object
);
Delete an OobsObject from the system's configuration. This is only supported by certain individual objects, others are added by committing a modified objects list.
|
an OobsObject |
Returns : |
an OobsResult enum with the error code. |
oobs_object_delete_async ()
OobsResult oobs_object_delete_async (OobsObject *object
,OobsObjectAsyncFunc func
,gpointer data
);
Delete an OobsObject from the system's configuration.
This change will be asynchronous, being run the function func
when the change has been done.
|
An OobsObject. |
|
An OobsObjectAsyncFunc that will be called when the asynchronous operation has ended. |
|
Additional data to pass to func .
|
Returns : |
an OobsResult enum with the error code. Due to the asynchronous nature of the function, only OOBS_RESULT_MALFORMED and OOBS_RESULT_OK can be returned. |
oobs_object_update ()
OobsResult oobs_object_update (OobsObject *object
);
Synchronizes the configuration held by the OobsObject with the actual system configuration. All the changes done to the configuration held by the OobsObject will be forgotten.
|
an OobsObject |
Returns : |
an OobsResult enum with the error code. |
oobs_object_update_async ()
OobsResult oobs_object_update_async (OobsObject *object
,OobsObjectAsyncFunc func
,gpointer data
);
Synchronizes the configuration held by the OobsObject
with the actual system configuration. All the changes done
to the configuration held by the OobsObject will be forgotten.
The update operation will be asynchronous, being run the
function func
when the update has been done.
|
An OobsObject |
|
An OobsObjectAsyncFunc that will be called when the asynchronous operation has ended. |
|
Aditional data to pass to func .
|
Returns : |
an OobsResult enum with the error code. Due to the asynchronous nature of the function, only OOBS_RESULT_MALFORMED and OOBS_RESULT_OK can be returned. |
oobs_object_process_requests ()
void oobs_object_process_requests (OobsObject *object
);
Blocks until all pending asynchronous requests to this object have been processed.
|
An OobsObject |
oobs_object_has_updated ()
gboolean oobs_object_has_updated (OobsObject *object
);
Returns whether the object has been updated since its creation.
see oobs_object_update()
and oobs_object_update_async()
.
|
An OobsObject |
Returns : |
TRUE if the object has been updated. |
oobs_object_ensure_update ()
void oobs_object_ensure_update (OobsObject *object
);
Ensures that the given object has been updated. If not it either blocks until any update request sent is dispatched or updates synchronously.
|
An OobsObject |
oobs_object_authenticate ()
gboolean oobs_object_authenticate (OobsObject *object
,GError **error
);
Performs a PolicyKit authentication via the backends for the action required by the given object. User interaction will occur synchronously if needed.
You may want to check the returned error for OOBS_ERROR_AUTHENTICATION_CANCELLED
,
in which case you should avoid showing an error dialog to the user.
|
An OobsObject. |
|
Return location for error or NULL. |
Returns : |
TRUE if allowed to commit object , FALSE otherwise.
|
Property Details
The "remote-object"
property
"remote-object" gchar* : Write / Construct Only
Name of the remote object at the other side of the connection.
Default value: NULL
Signal Details
The "changed"
signal
void user_function (OobsObject *oobsobject, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
The "committed"
signal
void user_function (OobsObject *oobsobject, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
The "updated"
signal
void user_function (OobsObject *oobsobject, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |