pw_module Class Reference

A dynamically loadable module. More...

## Public Types

typedef int(* | pw_module_init_func_t) (struct pw_module *module, const char *args)
| Module init function signature. More...

## Public Member Functions

SPA_EXPORT struct pw_module * | pw_module_load (struct pw_core *core, const char *name, const char *args, struct pw_client *owner, struct pw_global *parent, struct pw_properties *properties)
| Load a module. More...
SPA_EXPORT void | pw_module_destroy (struct pw_module *module)
| Destroy a module. More...

## Detailed Description

A dynamically loadable module.

## Member Typedef Documentation

## pw_module_init_func_t

typedef int(* pw_module_init_func_t) (struct pw_module *module, const char *args)

Module init function signature.

Parameters

  module | A pw_module
  args | Arguments to the module

Returns
  0 on success, < 0 otherwise with an errno style error

A module should provide an init function with this signature. This function will be called when a module is loaded.

## Member Function Documentation

## pw_module_destroy()

SPA_EXPORT void pw_module_destroy | ( | struct pw_module * | module | ) |

Destroy a module.

Parameters

  module | the module to destroy

References pw_global_destroy(), and pw_resource_destroy().

## pw_module_load()

SPA_EXPORT struct pw_module * pw_module_load | ( | struct pw_core * | core,
|  | const char * | name,
|  | const char * | args,
|  | struct pw_client * | owner,
|  | struct pw_global * | parent,
|  | struct pw_properties * | properties
| ) |  |

Load a module.

Parameters

  | core | a pw_core
  | name | name of the module to load
  | args | A string with arguments for the module
  [out] | error | Return location for an error string, or NULL

Returns
  A pw_module if the module could be loaded, or NULL on failure.

References pw_split_strv().

The documentation for this class was generated from the following files:

- module.h
- module.c