/** asciimatrix
 *
 *  hyperwerk z-ctrl
 *  2005-04-09
 *
 *  (C)2005 martin rumori
 */

#ifndef LO_PARSE_KEYARGS_H_INCLUDED
#define LO_PARSE_KEYARGS_H_INCLUDED

#ifdef __cplusplus
extern "C" {
#endif

#include <lo/lo.h>

/* keyword argument struct */

/* note: lo_keyarg.types and lo_keyarg.argv as set by
 * lo_parse_keyargs() point directly into the types and argv arrays,
 * the type string and the argument vector of the entire osc message.
 * therefore lo_keyarg.types and lo_keyarg.argv are not NULL
 * terminated!
 */
typedef struct
{
  const char *key; /* keyword string. user supplied */
  const char *types; /* type signature of arguments. set by lo_parse_keyargs */
  lo_arg **argv; /* arguments given for keyword. set by lo_parse_keyargs */
  int argc; /* number of arguments for keyword. set by lo_parse_keyargs */
  const char **types_acc; /* accepted type signature for keyword. user supp. */
} lo_keyarg;


int
lo_parse_keyargs (const char *types, lo_arg **argv, int argc,
		  lo_keyarg **keyargv, int keyargc);



#ifdef __cplusplus
}
#endif

#endif /* #ifndef LO_PARSE_KEYARGS_H_INCLUDED */
