proxy.h File Reference
Include dependency graph for proxy.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | pw_proxy_events
| Proxy events, use pw_proxy_add_listener. More...

## Macros

#define | PW_VERSION_PROXY_EVENTS 0
#define | pw_proxy_notify(p, type, event, ver, ...) spa_hook_list_call(pw_proxy_get_proxy_listeners(p),type,event,ver,## __VA_ARGS__)
#define | pw_proxy_do(p, type, method, ...) ((type*) pw_proxy_get_marshal(p)->method_marshal)->method(p, ## __VA_ARGS__)

## Functions

struct pw_proxy * | pw_proxy_new (struct pw_proxy *factory, uint32_t type, size_t user_data_size)
| Make a new proxy object. More...
void | pw_proxy_add_listener (struct pw_proxy *proxy, struct spa_hook *listener, const struct pw_proxy_events *events, void *data)
| Add an event listener to proxy. More...
void | pw_proxy_add_proxy_listener (struct pw_proxy *proxy, struct spa_hook *listener, const void *events, void *data)
| Add a listener for the events received from the remote resource. More...
void | pw_proxy_destroy (struct pw_proxy *proxy)
| destroy a proxy More...
void * | pw_proxy_get_user_data (struct pw_proxy *proxy)
| Get the user_data. More...
uint32_t | pw_proxy_get_id (struct pw_proxy *proxy)
| Get the local id of the proxy. More...
struct pw_protocol * | pw_proxy_get_protocol (struct pw_proxy *proxy)
| Get the protocol used for the proxy. More...
struct spa_hook_list * | pw_proxy_get_proxy_listeners (struct pw_proxy *proxy)
| Get the listener of proxy. More...
const struct pw_protocol_marshal * | pw_proxy_get_marshal (struct pw_proxy *proxy)
| Get the marshal functions for the proxy. More...

## Macro Definition Documentation

## pw_proxy_do

#define pw_proxy_do | ( |  | p,
|  |  | type,
|  |  | method,
|  |  | ...
| ) |  | ((type*) pw_proxy_get_marshal(p)->method_marshal)->method(p, ## __VA_ARGS__)

## pw_proxy_notify

#define pw_proxy_notify | ( |  | p,
|  |  | type,
|  |  | event,
|  |  | ver,
|  |  | ...
| ) |  | spa_hook_list_call(pw_proxy_get_proxy_listeners(p),type,event,ver,## __VA_ARGS__)

## PW_VERSION_PROXY_EVENTS

#define PW_VERSION_PROXY_EVENTS 0

## Function Documentation

## pw_proxy_add_listener()

void pw_proxy_add_listener | ( | struct pw_proxy * | proxy,
|  | struct spa_hook * | listener,
|  | const struct pw_proxy_events * | events,
|  | void * | data
| ) |  |

Add an event listener to proxy.

## pw_proxy_add_proxy_listener()

void pw_proxy_add_proxy_listener | ( | struct pw_proxy * | proxy,
|  | struct spa_hook * | listener,
|  | const void * | events,
|  | void * | data
| ) |  |

Add a listener for the events received from the remote resource.

The events depend on the type of the remote resource.

Parameters

  proxy | the proxy
  listener | listener
  events | proxied events
  data | data passed to events

## pw_proxy_destroy()

void pw_proxy_destroy | ( | struct pw_proxy * | proxy | ) |

destroy a proxy

Referenced by pw_remote_disconnect().

## pw_proxy_get_id()

uint32_t pw_proxy_get_id | ( | struct pw_proxy * | proxy | ) |

Get the local id of the proxy.

## pw_proxy_get_marshal()

const struct pw_protocol_marshal* pw_proxy_get_marshal | ( | struct pw_proxy * | proxy | ) |

Get the marshal functions for the proxy.

## pw_proxy_get_protocol()

struct pw_protocol* pw_proxy_get_protocol | ( | struct pw_proxy * | proxy | ) |

Get the protocol used for the proxy.

## pw_proxy_get_proxy_listeners()

struct spa_hook_list* pw_proxy_get_proxy_listeners | ( | struct pw_proxy * | proxy | ) |

Get the listener of proxy.

## pw_proxy_get_user_data()

void* pw_proxy_get_user_data | ( | struct pw_proxy * | proxy | ) |

Get the user_data.

The size was given in pw_proxy_new

## pw_proxy_new()

struct pw_proxy* pw_proxy_new | ( | struct pw_proxy * | factory,
|  | uint32_t | type,
|  | size_t | user_data_size
| ) |  |

Make a new proxy object.

The id can be used to bind to a remote object and can be retrieved with pw_proxy_get_id .

Parameters

  factory | factory
  type | interface type
  user_data_size | size of user data