Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/rpc/virkeepalive.h | 9 +++-----
src/rpc/virnetclient.h | 41 ++++++++++++++++-------------------
src/rpc/virnetclientprogram.h | 15 +++++--------
src/rpc/virnetclientstream.h | 9 +++-----
src/rpc/virnetdaemon.h | 21 ++++++++----------
src/rpc/virnetlibsshsession.h | 9 +++-----
src/rpc/virnetmessage.h | 7 ++----
src/rpc/virnetsaslcontext.h | 11 ++++------
src/rpc/virnetserver.h | 17 ++++++---------
src/rpc/virnetserverclient.h | 19 +++++++---------
src/rpc/virnetservermdns.h | 7 ++----
src/rpc/virnetserverprogram.h | 11 ++++------
src/rpc/virnetserverservice.h | 9 +++-----
src/rpc/virnetsocket.h | 38 +++++++++++++++-----------------
src/rpc/virnetsshsession.h | 9 +++-----
src/rpc/virnettlscontext.h | 9 +++-----
16 files changed, 95 insertions(+), 146 deletions(-)
diff --git a/src/rpc/virkeepalive.h b/src/rpc/virkeepalive.h
index 6b9524b6ba..41d65d08d0 100644
--- a/src/rpc/virkeepalive.h
+++ b/src/rpc/virkeepalive.h
@@ -18,11 +18,10 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRKEEPALIVE_H
-# define LIBVIRT_VIRKEEPALIVE_H
+#pragma once
-# include "virnetmessage.h"
-# include "virobject.h"
+#include "virnetmessage.h"
+#include "virobject.h"
typedef int (*virKeepAliveSendFunc)(void *client, virNetMessagePtr msg);
typedef void (*virKeepAliveDeadFunc)(void *client);
@@ -52,5 +51,3 @@ bool virKeepAliveTrigger(virKeepAlivePtr ka,
bool virKeepAliveCheckMessage(virKeepAlivePtr ka,
virNetMessagePtr msg,
virNetMessagePtr *response);
-
-#endif /* LIBVIRT_VIRKEEPALIVE_H */
diff --git a/src/rpc/virnetclient.h b/src/rpc/virnetclient.h
index 40c7df9f5d..07b399c1a9 100644
--- a/src/rpc/virnetclient.h
+++ b/src/rpc/virnetclient.h
@@ -18,20 +18,19 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETCLIENT_H
-# define LIBVIRT_VIRNETCLIENT_H
-
-# ifdef WITH_GNUTLS
-# include "virnettlscontext.h"
-# endif
-# include "virnetmessage.h"
-# ifdef WITH_SASL
-# include "virnetsaslcontext.h"
-# endif
-# include "virnetclientprogram.h"
-# include "virnetclientstream.h"
-# include "virobject.h"
-# include "viruri.h"
+#pragma once
+
+#ifdef WITH_GNUTLS
+# include "virnettlscontext.h"
+#endif
+#include "virnetmessage.h"
+#ifdef WITH_SASL
+# include "virnetsaslcontext.h"
+#endif
+#include "virnetclientprogram.h"
+#include "virnetclientstream.h"
+#include "virobject.h"
+#include "viruri.h"
virNetClientPtr virNetClientNewUNIX(const char *path,
@@ -116,15 +115,15 @@ int virNetClientSendStream(virNetClientPtr client,
virNetMessagePtr msg,
virNetClientStreamPtr st);
-# ifdef WITH_SASL
+#ifdef WITH_SASL
void virNetClientSetSASLSession(virNetClientPtr client,
virNetSASLSessionPtr sasl);
-# endif
+#endif
-# ifdef WITH_GNUTLS
+#ifdef WITH_GNUTLS
int virNetClientSetTLSSession(virNetClientPtr client,
virNetTLSContextPtr tls);
-# endif
+#endif
bool virNetClientIsEncrypted(virNetClientPtr client);
bool virNetClientIsOpen(virNetClientPtr client);
@@ -132,9 +131,9 @@ bool virNetClientIsOpen(virNetClientPtr client);
const char *virNetClientLocalAddrStringSASL(virNetClientPtr client);
const char *virNetClientRemoteAddrStringSASL(virNetClientPtr client);
-# ifdef WITH_GNUTLS
+#ifdef WITH_GNUTLS
int virNetClientGetTLSKeySize(virNetClientPtr client);
-# endif
+#endif
void virNetClientClose(virNetClientPtr client);
@@ -144,5 +143,3 @@ int virNetClientKeepAliveStart(virNetClientPtr client,
unsigned int count);
void virNetClientKeepAliveStop(virNetClientPtr client);
-
-#endif /* LIBVIRT_VIRNETCLIENT_H */
diff --git a/src/rpc/virnetclientprogram.h b/src/rpc/virnetclientprogram.h
index 36d331cbf0..1ac0f30023 100644
--- a/src/rpc/virnetclientprogram.h
+++ b/src/rpc/virnetclientprogram.h
@@ -18,14 +18,13 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETCLIENTPROGRAM_H
-# define LIBVIRT_VIRNETCLIENTPROGRAM_H
+#pragma once
-# include <rpc/types.h>
-# include <rpc/xdr.h>
+#include <rpc/types.h>
+#include <rpc/xdr.h>
-# include "virnetmessage.h"
-# include "virobject.h"
+#include "virnetmessage.h"
+#include "virobject.h"
typedef struct _virNetClient virNetClient;
typedef virNetClient *virNetClientPtr;
@@ -78,7 +77,3 @@ int virNetClientProgramCall(virNetClientProgramPtr prog,
int **infds,
xdrproc_t args_filter, void *args,
xdrproc_t ret_filter, void *ret);
-
-
-
-#endif /* LIBVIRT_VIRNETCLIENTPROGRAM_H */
diff --git a/src/rpc/virnetclientstream.h b/src/rpc/virnetclientstream.h
index 33a2af357f..166adb0b22 100644
--- a/src/rpc/virnetclientstream.h
+++ b/src/rpc/virnetclientstream.h
@@ -18,11 +18,10 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETCLIENTSTREAM_H
-# define LIBVIRT_VIRNETCLIENTSTREAM_H
+#pragma once
-# include "virnetclientprogram.h"
-# include "virobject.h"
+#include "virnetclientprogram.h"
+#include "virobject.h"
typedef struct _virNetClientStream virNetClientStream;
typedef virNetClientStream *virNetClientStreamPtr;
@@ -92,5 +91,3 @@ int virNetClientStreamEventRemoveCallback(virNetClientStreamPtr st);
bool virNetClientStreamEOF(virNetClientStreamPtr st)
ATTRIBUTE_NONNULL(1);
-
-#endif /* LIBVIRT_VIRNETCLIENTSTREAM_H */
diff --git a/src/rpc/virnetdaemon.h b/src/rpc/virnetdaemon.h
index 2ad85f265b..b7511ffd27 100644
--- a/src/rpc/virnetdaemon.h
+++ b/src/rpc/virnetdaemon.h
@@ -18,18 +18,17 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETDAEMON_H
-# define LIBVIRT_VIRNETDAEMON_H
+#pragma once
-# include <signal.h>
+#include <signal.h>
-# include "virnettlscontext.h"
-# include "virobject.h"
-# include "virjson.h"
-# include "virnetserverprogram.h"
-# include "virnetserverclient.h"
-# include "virnetserverservice.h"
-# include "virnetserver.h"
+#include "virnettlscontext.h"
+#include "virobject.h"
+#include "virjson.h"
+#include "virnetserverprogram.h"
+#include "virnetserverclient.h"
+#include "virnetserverservice.h"
+#include "virnetserver.h"
virNetDaemonPtr virNetDaemonNew(void);
@@ -81,5 +80,3 @@ virNetServerPtr virNetDaemonGetServer(virNetDaemonPtr dmn,
ssize_t virNetDaemonGetServers(virNetDaemonPtr dmn, virNetServerPtr **servers);
bool virNetDaemonHasServer(virNetDaemonPtr dmn,
const char *serverName);
-
-#endif /* LIBVIRT_VIRNETDAEMON_H */
diff --git a/src/rpc/virnetlibsshsession.h b/src/rpc/virnetlibsshsession.h
index bb89267835..231c2591b2 100644
--- a/src/rpc/virnetlibsshsession.h
+++ b/src/rpc/virnetlibsshsession.h
@@ -18,11 +18,10 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETLIBSSHSESSION_H
-# define LIBVIRT_VIRNETLIBSSHSESSION_H
+#pragma once
-# include "internal.h"
-# include "viruri.h"
+#include "internal.h"
+#include "viruri.h"
typedef struct _virNetLibsshSession virNetLibsshSession;
typedef virNetLibsshSession *virNetLibsshSessionPtr;
@@ -72,5 +71,3 @@ ssize_t virNetLibsshChannelWrite(virNetLibsshSessionPtr sess,
size_t len);
bool virNetLibsshSessionHasCachedData(virNetLibsshSessionPtr sess);
-
-#endif /* LIBVIRT_VIRNETLIBSSHSESSION_H */
diff --git a/src/rpc/virnetmessage.h b/src/rpc/virnetmessage.h
index c787eecb7d..748421a9fd 100644
--- a/src/rpc/virnetmessage.h
+++ b/src/rpc/virnetmessage.h
@@ -18,10 +18,9 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETMESSAGE_H
-# define LIBVIRT_VIRNETMESSAGE_H
+#pragma once
-# include "virnetprotocol.h"
+#include "virnetprotocol.h"
typedef struct virNetMessageHeader *virNetMessageHeaderPtr;
typedef struct virNetMessageError *virNetMessageErrorPtr;
@@ -100,5 +99,3 @@ int virNetMessageDupFD(virNetMessagePtr msg,
int virNetMessageAddFD(virNetMessagePtr msg,
int fd);
-
-#endif /* LIBVIRT_VIRNETMESSAGE_H */
diff --git a/src/rpc/virnetsaslcontext.h b/src/rpc/virnetsaslcontext.h
index 6d8f16ecd0..4d1845e643 100644
--- a/src/rpc/virnetsaslcontext.h
+++ b/src/rpc/virnetsaslcontext.h
@@ -18,13 +18,12 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETSASLCONTEXT_H
-# define LIBVIRT_VIRNETSASLCONTEXT_H
+#pragma once
-# include "internal.h"
-# include <sasl/sasl.h>
+#include "internal.h"
+#include <sasl/sasl.h>
-# include "virobject.h"
+#include "virobject.h"
typedef struct _virNetSASLContext virNetSASLContext;
typedef virNetSASLContext *virNetSASLContextPtr;
@@ -109,5 +108,3 @@ ssize_t virNetSASLSessionDecode(virNetSASLSessionPtr sasl,
size_t inputLen,
const char **output,
size_t *outputlen);
-
-#endif /* LIBVIRT_VIRNETSASLCONTEXT_H */
diff --git a/src/rpc/virnetserver.h b/src/rpc/virnetserver.h
index 92a856fb03..e46a717c15 100644
--- a/src/rpc/virnetserver.h
+++ b/src/rpc/virnetserver.h
@@ -19,15 +19,14 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETSERVER_H
-# define LIBVIRT_VIRNETSERVER_H
+#pragma once
-# include "virnettlscontext.h"
-# include "virnetserverprogram.h"
-# include "virnetserverclient.h"
-# include "virnetserverservice.h"
-# include "virobject.h"
-# include "virjson.h"
+#include "virnettlscontext.h"
+#include "virnetserverprogram.h"
+#include "virnetserverclient.h"
+#include "virnetserverservice.h"
+#include "virobject.h"
+#include "virjson.h"
virNetServerPtr virNetServerNew(const char *name,
@@ -112,5 +111,3 @@ size_t virNetServerGetCurrentUnauthClients(virNetServerPtr srv);
int virNetServerSetClientLimits(virNetServerPtr srv,
long long int maxClients,
long long int maxClientsUnauth);
-
-#endif /* LIBVIRT_VIRNETSERVER_H */
diff --git a/src/rpc/virnetserverclient.h b/src/rpc/virnetserverclient.h
index 2d6fa7ec56..1b01bedbcb 100644
--- a/src/rpc/virnetserverclient.h
+++ b/src/rpc/virnetserverclient.h
@@ -19,14 +19,13 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETSERVERCLIENT_H
-# define LIBVIRT_VIRNETSERVERCLIENT_H
+#pragma once
-# include "viridentity.h"
-# include "virnetsocket.h"
-# include "virnetmessage.h"
-# include "virobject.h"
-# include "virjson.h"
+#include "viridentity.h"
+#include "virnetsocket.h"
+#include "virnetmessage.h"
+#include "virobject.h"
+#include "virjson.h"
typedef struct _virNetServer virNetServer;
typedef virNetServer *virNetServerPtr;
@@ -103,12 +102,12 @@ bool virNetServerClientHasTLSSession(virNetServerClientPtr client);
virNetTLSSessionPtr virNetServerClientGetTLSSession(virNetServerClientPtr client);
int virNetServerClientGetTLSKeySize(virNetServerClientPtr client);
-# ifdef WITH_SASL
+#ifdef WITH_SASL
bool virNetServerClientHasSASLSession(virNetServerClientPtr client);
void virNetServerClientSetSASLSession(virNetServerClientPtr client,
virNetSASLSessionPtr sasl);
virNetSASLSessionPtr virNetServerClientGetSASLSession(virNetServerClientPtr client);
-# endif
+#endif
int virNetServerClientGetFD(virNetServerClientPtr client);
@@ -169,5 +168,3 @@ int virNetServerClientGetInfo(virNetServerClientPtr client,
virIdentityPtr *identity);
void virNetServerClientSetQuietEOF(virNetServerClientPtr client);
-
-#endif /* LIBVIRT_VIRNETSERVERCLIENT_H */
diff --git a/src/rpc/virnetservermdns.h b/src/rpc/virnetservermdns.h
index 64511a65c8..5f8e4da581 100644
--- a/src/rpc/virnetservermdns.h
+++ b/src/rpc/virnetservermdns.h
@@ -21,10 +21,9 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETSERVERMDNS_H
-# define LIBVIRT_VIRNETSERVERMDNS_H
+#pragma once
-# include "internal.h"
+#include "internal.h"
typedef struct _virNetServerMDNS virNetServerMDNS;
typedef virNetServerMDNS *virNetServerMDNSPtr;
@@ -103,5 +102,3 @@ void virNetServerMDNSRemoveEntry(virNetServerMDNSGroupPtr group,
void virNetServerMDNSFree(virNetServerMDNSPtr ptr);
void virNetServerMDNSGroupFree(virNetServerMDNSGroupPtr ptr);
void virNetServerMDNSEntryFree(virNetServerMDNSEntryPtr ptr);
-
-#endif /* LIBVIRT_VIRNETSERVERMDNS_H */
diff --git a/src/rpc/virnetserverprogram.h b/src/rpc/virnetserverprogram.h
index b37fc40c9b..851bbf0183 100644
--- a/src/rpc/virnetserverprogram.h
+++ b/src/rpc/virnetserverprogram.h
@@ -19,12 +19,11 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETSERVERPROGRAM_H
-# define LIBVIRT_VIRNETSERVERPROGRAM_H
+#pragma once
-# include "virnetmessage.h"
-# include "virnetserverclient.h"
-# include "virobject.h"
+#include "virnetmessage.h"
+#include "virnetserverclient.h"
+#include "virobject.h"
typedef struct _virNetDaemon virNetDaemon;
typedef virNetDaemon *virNetDaemonPtr;
@@ -106,5 +105,3 @@ int virNetServerProgramSendStreamHole(virNetServerProgramPtr prog,
unsigned int serial,
long long length,
unsigned int flags);
-
-#endif /* LIBVIRT_VIRNETSERVERPROGRAM_H */
diff --git a/src/rpc/virnetserverservice.h b/src/rpc/virnetserverservice.h
index 5c73bdeab1..5dd22bd929 100644
--- a/src/rpc/virnetserverservice.h
+++ b/src/rpc/virnetserverservice.h
@@ -19,11 +19,10 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETSERVERSERVICE_H
-# define LIBVIRT_VIRNETSERVERSERVICE_H
+#pragma once
-# include "virnetserverprogram.h"
-# include "virobject.h"
+#include "virnetserverprogram.h"
+#include "virobject.h"
typedef enum {
VIR_NET_SERVER_SERVICE_AUTH_NONE = 0,
@@ -87,5 +86,3 @@ void virNetServerServiceToggle(virNetServerServicePtr svc,
bool enabled);
void virNetServerServiceClose(virNetServerServicePtr svc);
-
-#endif /* LIBVIRT_VIRNETSERVERSERVICE_H */
diff --git a/src/rpc/virnetsocket.h b/src/rpc/virnetsocket.h
index 334036aafc..343c8f43e0 100644
--- a/src/rpc/virnetsocket.h
+++ b/src/rpc/virnetsocket.h
@@ -19,20 +19,19 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETSOCKET_H
-# define LIBVIRT_VIRNETSOCKET_H
-
-# include "virsocketaddr.h"
-# include "vircommand.h"
-# ifdef WITH_GNUTLS
-# include "virnettlscontext.h"
-# endif
-# include "virobject.h"
-# ifdef WITH_SASL
-# include "virnetsaslcontext.h"
-# endif
-# include "virjson.h"
-# include "viruri.h"
+#pragma once
+
+#include "virsocketaddr.h"
+#include "vircommand.h"
+#ifdef WITH_GNUTLS
+# include "virnettlscontext.h"
+#endif
+#include "virobject.h"
+#ifdef WITH_SASL
+# include "virnetsaslcontext.h"
+#endif
+#include "virjson.h"
+#include "viruri.h"
typedef struct _virNetSocket virNetSocket;
typedef virNetSocket *virNetSocketPtr;
@@ -151,15 +150,15 @@ ssize_t virNetSocketWrite(virNetSocketPtr sock, const char *buf,
size_t len);
int virNetSocketSendFD(virNetSocketPtr sock, int fd);
int virNetSocketRecvFD(virNetSocketPtr sock, int *fd);
-# ifdef WITH_GNUTLS
+#ifdef WITH_GNUTLS
void virNetSocketSetTLSSession(virNetSocketPtr sock,
virNetTLSSessionPtr sess);
-# endif
+#endif
-# ifdef WITH_SASL
+#ifdef WITH_SASL
void virNetSocketSetSASLSession(virNetSocketPtr sock,
virNetSASLSessionPtr sess);
-# endif
+#endif
bool virNetSocketHasCachedData(virNetSocketPtr sock);
bool virNetSocketHasPendingData(virNetSocketPtr sock);
@@ -183,6 +182,3 @@ void virNetSocketUpdateIOCallback(virNetSocketPtr sock,
void virNetSocketRemoveIOCallback(virNetSocketPtr sock);
void virNetSocketClose(virNetSocketPtr sock);
-
-
-#endif /* LIBVIRT_VIRNETSOCKET_H */
diff --git a/src/rpc/virnetsshsession.h b/src/rpc/virnetsshsession.h
index 840054c51a..0101489302 100644
--- a/src/rpc/virnetsshsession.h
+++ b/src/rpc/virnetsshsession.h
@@ -18,11 +18,10 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETSSHSESSION_H
-# define LIBVIRT_VIRNETSSHSESSION_H
+#pragma once
-# include "internal.h"
-# include "viruri.h"
+#include "internal.h"
+#include "viruri.h"
typedef struct _virNetSSHSession virNetSSHSession;
typedef virNetSSHSession *virNetSSHSessionPtr;
@@ -84,5 +83,3 @@ ssize_t virNetSSHChannelWrite(virNetSSHSessionPtr sess,
size_t len);
bool virNetSSHSessionHasCachedData(virNetSSHSessionPtr sess);
-
-#endif /* LIBVIRT_VIRNETSSHSESSION_H */
diff --git a/src/rpc/virnettlscontext.h b/src/rpc/virnettlscontext.h
index 82ecd8267d..f3273bc26a 100644
--- a/src/rpc/virnettlscontext.h
+++ b/src/rpc/virnettlscontext.h
@@ -18,11 +18,10 @@
* <
http://www.gnu.org/licenses/>.
*/
-#ifndef LIBVIRT_VIRNETTLSCONTEXT_H
-# define LIBVIRT_VIRNETTLSCONTEXT_H
+#pragma once
-# include "internal.h"
-# include "virobject.h"
+#include "internal.h"
+#include "virobject.h"
typedef struct _virNetTLSContext virNetTLSContext;
typedef virNetTLSContext *virNetTLSContextPtr;
@@ -99,5 +98,3 @@ virNetTLSSessionGetHandshakeStatus(virNetTLSSessionPtr sess);
int virNetTLSSessionGetKeySize(virNetTLSSessionPtr sess);
const char *virNetTLSSessionGetX509DName(virNetTLSSessionPtr sess);
-
-#endif /* LIBVIRT_VIRNETTLSCONTEXT_H */
--
2.20.1