docstring: function: admin: Add 'Since version' metadata

Either create or append to existing docstring, the version (git tag)
that a given function was introduced in the format:

    Since: v1.2.3

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Victor Toso 2022-04-22 21:23:37 +02:00 committed by Andrea Bolognani
parent c628bce03b
commit 85a5d64618
2 changed files with 64 additions and 0 deletions

View File

@ -120,6 +120,8 @@ int virAdmConnectGetLibVersion(virAdmConnectPtr conn,
* @opaque: opaque client data * @opaque: opaque client data
* *
* A callback to be registered, in case a connection was closed. * A callback to be registered, in case a connection was closed.
*
* Since: v2.0.0
*/ */
typedef void (*virAdmConnectCloseFunc)(virAdmConnectPtr conn, typedef void (*virAdmConnectCloseFunc)(virAdmConnectPtr conn,
int reason, int reason,

View File

@ -84,6 +84,8 @@ virAdmGlobalInit(void)
* necessary for the application to call virAdmInitialize. * necessary for the application to call virAdmInitialize.
* *
* Returns 0 in case of success, -1 in case of error * Returns 0 in case of success, -1 in case of error
*
* Since: v2.0.0
*/ */
int int
virAdmInitialize(void) virAdmInitialize(void)
@ -200,6 +202,8 @@ virAdmGetDefaultURI(virConf *conf, char **uristr)
* Opens connection to admin interface of the daemon. * Opens connection to admin interface of the daemon.
* *
* Returns @virAdmConnectPtr object or NULL on error * Returns @virAdmConnectPtr object or NULL on error
*
* Since: v2.0.0
*/ */
virAdmConnectPtr virAdmConnectPtr
virAdmConnectOpen(const char *name, unsigned int flags) virAdmConnectOpen(const char *name, unsigned int flags)
@ -284,6 +288,8 @@ virAdmConnectOpen(const char *name, unsigned int flags)
* some other object still has a temporary reference to the connection, but the * some other object still has a temporary reference to the connection, but the
* application should not try to further use a connection after the * application should not try to further use a connection after the
* virAdmConnectClose that matches the initial open. * virAdmConnectClose that matches the initial open.
*
* Since: v2.0.0
*/ */
int int
virAdmConnectClose(virAdmConnectPtr conn) virAdmConnectClose(virAdmConnectPtr conn)
@ -319,6 +325,8 @@ virAdmConnectClose(virAdmConnectPtr conn)
* would increment the reference count. * would increment the reference count.
* *
* Returns 0 in case of success, -1 in case of failure * Returns 0 in case of success, -1 in case of failure
*
* Since: v2.0.0
*/ */
int int
virAdmConnectRef(virAdmConnectPtr conn) virAdmConnectRef(virAdmConnectPtr conn)
@ -346,6 +354,8 @@ virAdmConnectRef(virAdmConnectPtr conn)
* instead. * instead.
* *
* Returns 0 on success, -1 in case of an error. * Returns 0 on success, -1 in case of an error.
*
* Since: v2.0.0
*/ */
int int
virAdmGetVersion(unsigned long long *libVer) virAdmGetVersion(unsigned long long *libVer)
@ -377,6 +387,8 @@ virAdmGetVersion(unsigned long long *libVer)
* *
* Returns 1, if the connection is alive, 0 if there isn't an existing * Returns 1, if the connection is alive, 0 if there isn't an existing
* connection at all or the channel has already been closed, or -1 on error. * connection at all or the channel has already been closed, or -1 on error.
*
* Since: v2.0.0
*/ */
int int
virAdmConnectIsAlive(virAdmConnectPtr conn) virAdmConnectIsAlive(virAdmConnectPtr conn)
@ -411,6 +423,8 @@ virAdmConnectIsAlive(virAdmConnectPtr conn)
* *
* Returns an URI string related to the connection or NULL in case of an error. * Returns an URI string related to the connection or NULL in case of an error.
* Caller is responsible for freeing the string. * Caller is responsible for freeing the string.
*
* Since: v2.0.0
*/ */
char * char *
virAdmConnectGetURI(virAdmConnectPtr conn) virAdmConnectGetURI(virAdmConnectPtr conn)
@ -445,6 +459,8 @@ virAdmConnectGetURI(virAdmConnectPtr conn)
* context. * context.
* *
* Returns 0 on success, -1 on error * Returns 0 on success, -1 on error
*
* Since: v2.0.0
*/ */
int virAdmConnectRegisterCloseCallback(virAdmConnectPtr conn, int virAdmConnectRegisterCloseCallback(virAdmConnectPtr conn,
virAdmConnectCloseFunc cb, virAdmConnectCloseFunc cb,
@ -498,6 +514,8 @@ int virAdmConnectRegisterCloseCallback(virAdmConnectPtr conn,
* registration, it will be invoked. * registration, it will be invoked.
* *
* Returns 0 on success, -1 on error * Returns 0 on success, -1 on error
*
* Since: v2.0.0
*/ */
int virAdmConnectUnregisterCloseCallback(virAdmConnectPtr conn, int virAdmConnectUnregisterCloseCallback(virAdmConnectPtr conn,
virAdmConnectCloseFunc cb) virAdmConnectCloseFunc cb)
@ -528,6 +546,8 @@ int virAdmConnectUnregisterCloseCallback(virAdmConnectPtr conn,
* major * 1,000,000 + minor * 1,000 + release. * major * 1,000,000 + minor * 1,000 + release.
* *
* Returns 0 on success, -1 on failure and @libVer follows this format: * Returns 0 on success, -1 on failure and @libVer follows this format:
*
* Since: v2.0.0
*/ */
int virAdmConnectGetLibVersion(virAdmConnectPtr conn, int virAdmConnectGetLibVersion(virAdmConnectPtr conn,
unsigned long long *libVer) unsigned long long *libVer)
@ -556,6 +576,8 @@ int virAdmConnectGetLibVersion(virAdmConnectPtr conn,
* *
* Returns a pointer to the name or NULL. The string doesn't need to be * Returns a pointer to the name or NULL. The string doesn't need to be
* deallocated since its lifetime will be the same as the server object. * deallocated since its lifetime will be the same as the server object.
*
* Since: v2.0.0
*/ */
const char * const char *
virAdmServerGetName(virAdmServerPtr srv) virAdmServerGetName(virAdmServerPtr srv)
@ -576,6 +598,8 @@ virAdmServerGetName(virAdmServerPtr srv)
* The data structure is freed and should not be used thereafter. * The data structure is freed and should not be used thereafter.
* *
* Returns 0 on success, -1 on failure. * Returns 0 on success, -1 on failure.
*
* Since: v2.0.0
*/ */
int virAdmServerFree(virAdmServerPtr srv) int virAdmServerFree(virAdmServerPtr srv)
{ {
@ -599,6 +623,8 @@ int virAdmServerFree(virAdmServerPtr srv)
* Get client's unique numeric ID. * Get client's unique numeric ID.
* *
* Returns numeric value used for client's ID or -1 in case of an error. * Returns numeric value used for client's ID or -1 in case of an error.
*
* Since: v2.0.0
*/ */
unsigned long long unsigned long long
virAdmClientGetID(virAdmClientPtr client) virAdmClientGetID(virAdmClientPtr client)
@ -622,6 +648,8 @@ virAdmClientGetID(virAdmClientPtr client)
* Returns client's connection timestamp (seconds from epoch in UTC) or 0 * Returns client's connection timestamp (seconds from epoch in UTC) or 0
* (epoch time) if libvirt doesn't have any information about client's * (epoch time) if libvirt doesn't have any information about client's
* connection time, or -1 in case of an error. * connection time, or -1 in case of an error.
*
* Since: v2.0.0
*/ */
long long long long
virAdmClientGetTimestamp(virAdmClientPtr client) virAdmClientGetTimestamp(virAdmClientPtr client)
@ -647,6 +675,8 @@ virAdmClientGetTimestamp(virAdmClientPtr client)
* *
* Returns integer representation of the connection transport used by @client * Returns integer representation of the connection transport used by @client
* (this will be one of virClientTransport) or -1 in case of an error. * (this will be one of virClientTransport) or -1 in case of an error.
*
* Since: v2.0.0
*/ */
int int
virAdmClientGetTransport(virAdmClientPtr client) virAdmClientGetTransport(virAdmClientPtr client)
@ -666,6 +696,8 @@ virAdmClientGetTransport(virAdmClientPtr client)
* structure is freed and should not be used thereafter. * structure is freed and should not be used thereafter.
* *
* Returns 0 in success, -1 on failure. * Returns 0 in success, -1 on failure.
*
* Since: v2.0.0
*/ */
int virAdmClientFree(virAdmClientPtr client) int virAdmClientFree(virAdmClientPtr client)
{ {
@ -697,6 +729,8 @@ int virAdmClientFree(virAdmClientPtr client)
* this extra element from the final count. * this extra element from the final count.
* Caller is responsible to call virAdmServerFree() on each list element, * Caller is responsible to call virAdmServerFree() on each list element,
* followed by freeing @servers. * followed by freeing @servers.
*
* Since: v2.0.0
*/ */
int int
virAdmConnectListServers(virAdmConnectPtr conn, virAdmConnectListServers(virAdmConnectPtr conn,
@ -735,6 +769,8 @@ virAdmConnectListServers(virAdmConnectPtr conn,
* *
* Returns the requested server or NULL in case of failure. If the * Returns the requested server or NULL in case of failure. If the
* server cannot be found, then VIR_ERR_NO_SERVER error is raised. * server cannot be found, then VIR_ERR_NO_SERVER error is raised.
*
* Since: v2.0.0
*/ */
virAdmServerPtr virAdmServerPtr
virAdmConnectLookupServer(virAdmConnectPtr conn, virAdmConnectLookupServer(virAdmConnectPtr conn,
@ -776,6 +812,8 @@ virAdmConnectLookupServer(virAdmConnectPtr conn,
* VIR_THREADPOOL_WORKERS_CURRENT * VIR_THREADPOOL_WORKERS_CURRENT
* *
* Returns 0 on success, -1 in case of an error. * Returns 0 on success, -1 in case of an error.
*
* Since: v2.0.0
*/ */
int int
virAdmServerGetThreadPoolParameters(virAdmServerPtr srv, virAdmServerGetThreadPoolParameters(virAdmServerPtr srv,
@ -815,6 +853,8 @@ virAdmServerGetThreadPoolParameters(virAdmServerPtr srv,
* failure. * failure.
* *
* Returns 0 on success, -1 in case of an error. * Returns 0 on success, -1 in case of an error.
*
* Since: v2.0.0
*/ */
int int
virAdmServerSetThreadPoolParameters(virAdmServerPtr srv, virAdmServerSetThreadPoolParameters(virAdmServerPtr srv,
@ -856,6 +896,8 @@ virAdmServerSetThreadPoolParameters(virAdmServerPtr srv,
* excluding this extra element from the final count. * excluding this extra element from the final count.
* Caller is responsible to call virAdmClientFree() on each list element, * Caller is responsible to call virAdmClientFree() on each list element,
* followed by freeing @clients. * followed by freeing @clients.
*
* Since: v2.0.0
*/ */
int int
virAdmServerListClients(virAdmServerPtr srv, virAdmServerListClients(virAdmServerPtr srv,
@ -894,6 +936,8 @@ virAdmServerListClients(virAdmServerPtr srv,
* *
* Returns the requested client or NULL in case of failure. If the * Returns the requested client or NULL in case of failure. If the
* client could not be found, then VIR_ERR_NO_CLIENT error is raised. * client could not be found, then VIR_ERR_NO_CLIENT error is raised.
*
* Since: v2.0.0
*/ */
virAdmClientPtr virAdmClientPtr
virAdmServerLookupClient(virAdmServerPtr srv, virAdmServerLookupClient(virAdmServerPtr srv,
@ -940,6 +984,8 @@ virAdmServerLookupClient(virAdmServerPtr srv,
* *
* Returns 0 if the information has been successfully retrieved or -1 in case * Returns 0 if the information has been successfully retrieved or -1 in case
* of an error. * of an error.
*
* Since: v2.0.0
*/ */
int int
virAdmClientGetInfo(virAdmClientPtr client, virAdmClientGetInfo(virAdmClientPtr client,
@ -974,6 +1020,8 @@ virAdmClientGetInfo(virAdmClientPtr client,
* *
* Returns 0 if the daemon's connection with @client was closed successfully * Returns 0 if the daemon's connection with @client was closed successfully
* or -1 in case of an error. * or -1 in case of an error.
*
* Since: v2.0.0
*/ */
int virAdmClientClose(virAdmClientPtr client, int virAdmClientClose(virAdmClientPtr client,
unsigned int flags) unsigned int flags)
@ -1011,6 +1059,8 @@ int virAdmClientClose(virAdmClientPtr client,
* *
* Returns 0 on success, allocating @params to size returned in @nparams, or * Returns 0 on success, allocating @params to size returned in @nparams, or
* -1 in case of an error. Caller is responsible for deallocating @params. * -1 in case of an error. Caller is responsible for deallocating @params.
*
* Since: v2.0.0
*/ */
int int
virAdmServerGetClientLimits(virAdmServerPtr srv, virAdmServerGetClientLimits(virAdmServerPtr srv,
@ -1051,6 +1101,8 @@ virAdmServerGetClientLimits(virAdmServerPtr srv,
* *
* Returns 0 if the limits have been changed successfully or -1 in case of an * Returns 0 if the limits have been changed successfully or -1 in case of an
* error. * error.
*
* Since: v2.0.0
*/ */
int int
virAdmServerSetClientLimits(virAdmServerPtr srv, virAdmServerSetClientLimits(virAdmServerPtr srv,
@ -1089,6 +1141,8 @@ virAdmServerSetClientLimits(virAdmServerPtr srv,
* *
* Returns 0 if the TLS files have been updated successfully or -1 in case of an * Returns 0 if the TLS files have been updated successfully or -1 in case of an
* error. * error.
*
* Since: v6.2.0
*/ */
int int
virAdmServerUpdateTlsFiles(virAdmServerPtr srv, virAdmServerUpdateTlsFiles(virAdmServerPtr srv,
@ -1127,6 +1181,8 @@ virAdmServerUpdateTlsFiles(virAdmServerPtr srv,
* caller. Caller is also responsible for freeing @outputs correctly. * caller. Caller is also responsible for freeing @outputs correctly.
* *
* Returns the count of outputs in @outputs, or -1 in case of an error. * Returns the count of outputs in @outputs, or -1 in case of an error.
*
* Since: v3.0.0
*/ */
int int
virAdmConnectGetLoggingOutputs(virAdmConnectPtr conn, virAdmConnectGetLoggingOutputs(virAdmConnectPtr conn,
@ -1168,6 +1224,8 @@ virAdmConnectGetLoggingOutputs(virAdmConnectPtr conn,
* *
* Returns the number of filters returned in @filters, or -1 in case of * Returns the number of filters returned in @filters, or -1 in case of
* an error. * an error.
*
* Since: v3.0.0
*/ */
int int
virAdmConnectGetLoggingFilters(virAdmConnectPtr conn, virAdmConnectGetLoggingFilters(virAdmConnectPtr conn,
@ -1208,6 +1266,8 @@ virAdmConnectGetLoggingFilters(virAdmConnectPtr conn,
* *
* Returns 0 if the new output or the set of outputs has been defined * Returns 0 if the new output or the set of outputs has been defined
* successfully, or -1 in case of an error. * successfully, or -1 in case of an error.
*
* Since: v3.0.0
*/ */
int int
virAdmConnectSetLoggingOutputs(virAdmConnectPtr conn, virAdmConnectSetLoggingOutputs(virAdmConnectPtr conn,
@ -1246,6 +1306,8 @@ virAdmConnectSetLoggingOutputs(virAdmConnectPtr conn,
* *
* Returns 0 if the new filter or the set of filters has been defined * Returns 0 if the new filter or the set of filters has been defined
* successfully, or -1 in case of an error. * successfully, or -1 in case of an error.
*
* Since: v3.0.0
*/ */
int int
virAdmConnectSetLoggingFilters(virAdmConnectPtr conn, virAdmConnectSetLoggingFilters(virAdmConnectPtr conn,