From patchwork Thu Jun 23 16:27:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 70768 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp518585qgy; Thu, 23 Jun 2016 09:31:01 -0700 (PDT) X-Received: by 10.195.11.131 with SMTP id ei3mr22752725wjd.102.1466699460755; Thu, 23 Jun 2016 09:31:00 -0700 (PDT) Return-Path: Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com. [209.132.183.37]) by mx.google.com with ESMTPS id x2si1176552wjc.5.2016.06.23.09.31.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 09:31:00 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.37 as permitted sender) client-ip=209.132.183.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.37 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5NGRust034925; Thu, 23 Jun 2016 12:27:56 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u5NGRtpr020061 for ; Thu, 23 Jun 2016 12:27:55 -0400 Received: from colepc.redhat.com (ovpn-116-65.rdu2.redhat.com [10.10.116.65]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5NGRs9L010505; Thu, 23 Jun 2016 12:27:55 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 23 Jun 2016 12:27:44 -0400 Message-Id: <760d8a28a2fbc89575362665bdb0c140e99b23bc.1466699232.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/6] events: Privatize virObjectEventCallback X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com It's only used in object_event.c, so remove it from the header. We need to move the _virObjectEventCallback definition earlier as a result. --- src/conf/object_event.c | 36 +++++++++++++++++++----------------- src/conf/object_event.h | 3 --- 2 files changed, 19 insertions(+), 20 deletions(-) -- 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/conf/object_event.c b/src/conf/object_event.c index 06eedff..95bf3e6 100644 --- a/src/conf/object_event.c +++ b/src/conf/object_event.c @@ -38,6 +38,25 @@ VIR_LOG_INIT("conf.object_event"); +struct _virObjectEventCallback { + int callbackID; + virClassPtr klass; + int eventID; + virConnectPtr conn; + int remoteID; + bool uuid_filter; + unsigned char uuid[VIR_UUID_BUFLEN]; + virObjectEventCallbackFilter filter; + void *filter_opaque; + virConnectObjectEventGenericCallback cb; + void *opaque; + virFreeCallback freecb; + bool deleted; + bool legacy; /* true if end user does not know callbackID */ +}; +typedef struct _virObjectEventCallback virObjectEventCallback; +typedef virObjectEventCallback *virObjectEventCallbackPtr; + struct _virObjectEventCallbackList { unsigned int nextID; size_t count; @@ -63,23 +82,6 @@ struct _virObjectEventState { virMutex lock; }; -struct _virObjectEventCallback { - int callbackID; - virClassPtr klass; - int eventID; - virConnectPtr conn; - int remoteID; - bool uuid_filter; - unsigned char uuid[VIR_UUID_BUFLEN]; - virObjectEventCallbackFilter filter; - void *filter_opaque; - virConnectObjectEventGenericCallback cb; - void *opaque; - virFreeCallback freecb; - bool deleted; - bool legacy; /* true if end user does not know callbackID */ -}; - static virClassPtr virObjectEventClass; static void virObjectEventDispose(void *obj); diff --git a/src/conf/object_event.h b/src/conf/object_event.h index 7654799..b0201dd 100644 --- a/src/conf/object_event.h +++ b/src/conf/object_event.h @@ -29,9 +29,6 @@ #ifndef __OBJECT_EVENT_H__ # define __OBJECT_EVENT_H__ -typedef struct _virObjectEventCallback virObjectEventCallback; -typedef virObjectEventCallback *virObjectEventCallbackPtr; - /** * Dispatching domain events that come in while * in a call / response rpc