Re: [PATCH] Revert "admin: Rename virAdmConnect to virAdmDaemon"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 10, 2015 at 03:46:45PM +0100, Erik Skultety wrote:
> Commmit df8192aa introduced admin related rename and some minor
> (caused by automated approach, aka sed) and some more severe isues along with
> it. First reason to revert is the inconsistency with libvirt library.

We have release 1.3.0 with this header file, so IMHO we can't just
rename the public APIs now.

>  include/libvirt/libvirt-admin.h |  48 +++++-----

> diff --git a/include/libvirt/libvirt-admin.h b/include/libvirt/libvirt-admin.h
> index b81698e..ab9df96 100644
> --- a/include/libvirt/libvirt-admin.h
> +++ b/include/libvirt/libvirt-admin.h
> @@ -35,51 +35,53 @@ extern "C" {
>  # undef __VIR_ADMIN_H_INCLUDES__
>  
>  /**
> - * virAdmDaemon:
> + * virAdmConnect:
>   *
> - * a virAdmDaemon is a private structure representing a remote daemon.
> + * a virAdmConnect is a private structure representing a connection to
> + * libvirt daemon.
>   */
> -typedef struct _virAdmDaemon virAdmDaemon;
> +typedef struct _virAdmConnect virAdmConnect;
>  
>  /**
> - * virAdmDaemonPtr:
> + * virAdmConnectPtr:
>   *
> - * a virAdmDaemonPtr is pointer to a virAdmDaemon private structure,
> - * this is the type used to reference a daemon in the API.
> + * a virAdmConnectPtr is pointer to a virAdmConnect private structure,
> + * this is the type used to reference a connection to the daemon
> + * in the API.
>   */
> -typedef virAdmDaemon *virAdmDaemonPtr;
> +typedef virAdmConnect *virAdmConnectPtr;
>  
> -virAdmDaemonPtr virAdmDaemonOpen(const char *name, unsigned int flags);
> -int virAdmDaemonClose(virAdmDaemonPtr dmn);
> +virAdmConnectPtr virAdmConnectOpen(const char *name, unsigned int flags);
> +int virAdmConnectClose(virAdmConnectPtr conn);
>  
> -int virAdmDaemonRef(virAdmDaemonPtr dmn);
> -int virAdmDaemonIsAlive(virAdmDaemonPtr dmn);
> +int virAdmConnectRef(virAdmConnectPtr conn);
> +int virAdmConnectIsAlive(virAdmConnectPtr conn);
>  
>  int virAdmGetVersion(unsigned long long *libVer);
>  
> -char *virAdmDaemonGetURI(virAdmDaemonPtr dmn);
> +char *virAdmConnectGetURI(virAdmConnectPtr conn);
>  
> -int virAdmDaemonGetVersion(virAdmDaemonPtr dmn,
> -                           unsigned long long *libVer);
> +int virAdmConnectGetLibVersion(virAdmConnectPtr conn,
> +                               unsigned long long *libVer);
>  
>  /**
> - * virAdmDaemonCloseFunc:
> - * @dmn: virAdmDaemon connection
> + * virAdmConnectCloseFunc:
> + * @conn: virAdmConnect connection
>   * @reason: reason why the connection was closed (see virConnectCloseReason)
>   * @opaque: opaque client data
>   *
>   * A callback to be registered, in case a connection was closed.
>   */
> -typedef void (*virAdmDaemonCloseFunc)(virAdmDaemonPtr dmn,
> +typedef void (*virAdmConnectCloseFunc)(virAdmConnectPtr conn,
>                                         int reason,
>                                         void *opaque);
>  
> -int virAdmDaemonRegisterCloseCallback(virAdmDaemonPtr dmn,
> -                                      virAdmDaemonCloseFunc cb,
> -                                      void *opaque,
> -                                      virFreeCallback freecb);
> -int virAdmDaemonUnregisterCloseCallback(virAdmDaemonPtr dmn,
> -                                        virAdmDaemonCloseFunc cb);
> +int virAdmConnectRegisterCloseCallback(virAdmConnectPtr conn,
> +                                       virAdmConnectCloseFunc cb,
> +                                       void *opaque,
> +                                       virFreeCallback freecb);
> +int virAdmConnectUnregisterCloseCallback(virAdmConnectPtr conn,
> +                                         virAdmConnectCloseFunc cb);
>  
>  # ifdef __cplusplus
>  }

This is all public API


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]