OobsObject

OobsObject — Base object for all configuration objects.

Synopsis




                    OobsObject;
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_update                  (OobsObject *object);
OobsResult          oobs_object_update_async            (OobsObject *object,
                                                         OobsObjectAsyncFunc func,
                                                         gpointer data);
void                oobs_object_process_requests        (OobsObject *object);

Object Hierarchy


  GObject
   +----OobsObject
         +----OobsGroupsConfig
         +----OobsIfacesConfig
         +----OobsNFSConfig
         +----OobsNTPConfig
         +----OobsServicesConfig
         +----OobsSMBConfig
         +----OobsTimeConfig
         +----OobsUsersConfig

Properties


  "remote-object"            gchar*                : Write / Construct Only

Signals


  "changed"                                        : Run Last
  "committed"                                      : Run Last
  "updated"                                        : Run Last

Description

OobsObject is the base object for all Oobs*Config objects, contains all the necessary methods for updating/committing the configuration. Initially the returned object is empty, you will have to call oobs_object_update() or oobs_object_update_async() yourself.

Details

OobsObject

typedef struct _OobsObject OobsObject;


OobsObjectAsyncFunc ()

void                (*OobsObjectAsyncFunc)              (OobsObject *object,
                                                         OobsResult result,
                                                         gpointer data);

Specifies the type of function passed to oobs_object_update_async() and oobs_object_commit_async().

object :

OobsObject which was modified/updated.

result :

OobsResult defining the result of the operation.

data :

data passed to the function.

oobs_object_commit ()

OobsResult          oobs_object_commit                  (OobsObject *object);

Commits to the system all the changes done to the configuration held by an OobsObject.

object :

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.

object :

An OobsObject.

func :

An OobsObjectAsyncFunc that will be called when the asynchronous operation has ended.

data :

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_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.

object :

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.

object :

An OobsObject

func :

An OobsObjectAsyncFunc that will be called when the asynchronous operation has ended.

data :

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.

object :

An OobsObject

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 changed signal is emitted when the underlying configuration changes. This is just a notification, if you want to update it you will have to call oobs_object_update() or oobs_object_update_async() yourself.

oobsobject :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "committed" signal

void                user_function                      (OobsObject *oobsobject,
                                                        gpointer    user_data)       : Run Last

oobsobject :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "updated" signal

void                user_function                      (OobsObject *oobsobject,
                                                        gpointer    user_data)       : Run Last

oobsobject :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

See Also

OobsSession, OobsList