Create a new UPnP action instance.
Allocates and initializes a new UPnP action object. Actions represent operations that can be invoked on a UPnP service, similar to remote procedure calls. Each action has:
- A name (action identifier)
- Input arguments (parameters passed to the action)
- Output arguments (return values from the action)
- A listener callback (for device-side implementations)
- Status information (for responses and errors)
The function initializes:
- Argument list (empty)
- UPnP status object for error reporting
- Listener callback (NULL, must be set for device implementations)
- Returns
- A newly-created mUpnpAction on success, or NULL if memory allocation fails.
- Note
- The returned action must be freed with mupnp_action_delete() when no longer needed.
-
Thread-safe: Can be called concurrently from multiple threads.
-
For device implementations, set an action listener with the listener field to handle invocations from control points.
-
Actions are typically created during service initialization when parsing the SCPD document.
- See also
- mupnp_action_delete()
-
mupnp_action_setactionnode()
-
MUPNP_ACTION_LISTNER