Formatting of comments
This commit is contained in:
parent
2c104daee2
commit
7eb37273b8
8 changed files with 108 additions and 27 deletions
|
|
@ -52,6 +52,7 @@
|
|||
*/
|
||||
|
||||
/*! Registered RPC callback function
|
||||
*
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] xn Request: <rpc><xn></rpc>
|
||||
* @param[out] cbret Return xml tree, eg <rpc-reply>..., <rpc-error..
|
||||
|
|
@ -69,6 +70,7 @@ typedef int (*clicon_rpc_cb)(
|
|||
);
|
||||
|
||||
/*! Registered Upgrade callback function
|
||||
*
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] xn XML tree to be updated
|
||||
* @param[in] ns Namespace of module
|
||||
|
|
@ -178,9 +180,9 @@ typedef int (plgextension_t)(clicon_handle h, yang_stmt *yext, yang_stmt *ys);
|
|||
* @param[out] authp NULL: Credentials failed, no user set (401 returned).
|
||||
* String: Credentials OK, the associated user, must be mallloc:ed
|
||||
* Parameter signtificant only if retval is 1/OK
|
||||
* @retval -1 Fatal error
|
||||
* @retval 0 Ignore, undecided, not handled, same as no callback
|
||||
* @retval 1 OK, see authp parameter for result.
|
||||
* @retval 0 Ignore, undecided, not handled, same as no callback
|
||||
* @retval -1 Fatal error
|
||||
* @note If authp returns string, it should be malloced
|
||||
*
|
||||
* @note user should be freed by caller
|
||||
|
|
@ -198,8 +200,8 @@ typedef int (plgauth_t)(clicon_handle h, void *req, clixon_auth_type_t auth_type
|
|||
* flags etc.
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] db Database name (eg "running")
|
||||
* @retval -1 Fatal error
|
||||
* @retval 0 OK
|
||||
* @retval -1 Fatal error
|
||||
*/
|
||||
typedef int (plgreset_t)(clicon_handle h, const char *db);
|
||||
|
||||
|
|
@ -215,8 +217,8 @@ typedef int (plgreset_t)(clicon_handle h, const char *db);
|
|||
* @param[in] xpath Part of state requested
|
||||
* @param[in] nsc XPATH namespace context.
|
||||
* @param[out] xtop XML tree where statedata is added
|
||||
* @retval -1 Fatal error
|
||||
* @retval 0 OK
|
||||
* @retval -1 Fatal error
|
||||
*
|
||||
* @note The system will make an xpath check and filter out non-matching trees
|
||||
* @note The system does not validate the xml, unless CLICON_VALIDATE_STATE_XML is set
|
||||
|
|
@ -231,12 +233,13 @@ typedef int (plgstatedata_t)(clicon_handle h, cvec *nsc, char *xpath, cxobj *xto
|
|||
typedef void *pagination_data;
|
||||
|
||||
/*! Lock database status has changed status
|
||||
*
|
||||
* @param[in] h Clixon handle
|
||||
* @param[in] db Database name (eg "running")
|
||||
* @param[in] lock Lock status: 0: unlocked, 1: locked
|
||||
* @param[in] id Session id (of locker/unlocker)
|
||||
* @retval -1 Fatal error
|
||||
* @retval 0 OK
|
||||
* @retval 0 OK
|
||||
* @retval -1 Fatal error
|
||||
*/
|
||||
typedef int (plglockdb_t)(clicon_handle h, char *db, int lock, int id);
|
||||
|
||||
|
|
@ -264,8 +267,8 @@ typedef char *(cli_prompthook_t)(clicon_handle, char *mode);
|
|||
* @param[in] db Name of datastore, eg "running", "startup" or "tmp"
|
||||
* @param[in] xt XML tree. Upgrade this "in place"
|
||||
* @param[in] msd Info on datastore module-state, if any
|
||||
* @retval -1 Error
|
||||
* @retval 0 OK
|
||||
* @retval -1 Error
|
||||
*/
|
||||
typedef int (datastore_upgrade_t)(clicon_handle h, const char *db, cxobj *xt, modstate_diff_t *msd);
|
||||
|
||||
|
|
@ -423,6 +426,7 @@ typedef struct {
|
|||
*/
|
||||
|
||||
/*! Plugin initialization function. Must appear in all plugins, not a clixon system function
|
||||
*
|
||||
* @param[in] h Clixon handle
|
||||
* @retval api Pointer to API struct
|
||||
* @retval NULL Failure (if clixon_err() called), module disabled otherwise.
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ clicon_strsep(char *string,
|
|||
}
|
||||
|
||||
/*! Concatenate elements of a string array into a string.
|
||||
*
|
||||
* An optional delimiter string can be specified which will be inserted betwen
|
||||
* each element.
|
||||
* @retval str Joined string. Free after use.
|
||||
|
|
@ -150,6 +151,7 @@ clicon_strjoin(int argc,
|
|||
}
|
||||
|
||||
/*! Join two string with delimiter.
|
||||
*
|
||||
* @param[in] str1 string 1 (will be freed) (optional)
|
||||
* @param[in] del delimiter string (not freed) cannot be NULL (but "")
|
||||
* @param[in] str2 string 2 (not freed) mandatory
|
||||
|
|
@ -186,6 +188,7 @@ clixon_string_del_join(char *str1,
|
|||
}
|
||||
|
||||
/*! Split a string once into two parts: prefix and suffix
|
||||
*
|
||||
* @param[in] string
|
||||
* @param[in] delim
|
||||
* @param[out] prefix If non-NULL, return malloced string, or NULL.
|
||||
|
|
@ -263,6 +266,7 @@ uri_unreserved(unsigned char in)
|
|||
}
|
||||
|
||||
/*! Percent encoding according to RFC 3986 URI Syntax
|
||||
*
|
||||
* @param[out] encp Encoded malloced output string
|
||||
* @param[in] fmt Not-encoded input string (stdarg format string)
|
||||
* @param[in] ... stdarg variable parameters
|
||||
|
|
@ -334,6 +338,7 @@ uri_percent_encode(char **encp,
|
|||
}
|
||||
|
||||
/*! Percent decoding according to RFC 3986 URI Syntax
|
||||
*
|
||||
* @param[in] enc Encoded input string
|
||||
* @param[out] strp Decoded malloced output string. Deallocate with free()
|
||||
* @retval 0 OK
|
||||
|
|
@ -388,6 +393,7 @@ uri_percent_decode(char *enc,
|
|||
}
|
||||
|
||||
/*! Encode escape characters according to XML definition
|
||||
*
|
||||
* @param[out] encp Encoded malloced output string
|
||||
* @param[in] fmt Not-encoded input string (stdarg format string)
|
||||
* @param[in] ... stdarg variable parameters
|
||||
|
|
@ -534,6 +540,7 @@ xml_chardata_encode(char **escp,
|
|||
}
|
||||
|
||||
/*! Escape characters according to XML definition and append to cbuf
|
||||
*
|
||||
* @param[in] cb CLIgen buf
|
||||
* @param[in] str Not-encoded input string
|
||||
* @retdata 0 OK
|
||||
|
|
@ -661,6 +668,7 @@ xml_chardata_decode_ampersand(char *str,
|
|||
}
|
||||
|
||||
/*! Decode escape characters according to XML definition
|
||||
*
|
||||
* @param[out] decp Decoded malloced output string
|
||||
* @param[in] fmt Encoded input string (stdarg format string)
|
||||
* @see xml_chardata_encode for encoding
|
||||
|
|
@ -834,6 +842,7 @@ uri_str2cvec(char *string,
|
|||
}
|
||||
|
||||
/*! Map from int to string using str2int map
|
||||
*
|
||||
* @param[in] ms String, integer map
|
||||
* @param[in] i Input integer
|
||||
* @retval str String value
|
||||
|
|
@ -853,6 +862,7 @@ clicon_int2str(const map_str2int *mstab,
|
|||
}
|
||||
|
||||
/*! Map from string to int using str2int map
|
||||
*
|
||||
* @param[in] ms String, integer map
|
||||
* @param[in] str Input string
|
||||
* @retval int Value
|
||||
|
|
@ -872,14 +882,15 @@ clicon_str2int(const map_str2int *mstab,
|
|||
}
|
||||
|
||||
/*! Map from string to int using binary (alphatical) search
|
||||
*
|
||||
* @param[in] ms String, integer map
|
||||
* @param[in] str Input string
|
||||
* @param[in] low Lower bound index
|
||||
* @param[in] upper Upper bound index
|
||||
* @param[in] len Length of array (max)
|
||||
* @param[out] found Integer found (can also be negative)
|
||||
* @retval 0 Not found
|
||||
* @retval 1 Found with "found" value set.
|
||||
* @retval 1 Found with "found" value set.
|
||||
* @retval 0 Not found
|
||||
* @note Assumes sorted strings, tree search
|
||||
*/
|
||||
static int
|
||||
|
|
@ -911,6 +922,7 @@ str2int_search1(const map_str2int *mstab,
|
|||
}
|
||||
|
||||
/*! Map from string to int using str2int map
|
||||
*
|
||||
* @param[in] ms String, integer map
|
||||
* @param[in] str Input string
|
||||
* @retval int Value
|
||||
|
|
@ -931,6 +943,7 @@ clicon_str2int_search(const map_str2int *mstab,
|
|||
}
|
||||
|
||||
/*! Map from string to string using str2str map
|
||||
*
|
||||
* @param[in] mstab String, string map
|
||||
* @param[in] str Input string
|
||||
* @retval str Output string
|
||||
|
|
@ -949,6 +962,7 @@ clicon_str2str(const map_str2str *mstab,
|
|||
}
|
||||
|
||||
/*! Split colon-separated node identifier into prefix and name
|
||||
*
|
||||
* @param[in] node-id
|
||||
* @param[out] prefix If non-NULL, return malloced string, or NULL.
|
||||
* @param[out] id If non-NULL, return malloced identifier.
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ yang_argument_get(yang_stmt *ys)
|
|||
*/
|
||||
/*! Set yang argument, not not copied
|
||||
* @param[in] ys Yang statement node
|
||||
* @param[in] arg Argument
|
||||
* @param[in] arg Argument, note must be malloced
|
||||
* Typically only done at parsing / initiation
|
||||
*/
|
||||
int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue