## AgsOscParser

AgsOscParser — the OSC parser

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_OSC_PARSER_GET_OBJ_MUTEX()
gint32 | ags_osc_parser_read_gint32 ()
gint64 | ags_osc_parser_read_gint64 ()
gfloat | ags_osc_parser_read_gfloat ()
gdouble | ags_osc_parser_read_gdouble ()
gchar * | ags_osc_parser_read_text ()
int | ags_osc_parser_osc_getc ()
void | ags_osc_parser_on_error ()
xmlDoc * | ags_osc_parser_parse_full ()
xmlNode * | ags_osc_parser_parse_bytes ()
xmlNode * | ags_osc_parser_packet ()
xmlNode * | ags_osc_parser_bundle ()
xmlNode * | ags_osc_parser_message ()
xmlNode * | ags_osc_parser_value ()
AgsOscParser * | ags_osc_parser_new ()

## Signals

gpointer | bundle | Run Last
gpointer | message | Run Last
void | on-error | Run Last
int | osc-getc | Run Last
gpointer | packet | Run Last
gpointer | parse-bytes | Run Last
gpointer | parse-full | Run Last
gpointer | value | Run Last

## Types and Values

#define | AGS_OSC_PARSER_MAX_TEXT_LENGTH
enum | AgsOscParserFlags

## Object Hierarchy

        GObject
        ╰── AgsOscParser

## Includes

    #include <ags/audio/osc/ags_osc_parser.h>

## Description

AgsOscParser reads your osc parsers.

## Functions

### AGS_OSC_PARSER_GET_OBJ_MUTEX()

    #define AGS_OSC_PARSER_GET_OBJ_MUTEX(obj) (&(((AgsOscParser *) obj)->obj_mutex))

### ags_osc_parser_read_gint32 ()

    gint32
    ags_osc_parser_read_gint32 (AgsOscParser *osc_parser);

Read 32 bit integer.

#### Parameters

osc_parser | the AgsOscParser |

#### Returns

the gint32 read

Since: 3.0.0

### ags_osc_parser_read_gint64 ()

    gint64
    ags_osc_parser_read_gint64 (AgsOscParser *osc_parser);

Read 64 bit integer.

#### Parameters

osc_parser | the AgsOscParser |

#### Returns

the gint64 read

Since: 3.0.0

### ags_osc_parser_read_gfloat ()

    gfloat
    ags_osc_parser_read_gfloat (AgsOscParser *osc_parser);

Read floating point value.

#### Parameters

osc_parser | the AgsOscParser |

#### Returns

the gfloat read

Since: 3.0.0

### ags_osc_parser_read_gdouble ()

    gdouble
    ags_osc_parser_read_gdouble (AgsOscParser *osc_parser);

Read double precision floating point value.

#### Parameters

osc_parser | the AgsOscParser |

#### Returns

the gdouble read

Since: 3.0.0

### ags_osc_parser_read_text ()

    gchar *
    ags_osc_parser_read_text (AgsOscParser *osc_parser,
                              gint length);

Read text.

#### Parameters

osc_parser | the AgsOscParser |
length | the length |

#### Returns

the text read as string

Since: 3.0.0

### ags_osc_parser_osc_getc ()

    int
    ags_osc_parser_osc_getc (AgsOscParser *osc_parser);

Read byte.

#### Parameters

osc_parser | the AgsOscParser |

#### Returns

the byte read

Since: 3.0.0

### ags_osc_parser_on_error ()

    void
    ags_osc_parser_on_error (AgsOscParser *osc_parser,
                             GError **error);

On error event.

#### Parameters

osc_parser | the AgsOscParser |
error | the GError return location |

Since: 3.0.0

### ags_osc_parser_parse_full ()

    xmlDoc *
    ags_osc_parser_parse_full (AgsOscParser *osc_parser);

Parse full document.

#### Parameters

osc_parser | the AgsOscParser |

#### Returns

the parsed XML doc.

[transfer none]

Since: 3.0.0

### ags_osc_parser_parse_bytes ()

    xmlNode *
    ags_osc_parser_parse_bytes (AgsOscParser *osc_parser,
                                guchar *osc_buffer,
                                guint buffer_length);

Parse bytes.

#### Parameters

osc_parser | the AgsOscParser |
osc_buffer | the data buffer |
buffer_length | the length of data buffer |

#### Returns

the parsed XML node.

[transfer none]

Since: 3.0.0

### ags_osc_parser_packet ()

    xmlNode *
    ags_osc_parser_packet (AgsOscParser *osc_parser);

Parse OSC packet.

#### Parameters

osc_parser | the AgsOscParser |

#### Returns

the parsed XML node.

[transfer none]

Since: 3.0.0

### ags_osc_parser_bundle ()

    xmlNode *
    ags_osc_parser_bundle (AgsOscParser *osc_parser);

Parse OSC bundle.

#### Parameters

osc_parser | the AgsOscParser |

#### Returns

the parsed XML node.

[transfer none]

Since: 3.0.0

### ags_osc_parser_message ()

    xmlNode *
    ags_osc_parser_message (AgsOscParser *osc_parser);

Parse OSC message.

#### Parameters

osc_parser | the AgsOscParser |

#### Returns

the parsed XML node.

[transfer none]

Since: 3.0.0

### ags_osc_parser_value ()

    xmlNode *
    ags_osc_parser_value (AgsOscParser *osc_parser,
                          guint v_type);

Parse OSC value.

#### Parameters

osc_parser | the AgsOscParser |
v_type | value type |

#### Returns

the parsed XML node.

[transfer none]

Since: 3.0.0

### ags_osc_parser_new ()

    AgsOscParser *
    ags_osc_parser_new ();

Creates a new instance of AgsOscParser

#### Returns

the new AgsOscParser

Since: 3.0.0

## Types and Values

### AGS_OSC_PARSER_MAX_TEXT_LENGTH

    #define AGS_OSC_PARSER_MAX_TEXT_LENGTH (4096)

### enum AgsOscParserFlags

Enum values to control the behavior or indicate internal state of AgsOscParser by enable/disable as flags.

#### Members

AGS_OSC_PARSER_EOF | the parser reached EOF |

## Signal Details

### The `“bundle”` signal

    gpointer
    user_function (AgsOscParser *osc_parser,
                   gpointer      user_data)

The ::bundle signal is emited during parsing.

#### Parameters

osc_parser | the AgsOscParser |
user_data | user data set when the signal handler was connected. |

#### Returns

The XML node representing bundle

Flags: Run Last

Since: 3.0.0

### The `“message”` signal

    gpointer
    user_function (AgsOscParser *osc_parser,
                   gpointer      user_data)

The ::message signal is emited during parsing.

#### Parameters

osc_parser | the AgsOscParser |
user_data | user data set when the signal handler was connected. |

#### Returns

The XML node representing message

Flags: Run Last

Since: 3.0.0

### The `“on-error”` signal

    void
    user_function (AgsOscParser *osc_parser,
                   gpointer      error,
                   gpointer      user_data)

The ::on-error signal is emited as error occurs.

#### Parameters

osc_parser | the AgsOscParser |
error | the return location of GError |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.0.0

### The `“osc-getc”` signal

    int
    user_function (AgsOscParser *osc_parser,
                   gpointer      user_data)

The ::osc-getc signal is emited during parsing of event.

#### Parameters

osc_parser | the AgsOscParser |
user_data | user data set when the signal handler was connected. |

#### Returns

The character read

Flags: Run Last

Since: 3.0.0

### The `“packet”` signal

    gpointer
    user_function (AgsOscParser *osc_parser,
                   gpointer      user_data)

The ::packet signal is emited during parsing.

#### Parameters

osc_parser | the AgsOscParser |
user_data | user data set when the signal handler was connected. |

#### Returns

The XML node representing packet

Flags: Run Last

Since: 3.0.0

### The `“parse-bytes”` signal

    gpointer
    user_function (AgsOscParser *osc_parser,
                   gpointer      buffer,
                   guint         buffer_length,
                   gpointer      user_data)

The ::parse-bytes signal is emited during parsing of bytes.

#### Parameters

osc_parser | the AgsOscParser |
buffer | the OSC data |
buffer_length | the buffer's length |
user_data | user data set when the signal handler was connected. |

#### Returns

The XML node representing the event

Flags: Run Last

Since: 3.0.0

### The `“parse-full”` signal

    gpointer
    user_function (AgsOscParser *osc_parser,
                   gpointer      user_data)

The ::parse-full signal is emited during parsing of osc file.

#### Parameters

osc_parser | the AgsOscParser |
user_data | user data set when the signal handler was connected. |

#### Returns

The XML doc

Flags: Run Last

Since: 3.0.0

### The `“value”` signal

    gpointer
    user_function (AgsOscParser *osc_parser,
                   guint         v_type,
                   gpointer      user_data)

The ::value signal is emited during parsing.

#### Parameters

osc_parser | the AgsOscParser |
v_type | value type |
user_data | user data set when the signal handler was connected. |

#### Returns

The XML node representing value

Flags: Run Last

Since: 3.0.0