mUPnP for C
argument.c File Reference
#include <mupnp/argument.h>
#include <mupnp/util/log.h>

Functions

mUpnpArgumentmupnp_argument_new (void)
 Create a new UPnP action argument.
 
void mupnp_argument_delete (mUpnpArgument *arg)
 Destroy a UPnP action argument and free resources.
 

Function Documentation

◆ mupnp_argument_delete()

void mupnp_argument_delete ( mUpnpArgument * arg)

Destroy a UPnP action argument and free resources.

Releases all resources associated with the argument, including the argument value string and XML node references.

Parameters
argThe argument to destroy. May be NULL (no-op if NULL).
Note
After calling this function, the argument pointer is invalid.
Thread-safe: Must not be called concurrently on the same argument.
See also
mupnp_argument_new()

◆ mupnp_argument_new()

mUpnpArgument * mupnp_argument_new ( void )

Create a new UPnP action argument.

Allocates and initializes a new argument object. Arguments represent input or output parameters for UPnP actions. Each argument has:

  • A name (identifier)
  • A direction (in/out)
  • A related state variable (defines the data type)
  • A value (set during action invocation or response)

Arguments are typically created during SCPD parsing and added to action argument lists.

Returns
A newly-created mUpnpArgument on success, or NULL if memory allocation fails.
Note
The returned argument must be freed with mupnp_argument_delete() when no longer needed.
Thread-safe: Can be called concurrently from multiple threads.
See also
mupnp_argument_delete()
mupnp_argument_setdirection()
mupnp_argument_setvalue()