NMObject: libnm Reference Manual

## NMObject NMObject |

## Functions

const char * | nm_object_get_path ()
struct _NMClient * | nm_object_get_client ()

## Properties

NMClient * | client | Read
char * | path | Read

## Types and Values

#define | NM_OBJECT_PATH
#define | NM_OBJECT_CLIENT
| NMObject

## Object Hierarchy

        GObject
        ╰── NMObject
            ├── NMAccessPoint
            ├── NMActiveConnection
            ├── NMCheckpoint
            ├── NMDevice
            ├── NMDhcpConfig
            ├── NMIPConfig
            ├── NMRemoteConnection
            ├── NMWifiP2PPeer
            ╰── NMWimaxNsp

## Description

## Functions

### nm_object_get_path ()

    const char *
    nm_object_get_path (NMObject *object);

Gets the DBus path of the NMObject.

#### Parameters

object | a NMObject |

#### Returns

the object's path. This is the internal string used by the object, and must not be modified.

Note that the D-Bus path of an NMObject never changes, even if the instance gets removed from the cache. To find out whether the object is still alive/cached, check `nm_object_get_client()`.

### nm_object_get_client ()

    struct _NMClient *
    nm_object_get_client (NMObject *object);

Returns the NMClient instance in which object is cached. Also, if the object got removed from the client cached, this returns `NULL`. So it can be used to check whether the object is still alive.

#### Parameters

object | a NMObject |

#### Returns

the NMClient cache in which the object can be found, or `NULL` if the object is no longer cached.

[transfer none]

Since: 1.24

## Types and Values

### NM_OBJECT_PATH

    #define NM_OBJECT_PATH   "path"

### NM_OBJECT_CLIENT

    #define NM_OBJECT_CLIENT "client"

### NMObject

    typedef struct _NMObject NMObject;

## Property Details

### The `“client”` property

      “client”                   NMClient *

The NMClient instance as returned by `nm_object_get_client()`.

When an NMObject gets removed from the NMClient cache, the NMObject:path property stays unchanged, but this client instance gets reset to `NULL`. You can use this property to track removal of the object from the cache.

Owner: NMObject

Flags: Read

Since: 1.34

### The `“path”` property

      “path”                     char *

The D-Bus object path.

The D-Bus path of an object instance never changes, even if the object gets removed from the cache. To see whether the object is still in the cache, check NMObject:client.

Owner: NMObject

Flags: Read

Default value: NULL