* <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);
bool virKeepAliveCheckMessage(virKeepAlivePtr ka,
virNetMessagePtr msg,
virNetMessagePtr *response);
-
-#endif /* LIBVIRT_VIRKEEPALIVE_H */
* <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,
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);
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);
unsigned int count);
void virNetClientKeepAliveStop(virNetClientPtr client);
-
-#endif /* LIBVIRT_VIRNETCLIENT_H */
* <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;
int **infds,
xdrproc_t args_filter, void *args,
xdrproc_t ret_filter, void *ret);
-
-
-
-#endif /* LIBVIRT_VIRNETCLIENTPROGRAM_H */
* <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;
bool virNetClientStreamEOF(virNetClientStreamPtr st)
ATTRIBUTE_NONNULL(1);
-
-#endif /* LIBVIRT_VIRNETCLIENTSTREAM_H */
* <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);
ssize_t virNetDaemonGetServers(virNetDaemonPtr dmn, virNetServerPtr **servers);
bool virNetDaemonHasServer(virNetDaemonPtr dmn,
const char *serverName);
-
-#endif /* LIBVIRT_VIRNETDAEMON_H */
* <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;
size_t len);
bool virNetLibsshSessionHasCachedData(virNetLibsshSessionPtr sess);
-
-#endif /* LIBVIRT_VIRNETLIBSSHSESSION_H */
* <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;
int virNetMessageAddFD(virNetMessagePtr msg,
int fd);
-
-#endif /* LIBVIRT_VIRNETMESSAGE_H */
* <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;
size_t inputLen,
const char **output,
size_t *outputlen);
-
-#endif /* LIBVIRT_VIRNETSASLCONTEXT_H */
* <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,
int virNetServerSetClientLimits(virNetServerPtr srv,
long long int maxClients,
long long int maxClientsUnauth);
-
-#endif /* LIBVIRT_VIRNETSERVER_H */
* <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;
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);
virIdentityPtr *identity);
void virNetServerClientSetQuietEOF(virNetServerClientPtr client);
-
-#endif /* LIBVIRT_VIRNETSERVERCLIENT_H */
* <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;
void virNetServerMDNSFree(virNetServerMDNSPtr ptr);
void virNetServerMDNSGroupFree(virNetServerMDNSGroupPtr ptr);
void virNetServerMDNSEntryFree(virNetServerMDNSEntryPtr ptr);
-
-#endif /* LIBVIRT_VIRNETSERVERMDNS_H */
* <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;
unsigned int serial,
long long length,
unsigned int flags);
-
-#endif /* LIBVIRT_VIRNETSERVERPROGRAM_H */
* <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,
bool enabled);
void virNetServerServiceClose(virNetServerServicePtr svc);
-
-#endif /* LIBVIRT_VIRNETSERVERSERVICE_H */
* <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;
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);
void virNetSocketRemoveIOCallback(virNetSocketPtr sock);
void virNetSocketClose(virNetSocketPtr sock);
-
-
-#endif /* LIBVIRT_VIRNETSOCKET_H */
* <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;
size_t len);
bool virNetSSHSessionHasCachedData(virNetSSHSessionPtr sess);
-
-#endif /* LIBVIRT_VIRNETSSHSESSION_H */
* <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;
int virNetTLSSessionGetKeySize(virNetTLSSessionPtr sess);
const char *virNetTLSSessionGetX509DName(virNetTLSSessionPtr sess);
-
-#endif /* LIBVIRT_VIRNETTLSCONTEXT_H */