提交 9b4041d3 编写于 作者: J Jonathon Jongsma 提交者: Ján Tomko

src/rpc: use #pragma once in headers

Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 85dd3d05
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册