Function

xpc_retain

Increments the reference count of an object.

Declaration

xpc_object_t xpc_retain(xpc_object_t object);

Parameters

object

The object which is to be manipulated.

Return Value

The object which was given.

Discussion

Calls to xpc_retain() must be balanced with calls to xpc_release() to avoid leaking memory.

See Also

Miscellaneous

xpc_array_append_value

Appends an object to an XPC array.

xpc_array_apply

Invokes the given block for every value in the array.

xpc_array_create

Creates an XPC object representing an array of XPC objects.

xpc_array_create_connection

Creates a connection object from an array directly.

xpc_array_dup_fd

Gets a file descriptor from an array directly.

xpc_array_get_bool

Gets a bool primitive value from an array directly.

xpc_array_get_count

Returns the count of values currently in the array.

xpc_array_get_data

Gets a pointer to the raw bytes of a data object from an array directly.

xpc_array_get_date

Gets a date interval from an array directly.

xpc_array_get_double

Gets a double primitive value from an array directly.

xpc_array_get_int64

Gets an int64_t primitive value from an array directly.

xpc_array_get_string

Gets a C string value from an array directly.

xpc_array_get_uint64

Gets a uint64_t primitive value from an array directly.

xpc_array_get_uuid

Gets a uuid_t value from an array directly.

xpc_array_get_value

Returns the value at the specified index in the array.

xpc_array_set_bool

Inserts a bool (primitive) value into an array.

xpc_array_set_connection

Inserts a connection into an array.

xpc_array_set_data

Inserts a raw data value into an array.

xpc_array_set_date

Inserts a date value into an array.

xpc_array_set_double

Inserts a double (primitive) value into an array.

xpc_array_set_fd

Inserts a file descriptor into an array.

xpc_array_set_int64

Inserts an int64_t (primitive) value into an array.

xpc_array_set_string

Inserts a C string into an array.

xpc_array_set_uint64

Inserts a uint64_t (primitive) value into an array.

xpc_array_set_uuid

Inserts a uuid_t (primitive) value into an array.

xpc_array_set_value

Inserts the specified object into the array at the specified index.

xpc_bool_create

Creates an XPC Boolean object.

xpc_bool_get_value

Returns the underlying Boolean value from the object.

xpc_copy

Creates a copy of the object.

xpc_copy_description

Copies a debug string describing the object.

xpc_data_create

Creates an XPC object representing buffer of bytes.

xpc_data_create_with_dispatch_data

Creates an XPC object representing buffer of bytes described by the given GCD data object.

xpc_data_get_bytes

Copies the bytes stored in a data objects into the specified buffer.

xpc_data_get_bytes_ptr

Returns a pointer to the internal storage of a data object.

xpc_data_get_length

Returns the length of the data encapsulated by an XPC data object.

xpc_date_create

Creates an XPC date object.

xpc_date_create_from_current

Creates an XPC date object representing the current date.

xpc_date_get_value

Returns the underlying date interval from an object.

xpc_dictionary_apply

Invokes the given block for every key/value pair in the dictionary.

xpc_dictionary_create

Creates an XPC object representing a dictionary of XPC objects keyed to C-strings.

xpc_dictionary_create_connection

Creates a connection from a dictionary directly.

xpc_dictionary_create_reply

Creates a dictionary that is in reply to the given dictionary.

xpc_dictionary_dup_fd

Creates a file descriptor from a dictionary directly.

xpc_dictionary_get_bool

Gets a bool primitive value from a dictionary directly.

xpc_dictionary_get_count

Returns the number of values stored in the dictionary.

xpc_dictionary_get_data

Gets a raw data value from a dictionary directly.

xpc_dictionary_get_date

Gets a date value from a dictionary directly.

xpc_dictionary_get_double

Gets a double primitive value from a dictionary directly.

xpc_dictionary_get_int64

Gets an int64 primitive value from a dictionary directly.

xpc_dictionary_get_remote_connection

Returns the connection from which the dictionary was received.

xpc_dictionary_get_string

Gets a C string value from a dictionary directly.

xpc_dictionary_get_uint64

Gets a uint64 primitive value from a dictionary directly.

xpc_dictionary_get_uuid

Gets a uuid value from a dictionary directly.

xpc_dictionary_get_value

Returns the value for the specified key.

xpc_dictionary_set_bool

Inserts a bool (primitive) value into a dictionary.

xpc_dictionary_set_connection

Inserts a connection into a dictionary.

xpc_dictionary_set_data

Inserts a raw data value into a dictionary.

xpc_dictionary_set_date

Inserts a date (primitive) value into a dictionary.

xpc_dictionary_set_double

Inserts a double (primitive) value into a dictionary.

xpc_dictionary_set_fd

Inserts a file descriptor into a dictionary.

xpc_dictionary_set_int64

Inserts an int64_t (primitive) value into a dictionary.

xpc_dictionary_set_string

Inserts a C string value into a dictionary.

xpc_dictionary_set_uint64

Inserts a uint64_t (primitive) value into a dictionary.

xpc_dictionary_set_uuid

Inserts a uuid (primitive) value into an array.

xpc_dictionary_set_value

Sets the value for the specified key to the specified object.

xpc_double_create

Creates an XPC double object.

xpc_double_get_value

Returns the underlying double-precision floating point value from an object.

xpc_equal

Compares two objects for equality.

xpc_fd_create

Creates an XPC object representing a POSIX file descriptor.

xpc_fd_dup

Returns a file descriptor that is equivalent to the one boxed by the file descriptor object.

xpc_get_type

Returns the type of an object.

xpc_hash

Calculates a hash value for the given object.

xpc_int64_create

Creates an XPC signed integer object.

xpc_int64_get_value

Returns the underlying signed 64-bit integer value from an object.

xpc_null_create

Creates an XPC object representing the null object.

xpc_release

Decrements the reference count of an object.

xpc_shmem_create

Creates an XPC object representing the given shared memory region.

xpc_shmem_map

Maps the region boxed by the XPC shared memory object into the caller’s address space.

xpc_string_create

Creates an XPC object representing a NUL-terminated C-string.

xpc_string_create_with_format

Creates an XPC object representing a C-string that is generated from the given format string and arguments.

xpc_string_create_with_format_and_arguments

Creates an XPC object representing a C-string that is generated from the given format string and argument list pointer.

xpc_string_get_length

Returns the length of the underlying string.

xpc_string_get_string_ptr

Returns a pointer to the internal storage of a string object.

xpc_uint64_create

Creates an XPC unsigned integer object.

xpc_uint64_get_value

Returns the underlying unsigned 64-bit integer value from an object.

xpc_uuid_create

Creates an XPC object representing a universally-unique identifier (UUID) as described by uuid(3).

xpc_uuid_get_bytes

Copies the UUID boxed by an XPC UUID object into the given UUID buffer.