From nobody Tue Feb 10 09:24:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1650481741; cv=none; d=zohomail.com; s=zohoarc; b=K3mSVFQFcZjM17CCzZ1BZLu9Ozg9X/QGp7IW2QXD/vB4Zaf63RfTpzrGGv2ZnksDYr9vuhHvu+DlnvWnAL7VgyT7YTPKAJ/9Pwql4HkDqtep4Bs2BUSbOeoW8U6E3YK4XuEO74zFFkQIvtkYloB9XlmjkfskSLEwU9j2gtbnYg0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650481741; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wSMvGXN4Fc5VWoxPkrI5qDUAKgnOJOrEv/qac8/+EvM=; b=j3e11K3KFLyMOLqcg2UKfZwY8TRdUO1JtRu9hjSfczKBYEcGHallZ5ZR3TWdbFHQ0hJ6MQMO7smCK2jSeyBpv6/f820pBrGr9v0TwUoisDPjgn8rVsev69rUsKtdQ5N8mr+UxStnpDotwZZQIbs6KbAErPDej0TDy6kiwqESixc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1650481741573696.4630073039917; Wed, 20 Apr 2022 12:09:01 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-20-WWgHxtUCMoqp88fS9oJWGA-1; Wed, 20 Apr 2022 15:08:52 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 21D81803789; Wed, 20 Apr 2022 19:08:44 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFA5340D0169; Wed, 20 Apr 2022 19:08:43 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7AE251940359; Wed, 20 Apr 2022 19:08:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D44E8194035A for ; Wed, 20 Apr 2022 19:08:39 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B79BC551E85; Wed, 20 Apr 2022 19:08:39 +0000 (UTC) Received: from tapioca.home (unknown [10.40.193.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1FCDD551E8A for ; Wed, 20 Apr 2022 19:08:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650481740; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=wSMvGXN4Fc5VWoxPkrI5qDUAKgnOJOrEv/qac8/+EvM=; b=KpSgtHr6hQ52RQBnHehnnOEa3gfY75ziqE21yFiKXRO+hAQ6HZvRD1L7pwOuPmntuCUnHk 9634u3G73inrWSWUl2lLK9U8cfdA5FFeoFruVHl8DEklpzYr+7/IuxJYOZcqpZAtwt+i5H OVV/fT+wnhPg87NWsTZRyuGsDAHWuPo= X-MC-Unique: WWgHxtUCMoqp88fS9oJWGA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Victor Toso To: libvir-list@redhat.com Subject: [PATCH v3 17/30] docstring: libvirt-common: Add 'Since version' metadata Date: Wed, 20 Apr 2022 21:08:06 +0200 Message-Id: <20220420190819.3093205-18-victortoso@redhat.com> In-Reply-To: <20220420190819.3093205-1-victortoso@redhat.com> References: <20220420190819.3093205-1-victortoso@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1650481742109100007 Content-Type: text/plain; charset="utf-8" Similarly to previous commits but with the targeting libvirt-common in a batch. Either create or append to existing docstring, the version (git tag) that a given typedef, enum value, macro or function was introduced in the format: Since: v1.2.3 Signed-off-by: Victor Toso --- include/libvirt/libvirt-common.h.in | 54 ++++++++++++++++++++------- src/util/virtypedparam-public.c | 57 +++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 13 deletions(-) diff --git a/include/libvirt/libvirt-common.h.in b/include/libvirt/libvirt-= common.h.in index 4661ee9857..c2426809b6 100644 --- a/include/libvirt/libvirt-common.h.in +++ b/include/libvirt/libvirt-common.h.in @@ -70,6 +70,8 @@ extern "C" { * * Macro providing the version of the library as * version * 1,000,000 + minor * 1000 + micro + * + * Since: v0.0.1 */ =20 # define LIBVIR_VERSION_NUMBER @LIBVIRT_VERSION_NUMBER@ @@ -86,6 +88,8 @@ extern "C" { * #if LIBVIR_CHECK_VERSION(1,1,3) * // some code that only works in 1.1.3 and newer * #endif + * + * Since: v1.2.0 */ # define LIBVIR_CHECK_VERSION(major, minor, micro) \ ((major) * 1000000 + (minor) * 1000 + (micro) <=3D LIBVIR_VERSION_NUMB= ER) @@ -104,17 +108,26 @@ extern "C" { * from a context which is not re-entrant safe. Failure to * abide by this requirement may lead to application deadlocks * or crashes. + * + * Since: v0.5.0 + * */ typedef void (*virFreeCallback)(void *opaque); =20 +/** + * virConnectCloseReason: + * + * Since: v0.10.0 + * + */ typedef enum { - VIR_CONNECT_CLOSE_REASON_ERROR =3D 0, /* Misc I/O error */ - VIR_CONNECT_CLOSE_REASON_EOF =3D 1, /* End-of-file from server */ - VIR_CONNECT_CLOSE_REASON_KEEPALIVE =3D 2, /* Keepalive timer triggered= */ - VIR_CONNECT_CLOSE_REASON_CLIENT =3D 3, /* Client requested it */ + VIR_CONNECT_CLOSE_REASON_ERROR =3D 0, /* Misc I/O error (Since: v0= .10.0) */ + VIR_CONNECT_CLOSE_REASON_EOF =3D 1, /* End-of-file from server (= Since: v0.10.0) */ + VIR_CONNECT_CLOSE_REASON_KEEPALIVE =3D 2, /* Keepalive timer triggered= (Since: v0.10.0) */ + VIR_CONNECT_CLOSE_REASON_CLIENT =3D 3, /* Client requested it (Sinc= e: v0.10.0) */ =20 # ifdef VIR_ENUM_SENTINELS - VIR_CONNECT_CLOSE_REASON_LAST + VIR_CONNECT_CLOSE_REASON_LAST /* (Since: v0.10.0) */ # endif } virConnectCloseReason; =20 @@ -122,18 +135,20 @@ typedef enum { * virTypedParameterType: * * Express the type of a virTypedParameter + * + * Since: v0.9.2 */ typedef enum { - VIR_TYPED_PARAM_INT =3D 1, /* integer case */ - VIR_TYPED_PARAM_UINT =3D 2, /* unsigned integer case */ - VIR_TYPED_PARAM_LLONG =3D 3, /* long long case */ - VIR_TYPED_PARAM_ULLONG =3D 4, /* unsigned long long case */ - VIR_TYPED_PARAM_DOUBLE =3D 5, /* double case */ - VIR_TYPED_PARAM_BOOLEAN =3D 6, /* boolean(character) case */ - VIR_TYPED_PARAM_STRING =3D 7, /* string case */ + VIR_TYPED_PARAM_INT =3D 1, /* integer case (Since: v0.9.2) */ + VIR_TYPED_PARAM_UINT =3D 2, /* unsigned integer case (Since: v0.9.2= ) */ + VIR_TYPED_PARAM_LLONG =3D 3, /* long long case (Since: v0.9.2) */ + VIR_TYPED_PARAM_ULLONG =3D 4, /* unsigned long long case (Since: v0.9= .2) */ + VIR_TYPED_PARAM_DOUBLE =3D 5, /* double case (Since: v0.9.2) */ + VIR_TYPED_PARAM_BOOLEAN =3D 6, /* boolean(character) case (Since: v0.9= .2) */ + VIR_TYPED_PARAM_STRING =3D 7, /* string case (Since: v0.9.8) */ =20 # ifdef VIR_ENUM_SENTINELS - VIR_TYPED_PARAM_LAST + VIR_TYPED_PARAM_LAST /* (Since: v0.9.10) */ # endif } virTypedParameterType; =20 @@ -143,6 +158,8 @@ typedef enum { * Flags related to libvirt APIs that use virTypedParameter. * * These enums should not conflict with those of virDomainModificationImpa= ct. + * + * Since: v0.9.8 */ typedef enum { /* 1 << 0 is reserved for virDomainModificationImpact */ @@ -157,6 +174,8 @@ typedef enum { * the user does not have to worry about it; however, manually * setting the flag can be used to reject servers that cannot * return typed strings, even if no strings would be returned. + * + * Since: v0.9.8 */ VIR_TYPED_PARAM_STRING_OKAY =3D 1 << 2, =20 @@ -166,6 +185,9 @@ typedef enum { * VIR_TYPED_PARAM_FIELD_LENGTH: * * Macro providing the field length of virTypedParameter name + * + * Since: v0.9.2 + * */ # define VIR_TYPED_PARAM_FIELD_LENGTH 80 =20 @@ -177,6 +199,9 @@ typedef enum { * The types virSchedParameter, virBlkioParameter, and * virMemoryParameter are aliases of this type, for use when * targeting libvirt earlier than 0.9.2. + * + * Since: v0.9.2 + * */ typedef struct _virTypedParameter virTypedParameter; =20 @@ -198,6 +223,9 @@ struct _virTypedParameter { * virTypedParameterPtr: * * a pointer to a virTypedParameter structure. + * + * Since: v0.9.2 + * */ typedef virTypedParameter *virTypedParameterPtr; =20 diff --git a/src/util/virtypedparam-public.c b/src/util/virtypedparam-publi= c.c index 4cb54f7ab1..2e213f2ace 100644 --- a/src/util/virtypedparam-public.c +++ b/src/util/virtypedparam-public.c @@ -127,6 +127,9 @@ virTypedParameterAssignFromStr(virTypedParameterPtr par= am, * * Returns pointer to the parameter or NULL if it does not exist in @param= s. * This function does not raise an error, even when returning NULL. + * + * Since: v1.0.2 + * */ virTypedParameterPtr virTypedParamsGet(virTypedParameterPtr params, @@ -176,6 +179,9 @@ virTypedParamsGet(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetInt(virTypedParameterPtr params, @@ -212,6 +218,9 @@ virTypedParamsGetInt(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetUInt(virTypedParameterPtr params, @@ -248,6 +257,9 @@ virTypedParamsGetUInt(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetLLong(virTypedParameterPtr params, @@ -284,6 +296,9 @@ virTypedParamsGetLLong(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetULLong(virTypedParameterPtr params, @@ -320,6 +335,9 @@ virTypedParamsGetULLong(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetDouble(virTypedParameterPtr params, @@ -356,6 +374,9 @@ virTypedParamsGetDouble(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetBoolean(virTypedParameterPtr params, @@ -394,6 +415,9 @@ virTypedParamsGetBoolean(virTypedParameterPtr params, * * Returns 1 on success, 0 when the parameter does not exist in @params, or * -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsGetString(virTypedParameterPtr params, @@ -433,6 +457,9 @@ virTypedParamsGetString(virTypedParameterPtr params, * if the parameter already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddInt(virTypedParameterPtr *params, @@ -479,6 +506,9 @@ virTypedParamsAddInt(virTypedParameterPtr *params, * error if the parameter already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddUInt(virTypedParameterPtr *params, @@ -525,6 +555,9 @@ virTypedParamsAddUInt(virTypedParameterPtr *params, * error if the parameter already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddLLong(virTypedParameterPtr *params, @@ -571,6 +604,9 @@ virTypedParamsAddLLong(virTypedParameterPtr *params, * error if the parameter already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddULLong(virTypedParameterPtr *params, @@ -617,6 +653,9 @@ virTypedParamsAddULLong(virTypedParameterPtr *params, * error if the parameter already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddDouble(virTypedParameterPtr *params, @@ -663,6 +702,9 @@ virTypedParamsAddDouble(virTypedParameterPtr *params, * error if the parameter already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddBoolean(virTypedParameterPtr *params, @@ -711,6 +753,9 @@ virTypedParamsAddBoolean(virTypedParameterPtr *params, * already exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddString(virTypedParameterPtr *params, @@ -757,6 +802,9 @@ virTypedParamsAddString(virTypedParameterPtr *params, * key @name. * * Returns 0 on success, -1 on error. + * + * Since: v1.2.17 + * */ int virTypedParamsAddStringList(virTypedParameterPtr *params, @@ -802,6 +850,9 @@ virTypedParamsAddStringList(virTypedParameterPtr *param= s, * exists in @params. * * Returns 0 on success, -1 on error. + * + * Since: v1.0.2 + * */ int virTypedParamsAddFromString(virTypedParameterPtr *params, @@ -840,6 +891,9 @@ virTypedParamsAddFromString(virTypedParameterPtr *param= s, * is not freed; use virTypedParamsFree if you want it to be freed too. * * Returns nothing. + * + * Since: v1.0.2 + * */ void virTypedParamsClear(virTypedParameterPtr params, @@ -866,6 +920,9 @@ virTypedParamsClear(virTypedParameterPtr params, * @params. * * Returns nothing. + * + * Since: v1.0.2 + * */ void virTypedParamsFree(virTypedParameterPtr params, --=20 2.35.1