# vx_evt_publication_state_changed

> Reference the Vivox Core SDK API.

Raised when the publication state has changed.

`#include <VxcEvents.h>`

## Public Attributes

|                                                                                              | Name                                                                                                                                                |
| -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| [vx\_evt\_base\_t](./_vxc_8h.md#typedef-vx_evt_base_t)                                       | **[base](./structvx__evt__publication__state__changed.md#variable-base)** The common properties for all events.                                     |
| [VX\_HANDLE](./_vxc_8h.md#typedef-vx_handle)                                                 | **[account\_handle](./structvx__evt__publication__state__changed.md#variable-account_handle)** The handle returned from a successful login request. |
| char \*                                                                                      | **[alias\_username](./structvx__evt__publication__state__changed.md#variable-alias_username)** The alias associated with this publication.          |
| [vx\_publication\_state\_change\_state](./_vxc_8h.md#enum-vx_publication_state_change_state) | **[state](./structvx__evt__publication__state__changed.md#variable-state)** The state of the publication.                                           |
| [vx\_buddy\_presence\_state](./_vxc_8h.md#enum-vx_buddy_presence_state)                      | **[presence](./structvx__evt__publication__state__changed.md#variable-presence)** The presence code.                                                |
| char \*                                                                                      | **[custom\_message](./structvx__evt__publication__state__changed.md#variable-custom_message)** A custom message string when presence is set.        |
| int                                                                                          | **[status\_code](./structvx__evt__publication__state__changed.md#variable-status_code)** Code used to identify why a state change has been made.    |
| char \*                                                                                      | **[status\_string](./structvx__evt__publication__state__changed.md#variable-status_string)** Text (in English) used to describe the status code.    |

## Public Attributes Documentation

### variable base

```cpp
vx_evt_base_t base;
```

The common properties for all events.

### variable account\_handle

```cpp
VX_HANDLE account_handle;
```

The handle returned from a successful login request.

### variable alias\_username

```cpp
char * alias_username;
```

The alias associated with this publication.

### variable state

```cpp
vx_publication_state_change_state state;
```

The state of the publication.

### variable presence

```cpp
vx_buddy_presence_state presence;
```

The presence code.

The following list details possible values:

* 0 - buddy\_presence\_offline
* 2 - buddy\_presence\_online
* 3 - buddy\_presence\_busy
* 4 - buddy\_presence\_brb
* 5 - buddy\_presence\_away
* 6 - buddy\_presence\_onthephone
* 7 - buddy\_presence\_outtolunch

### variable custom\_message

```cpp
char * custom_message;
```

A custom message string when presence is set.

### variable status\_code

```cpp
int status_code;
```

Code used to identify why a state change has been made.

### variable status\_string

```cpp
char * status_string;
```

Text (in English) used to describe the status code.
