---
name: "lo_types.h"
section: "3"
platform: "linux"
package: "liblo"
version: "1:0.36-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/lo_types.h"
---

# lo\_types.h(3)

## NAME

lo\_types.h

## SYNOPSIS

### Macros

\#define **LO\_DISABLE**   0\
 Disable a boolean option.  #define **LO\_ENABLE**   1\
 Enable a boolean option.

### Typedefs

typedef struct lo\_address\_ \* **lo\_address**\
 A reference to an OSC service.  typedef struct lo\_blob\_ \* **lo\_blob**\
 A object to store an opaque binary data object.  typedef struct lo\_message\_ \* **lo\_message**\
 A low-level object used to represent messages passed over OSC.  typedef struct lo\_bundle\_ \* **lo\_bundle**\
 A low-level object used to represent bundles of messages passed over OSC.  typedef struct lo\_method\_ \* **lo\_method**\
 An object representing an method on a server.  typedef struct lo\_server\_ \* **lo\_server**\
 An object representing an instance of an OSC server.  typedef struct lo\_server\_thread\_ \* **lo\_server\_thread**\
 An object representing a thread containing an OSC server.  typedef void(\* **lo\_err\_handler**) (int num, const char \*msg, const char \*where)\
 A callback function to receive notification of an error in a server or server thread.  typedef int(\* **lo\_method\_handler**) (const char \*path, const char \*types, **lo\_arg** \*\*argv, int argc, **lo\_message** msg, void \*user\_data)\
 A callback function to receive notification of matching message arriving in the server or server thread.  typedef int(\* **lo\_bundle\_start\_handler**) (**lo\_timetag** time, void \*user\_data)\
 A callback function to receive notification of a bundle being dispatched by the server or server thread.  typedef int(\* **lo\_bundle\_end\_handler**) (void \*user\_data)\
 A callback function to receive notification of a bundle dispatch being completed by the server or server thread.  typedef int(\* **lo\_server\_thread\_init\_callback**) (**lo\_server\_thread** s, void \*user\_data)\
 A callback function to perform initialization when the server thread is started.  typedef void(\* **lo\_server\_thread\_cleanup\_callback**) (**lo\_server\_thread** s, void \*user\_data)\
 A callback function to perform cleanup when the server thread is started.

## Detailed Description

The liblo headerfile defining types used by this API.

Definition in file **lo\_types.h**.

## Macro Definition Documentation

### #define LO\_DISABLE 0

Disable a boolean option.

Definition at line **37** of file **lo\_types.h**.

### #define LO\_ENABLE 1

Enable a boolean option.

Definition at line **38** of file **lo\_types.h**.

## Typedef Documentation

### typedef struct lo\_address\_\* lo\_address

A reference to an OSC service. Created by calls to **lo\_address\_new()** or **lo\_address\_new\_from\_url()**.

Definition at line **45** of file **lo\_types.h**.

### typedef struct lo\_blob\_\* lo\_blob

A object to store an opaque binary data object. Can be passed over OSC using the 'b' type. Created by calls to **lo\_blob\_new()**.

Definition at line **52** of file **lo\_types.h**.

### typedef struct lo\_bundle\_\* lo\_bundle

A low-level object used to represent bundles of messages passed over OSC. Created by calls to **lo\_bundle\_new()**, messages can be added with calls to **lo\_bundle\_add\_message()**.

Definition at line **69** of file **lo\_types.h**.

### typedef int(\* lo\_bundle\_end\_handler) (void \*user\_data)

A callback function to receive notification of a bundle dispatch being completed by the server or server thread. If installed with lo\_server\_add\_bundle\_handlers, this callback will be called after all the messages of a bundle have been dispatched with *user\_data* set to the user\_data parameter passed to lo\_server\_add\_bundle\_handlers.

Definition at line **166** of file **lo\_types.h**.

### typedef int(\* lo\_bundle\_start\_handler) (lo\_timetag time, void \*user\_data)

A callback function to receive notification of a bundle being dispatched by the server or server thread. This callback allows applications to be aware of incoming bundles and preserve ordering and atomicity of messages in bundles.

If installed with lo\_server\_add\_bundle\_handlers, this callback will be called with *time* set to the time tag of the bundle, and *user\_data* set to the user\_data parameter passed to lo\_server\_add\_bundle\_handlers.

Note that bundles may be nested, in which case calls to the bundle start and end handlers will also be nested. The application can keep track of nested bundles in a stack-like manner by treating the start handler as "push" and the end handler as "pop". For example, a bundle containing two bundles would fire 6 callbacks: begin, begin, end, begin, end, end.

Definition at line **155** of file **lo\_types.h**.

### typedef void(\* lo\_err\_handler) (int num, const char \*msg, const char \*where)

A callback function to receive notification of an error in a server or server thread. On callback the parameters will be set to the following values:

**Parameters**

*num* An error number that can be used to identify this condition. \
 *msg* An error message describing the condidtion. \
 *where* A string describing the place the error occured - typically either a function call or method path.

Definition at line **105** of file **lo\_types.h**.

### typedef struct lo\_message\_\* lo\_message

A low-level object used to represent messages passed over OSC. Created by calls to **lo\_message\_new()**, arguments can be added with calls to lo\_message\_add\_\*().

Definition at line **60** of file **lo\_types.h**.

### typedef struct lo\_method\_\* lo\_method

An object representing an method on a server. Returned by calls to **lo\_server\_thread\_add\_method()** and **lo\_server\_add\_method()**.

Definition at line **77** of file **lo\_types.h**.

### typedef int(\* lo\_method\_handler) (const char \*path, const char \*types, lo\_arg \*\*argv, int argc, lo\_message msg, void \*user\_data)

A callback function to receive notification of matching message arriving in the server or server thread. The return value tells the method dispatcher whether this handler has dealt with the message correctly: a return value of 0 indicates that it has been handled, and it should not attempt to pass it on to any other handlers, non-0 means that it has not been handled and the dispatcher will attempt to find more handlers that match the path and types of the incoming message.

On callback the paramters will be set to the following values:

**Parameters**

*path* That path that the incoming message was sent to \
 *types* If you specided types in your method creation call then this will match those and the incoming types will have been coerced to match, otherwise it will be the types of the arguments of the incoming message. \
 *argv* An array of **lo\_arg** types containing the values, e.g. if the first argument of the incoming message is of type 'f' then the value will be found in argv\[0\]-\>f. \
 *argc* The number of arguments received. \
 *msg* A structure containing the original raw message as received. No type coercion will have occured and the data will be in OSC byte order (bigendian). \
 *user\_data* This contains the user\_data value passed in the call to lo\_server\_thread\_add\_method.

Definition at line **134** of file **lo\_types.h**.

### typedef struct lo\_server\_\* lo\_server

An object representing an instance of an OSC server. Created by calls to **lo\_server\_new()**. If you wish to have the server operate in a background thread, use **lo\_server\_thread** instead.

Definition at line **85** of file **lo\_types.h**.

### typedef struct lo\_server\_thread\_\* lo\_server\_thread

An object representing a thread containing an OSC server. Created by calls to **lo\_server\_thread\_new()**.

Definition at line **92** of file **lo\_types.h**.

### typedef void(\* lo\_server\_thread\_cleanup\_callback) (lo\_server\_thread s, void \*user\_data)

A callback function to perform cleanup when the server thread is started. If installed with lo\_server\_thread\_set\_callbacks, this callback will be called in the server thread, after the server have stopped listening and processing events, before it quits. *user\_data* is set to the user\_data parameter passed to lo\_server\_thread\_add\_functions.

Definition at line **192** of file **lo\_types.h**.

### typedef int(\* lo\_server\_thread\_init\_callback) (lo\_server\_thread s, void \*user\_data)

A callback function to perform initialization when the server thread is started. If installed with lo\_server\_thread\_set\_callbacks, this callback will be called in the server thread, just before the server starts listening for events. *user\_data* is set to the user\_data parameter passed to lo\_server\_thread\_add\_functions.

If the return value is non-zero, the thread start will be aborted.

Definition at line **179** of file **lo\_types.h**.

## Author

Generated automatically by Doxygen for liblo from the source code.
