# include <shib/shib.h>
#endif
+#ifdef WIN32
+# ifndef SHIBTARGET_EXPORTS
+# define SHIBTARGET_EXPORTS __declspec(dllimport)
+# endif
+#else
+# define SHIBTARGET_EXPORTS
+#endif
+
#include <shib-target/shibrpc.h>
#ifdef __cplusplus
* call clnt_pcreateerror ("<string>") to output an error message from
* the RPC library.
*/
-CLIENT * shibrpc_client_create (ShibSocket sock, u_long program, u_long version);
+SHIBTARGET_EXPORTS CLIENT * shibrpc_client_create (ShibSocket sock, u_long program, u_long version);
/* shib-sock.c */
*
* Returns 0 on success, non-zero on error
*/
-int shib_sock_create (ShibSocket *sock);
+SHIBTARGET_EXPORTS int shib_sock_create (ShibSocket *sock);
/*
* bind the socket s to the "port" name.
*
* SIDE EFFECT: On error, the socket is closed!
*/
-int shib_sock_bind (ShibSocket s, ShibSockName name);
+SHIBTARGET_EXPORTS int shib_sock_bind (ShibSocket s, ShibSockName name);
/*
* connect the socket s to the "port" name on the local host.
*
* Returns 0 on success; non-zero on error.
*/
-int shib_sock_connect (ShibSocket s, ShibSockName name);
+SHIBTARGET_EXPORTS int shib_sock_connect (ShibSocket s, ShibSockName name);
/*
* accept a connection. Returns 0 on success, non-zero on failure.
*/
-int shib_sock_accept (ShibSocket listener, ShibSocket* s);
+SHIBTARGET_EXPORTS int shib_sock_accept (ShibSocket listener, ShibSocket* s);
/*
* close the socket
*/
-void shib_sock_close (ShibSocket s, ShibSockName name);
+SHIBTARGET_EXPORTS void shib_sock_close (ShibSocket s, ShibSockName name);
/* shib-target.cpp */
#define SHIBTARGET_TAG_REQATTRS "requestAttributes"
/* initialize and finalize the target library (return 0 on success, 1 on failure) */
-int shib_target_initialize (const char* application, const char* ini_file);
-void shib_target_finalize (void);
-ShibSockName shib_target_sockname(void);
+SHIBTARGET_EXPORTS int shib_target_initialize (const char* application, const char* ini_file);
+SHIBTARGET_EXPORTS void shib_target_finalize (void);
+SHIBTARGET_EXPORTS ShibSockName shib_target_sockname(void);
#ifdef __cplusplus
}
namespace shibtarget {
class ResourcePriv;
- class Resource
+ class SHIBTARGET_EXPORTS Resource
{
public:
Resource(const char* resource_url);
};
class RPCHandleInternal;
- class RPCHandle
+ class SHIBTARGET_EXPORTS RPCHandle
{
public:
RPCHandle(ShibSockName shar, u_long program, u_long version);
RPCHandleInternal *m_priv;
};
- class ShibTargetException : public std::exception
+ class SHIBTARGET_EXPORTS ShibTargetException : public std::exception
{
public:
explicit ShibTargetException() { m_code = SHIBRPC_OK; }
};
class RPCErrorPriv;
- class RPCError
+ class SHIBTARGET_EXPORTS RPCError
{
public:
RPCError() { init(0, "", NULL); }
RPCErrorPriv* m_priv;
};
- class SHIREConfig
+ class SHIBTARGET_EXPORTS SHIREConfig
{
public:
bool checkIPAddress;
};
class SHIREPriv;
- class SHIRE
+ class SHIBTARGET_EXPORTS SHIRE
{
public:
SHIRE(RPCHandle *rpc, SHIREConfig config, std::string shire_url);
SHIREPriv *m_priv;
};
- class RMConfig
+ class SHIBTARGET_EXPORTS RMConfig
{
public:
bool checkIPAddress;
};
class RMPriv;
- class RM
+ class SHIBTARGET_EXPORTS RM
{
public:
RM(RPCHandle *rpc, RMConfig config);
};
class ShibINIPriv;
- class ShibINI {
+ class SHIBTARGET_EXPORTS ShibINI {
public:
ShibINI (std::string& file, bool case_sensitive = true) { init(file,case_sensitive); }
ShibINI (const char *file, bool case_sensitive = true) {
// while you hold the iterator. You should copy the de-reference
// of the pointer to your own copy if you want to keep the string.
- class Iterator {
+ class SHIBTARGET_EXPORTS Iterator {
public:
virtual ~Iterator() = 0;
virtual const std::string* begin() = 0;
};
class ShibMLPPriv;
- class ShibMLP {
+ class SHIBTARGET_EXPORTS ShibMLP {
public:
ShibMLP();
~ShibMLP();
std::map<std::string,std::string> m_map;
};
- class ShibTargetConfig
+ class SHIBTARGET_EXPORTS ShibTargetConfig
{
public:
static void preinit();