XPC Services xpc.h

Overview

See the Overview for header-level documentation.

Overview

Included Headers

  • <Availability.h>

  • <dispatch/dispatch.h>

  • <sys/mman.h>

  • <uuid/uuid.h>

  • <bsm/audit.h>

  • <stdarg.h>

  • <stdbool.h>

  • <stdint.h>

  • <stdlib.h>

  • <stdio.h>

  • <string.h>

  • <unistd.h>

  • <fcntl.h>

  • <xpc/base.h>

  • <xpc/endpoint.h>

  • <xpc/connection.h>

Symbols

Miscellaneous

func xpc_array_apply(xpc_object_t, xpc_array_applier_t)

Invokes the given block for every value in the array.

func xpc_array_create(UnsafePointer<xpc_object_t>?, Int)

Creates an XPC object representing an array of XPC objects.

func xpc_array_create_connection(xpc_object_t, Int)

Creates a connection object from an array directly.

func xpc_array_dup_fd(xpc_object_t, Int)

Gets a file descriptor from an array directly.

func xpc_array_get_bool(xpc_object_t, Int)

Gets a bool primitive value from an array directly.

func xpc_array_get_count(xpc_object_t)

Returns the count of values currently in the array.

func xpc_array_get_data(xpc_object_t, Int, UnsafeMutablePointer<Int>?)

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

func xpc_array_get_date(xpc_object_t, Int)

Gets a date interval from an array directly.

func xpc_array_get_double(xpc_object_t, Int)

Gets a double primitive value from an array directly.

func xpc_array_get_int64(xpc_object_t, Int)

Gets an int64_t primitive value from an array directly.

func xpc_array_get_string(xpc_object_t, Int)

Gets a C string value from an array directly.

func xpc_array_get_uint64(xpc_object_t, Int)

Gets a uint64_t primitive value from an array directly.

func xpc_array_get_uuid(xpc_object_t, Int)

Gets a uuid_t value from an array directly.

func xpc_array_get_value(xpc_object_t, Int)

Returns the value at the specified index in the array.

func xpc_array_set_bool(xpc_object_t, Int, Bool)

Inserts a bool (primitive) value into an array.

func xpc_array_set_date(xpc_object_t, Int, Int64)

Inserts a date value into an array.

func xpc_array_set_double(xpc_object_t, Int, Double)

Inserts a double (primitive) value into an array.

func xpc_array_set_fd(xpc_object_t, Int, Int32)

Inserts a file descriptor into an array.

func xpc_array_set_int64(xpc_object_t, Int, Int64)

Inserts an int64_t (primitive) value into an array.

func xpc_array_set_uint64(xpc_object_t, Int, UInt64)

Inserts a uint64_t (primitive) value into an array.

func xpc_array_set_uuid(xpc_object_t, Int, UnsafePointer<UInt8>!)

Inserts a uuid_t (primitive) value into an array.

func xpc_array_set_value(xpc_object_t, Int, xpc_object_t)

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

func xpc_bool_create(Bool)

Creates an XPC Boolean object.

func xpc_bool_get_value(xpc_object_t)

Returns the underlying Boolean value from the object.

func xpc_copy(xpc_object_t)

Creates a copy of the object.

func xpc_copy_description(xpc_object_t)

Copies a debug string describing the object.

func xpc_data_create(UnsafeRawPointer, Int)

Creates an XPC object representing buffer of bytes.

func xpc_data_create_with_dispatch_data(__DispatchData)

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

func xpc_data_get_bytes(xpc_object_t, UnsafeMutableRawPointer, Int, Int)

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

func xpc_data_get_bytes_ptr(xpc_object_t)

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

func xpc_data_get_length(xpc_object_t)

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

func xpc_date_create(Int64)

Creates an XPC date object.

func xpc_date_create_from_current()

Creates an XPC date object representing the current date.

func xpc_date_get_value(xpc_object_t)

Returns the underlying date interval from an object.

func xpc_dictionary_apply(xpc_object_t, xpc_dictionary_applier_t)

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

func xpc_dictionary_create(UnsafePointer<UnsafePointer<Int8>>?, UnsafePointer<xpc_object_t?>?, Int)

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

func xpc_dictionary_create_connection(xpc_object_t, UnsafePointer<Int8>)

Creates a connection from a dictionary directly.

func xpc_dictionary_create_reply(xpc_object_t)

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

func xpc_dictionary_dup_fd(xpc_object_t, UnsafePointer<Int8>)

Creates a file descriptor from a dictionary directly.

func xpc_dictionary_get_bool(xpc_object_t, UnsafePointer<Int8>)

Gets a bool primitive value from a dictionary directly.

func xpc_dictionary_get_count(xpc_object_t)

Returns the number of values stored in the dictionary.

func xpc_dictionary_get_date(xpc_object_t, UnsafePointer<Int8>)

Gets a date value from a dictionary directly.

func xpc_dictionary_get_double(xpc_object_t, UnsafePointer<Int8>)

Gets a double primitive value from a dictionary directly.

func xpc_dictionary_get_int64(xpc_object_t, UnsafePointer<Int8>)

Gets an int64 primitive value from a dictionary directly.

func xpc_dictionary_get_remote_connection(xpc_object_t)

Returns the connection from which the dictionary was received.

func xpc_dictionary_get_string(xpc_object_t, UnsafePointer<Int8>)

Gets a C string value from a dictionary directly.

func xpc_dictionary_get_uint64(xpc_object_t, UnsafePointer<Int8>)

Gets a uint64 primitive value from a dictionary directly.

func xpc_dictionary_get_uuid(xpc_object_t, UnsafePointer<Int8>)

Gets a uuid value from a dictionary directly.

func xpc_dictionary_set_bool(xpc_object_t, UnsafePointer<Int8>, Bool)

Inserts a bool (primitive) value into a dictionary.

func xpc_dictionary_set_date(xpc_object_t, UnsafePointer<Int8>, Int64)

Inserts a date (primitive) value into a dictionary.

func xpc_dictionary_set_double(xpc_object_t, UnsafePointer<Int8>, Double)

Inserts a double (primitive) value into a dictionary.

func xpc_dictionary_set_int64(xpc_object_t, UnsafePointer<Int8>, Int64)

Inserts an int64_t (primitive) value into a dictionary.

func xpc_dictionary_set_uint64(xpc_object_t, UnsafePointer<Int8>, UInt64)

Inserts a uint64_t (primitive) value into a dictionary.

func xpc_dictionary_set_value(xpc_object_t, UnsafePointer<Int8>, xpc_object_t?)

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

func xpc_double_create(Double)

Creates an XPC double object.

func xpc_double_get_value(xpc_object_t)

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

func xpc_equal(xpc_object_t, xpc_object_t)

Compares two objects for equality.

func xpc_fd_create(Int32)

Creates an XPC object representing a POSIX file descriptor.

func xpc_fd_dup(xpc_object_t)

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

func xpc_get_type(xpc_object_t)

Returns the type of an object.

func xpc_hash(xpc_object_t)

Calculates a hash value for the given object.

func xpc_int64_create(Int64)

Creates an XPC signed integer object.

func xpc_int64_get_value(xpc_object_t)

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

func xpc_null_create()

Creates an XPC object representing the null object.

func xpc_shmem_create(UnsafeMutableRawPointer, Int)

Creates an XPC object representing the given shared memory region.

func xpc_shmem_map(xpc_object_t, UnsafeMutablePointer<UnsafeMutableRawPointer?>)

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

func xpc_string_create(UnsafePointer<Int8>)

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

func xpc_string_create_with_format_and_arguments(UnsafePointer<Int8>, CVaListPointer)

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

func xpc_string_get_length(xpc_object_t)

Returns the length of the underlying string.

func xpc_string_get_string_ptr(xpc_object_t)

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

func xpc_uint64_create(UInt64)

Creates an XPC unsigned integer object.

func xpc_uint64_get_value(xpc_object_t)

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

func xpc_uuid_create(UnsafePointer<UInt8>!)

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

func xpc_uuid_get_bytes(xpc_object_t)

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

Callbacks

Data Types

See the Overview for header-level documentation.