## OobsObject

OobsObject — Base object for all configuration objects

## Functions

void | (*OobsObjectAsyncFunc) ()
OobsResult | oobs_object_commit ()
OobsResult | oobs_object_commit_async ()
OobsResult | oobs_object_add ()
OobsResult | oobs_object_add_async ()
OobsResult | oobs_object_delete ()
OobsResult | oobs_object_delete_async ()
OobsResult | oobs_object_update ()
OobsResult | oobs_object_update_async ()
void | oobs_object_process_requests ()
gboolean | oobs_object_has_updated ()
void | oobs_object_ensure_update ()
gboolean | oobs_object_authenticate ()

## Properties

gchar * | remote-object | Write / Construct Only

## Signals

void | changed | Run Last
void | committed | Run Last
void | updated | Run Last

## Object Hierarchy

        GObject
        ╰── OobsObject
            ├── OobsGroup
            ├── OobsGroupsConfig
            ├── OobsHostsConfig
            ├── OobsIfacesConfig
            ├── OobsNFSConfig
            ├── OobsNTPConfig
            ├── OobsSelfConfig
            ├── OobsService
            ├── OobsServicesConfig
            ├── OobsSMBConfig
            ├── OobsTimeConfig
            ├── OobsUser
            ╰── OobsUsersConfig

## Description

## Functions

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

#### Parameters

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.

#### Parameters

object | An OobsObject. |
func | An OobsObjectAsyncFunc that will be called when the asynchronous operation has ended. |
data | 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.

#### Parameters

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

#### Parameters

object | An OobsObject. |
func | An OobsObjectAsyncFunc that will be called when the asynchronous operation has ended. |
data | 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.

#### Parameters

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

#### Parameters

object | An OobsObject. |
func | An OobsObjectAsyncFunc that will be called when the asynchronous operation has ended. |
data | 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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

object | 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()`.

#### Parameters

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

#### Parameters

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

#### Parameters

object | An OobsObject. |
error | Return location for error or NULL. |

#### Returns

`TRUE` if allowed to commit `object` , `FALSE` otherwise.

## Property Details

### The `“remote-object”` property

      “remote-object”            gchar *

Name of the remote object at the other side of the connection.

Owner: OobsObject

Flags: Write / Construct Only

Default value: NULL

## Signal Details

### The `“changed”` signal

    void
    user_function (OobsObject *oobsobject,
                   gpointer    user_data)

Flags: Run Last

### The `“committed”` signal

    void
    user_function (OobsObject *oobsobject,
                   gpointer    user_data)

Flags: Run Last

### The `“updated”` signal

    void
    user_function (OobsObject *oobsobject,
                   gpointer    user_data)

Flags: Run Last

## See Also

OobsList