qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r1516549 - in /qpid/trunk/qpid/cpp: include/qpid/ImportExport.h src/CMakeLists.txt src/qpid/messaging/ConnectionOptions.h src/qpid/messaging/MessageImpl.h src/qpid/messaging/ProtocolRegistry.h src/qpid/messaging/amqp/EncodedMessage.h
Date Thu, 22 Aug 2013 19:31:15 GMT
Author: astitcher
Date: Thu Aug 22 19:31:15 2013
New Revision: 1516549

URL: http://svn.apache.org/r1516549
Log:
QPID-5079: Get library import/export declarations working for linux
- Only qpidmessaging and qpidtypes libraries are affected

Modified:
    qpid/trunk/qpid/cpp/include/qpid/ImportExport.h
    qpid/trunk/qpid/cpp/src/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/qpid/messaging/ConnectionOptions.h
    qpid/trunk/qpid/cpp/src/qpid/messaging/MessageImpl.h
    qpid/trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.h
    qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.h

Modified: qpid/trunk/qpid/cpp/include/qpid/ImportExport.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qpid/ImportExport.h?rev=1516549&r1=1516548&r2=1516549&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/include/qpid/ImportExport.h (original)
+++ qpid/trunk/qpid/cpp/include/qpid/ImportExport.h Thu Aug 22 19:31:15 2013
@@ -60,12 +60,16 @@
    //
    // Non-Windows (Linux, etc.) definitions:
    //
+#if __GNUC__ >= 4
+#  define QPID_EXPORT __attribute ((visibility ("default")))
+#else
 #  define QPID_EXPORT
+#endif
 #  define QPID_IMPORT
-#  define QPID_CLASS_EXPORT
-#  define QPID_CLASS_IMPORT
-#  define QPID_INLINE_EXPORT
-#  define QPID_INLINE_IMPORT
+#  define QPID_CLASS_EXPORT QPID_EXPORT
+#  define QPID_CLASS_IMPORT QPID_IMPORT
+#  define QPID_INLINE_EXPORT QPID_EXPORT
+#  define QPID_INLINE_IMPORT QPID_IMPORT
 #endif
 
 #endif  /*!QPID_IMPORTEXPORT_H*/

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=1516549&r1=1516548&r2=1516549&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Thu Aug 22 19:31:15 2013
@@ -1095,12 +1095,19 @@ set(qpidtypes_SOURCES
   qpid/types/Variant.cpp
   ${qpidtypes_platform_SOURCES}
 )
+set_source_files_properties(
+     ${qpidtypes_SOURCES}
+     PROPERTIES
+     COMPILE_FLAGS "${HIDE_SYMBOL_FLAGS}")
+
 add_msvc_version (qpidtypes library dll)
 add_library(qpidtypes SHARED ${qpidtypes_SOURCES})
 target_link_libraries(qpidtypes ${qpidtypes_platform_LIBS})
 set_target_properties (qpidtypes PROPERTIES
+                       LINK_FLAGS "${HIDE_SYMBOL_FLAGS}"
                        VERSION ${qpidtypes_version}
                        SOVERSION ${qpidtypes_version_major})
+
 install(TARGETS qpidtypes
   DESTINATION ${QPID_INSTALL_LIBDIR}
   COMPONENT ${QPID_COMPONENT_COMMON})
@@ -1212,11 +1219,17 @@ set (qpidmessaging_SOURCES
      qpid/messaging/amqp/EncodedMessage.h
      qpid/messaging/amqp/EncodedMessage.cpp
 )
+set_source_files_properties(
+     ${qpidmessaging_SOURCES}
+     PROPERTIES
+     COMPILE_FLAGS "${HIDE_SYMBOL_FLAGS}")
+
 add_msvc_version (qpidmessaging library dll)
 
 add_library (qpidmessaging SHARED ${qpidmessaging_SOURCES})
 target_link_libraries (qpidmessaging qpidclient)
 set_target_properties (qpidmessaging PROPERTIES
+                       LINK_FLAGS "${HIDE_SYMBOL_FLAGS}"
                        VERSION ${qpidmessaging_version}
                        SOVERSION ${qpidmessaging_version_major})
 install (TARGETS qpidmessaging

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/ConnectionOptions.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/ConnectionOptions.h?rev=1516549&r1=1516548&r2=1516549&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/ConnectionOptions.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/ConnectionOptions.h Thu Aug 22 19:31:15 2013
@@ -21,6 +21,8 @@
  * under the License.
  *
  */
+#include "qpid/messaging/ImportExport.h"
+
 #include "qpid/client/ConnectionSettings.h"
 #include <map>
 #include <vector>
@@ -44,8 +46,8 @@ struct ConnectionOptions : qpid::client:
     bool reconnectOnLimitExceeded;
     std::string identifier;
 
-    ConnectionOptions(const std::map<std::string, qpid::types::Variant>&);
-    void set(const std::string& name, const qpid::types::Variant& value);
+    QPID_MESSAGING_EXTERN ConnectionOptions(const std::map<std::string, qpid::types::Variant>&);
+    QPID_MESSAGING_EXTERN void set(const std::string& name, const qpid::types::Variant&
value);
 };
 }} // namespace qpid::messaging
 

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/MessageImpl.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/MessageImpl.h?rev=1516549&r1=1516548&r2=1516549&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/MessageImpl.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/MessageImpl.h Thu Aug 22 19:31:15 2013
@@ -21,6 +21,9 @@
  * under the License.
  *
  */
+
+#include "qpid/messaging/ImportExport.h"
+
 #include "qpid/messaging/Address.h"
 #include "qpid/types/Variant.h"
 #include "qpid/framing/SequenceNumber.h"
@@ -59,43 +62,43 @@ class MessageImpl
     MessageImpl(const char* chars, size_t count);
 
     void setReplyTo(const Address& d);
-    const Address& getReplyTo() const;
+    QPID_MESSAGING_EXTERN const Address& getReplyTo() const;
 
     void setSubject(const std::string& s);
-    const std::string& getSubject() const;
+    QPID_MESSAGING_EXTERN const std::string& getSubject() const;
 
     void setContentType(const std::string& s);
-    const std::string& getContentType() const;
+    QPID_MESSAGING_EXTERN const std::string& getContentType() const;
 
     void setMessageId(const std::string&);
-    const std::string& getMessageId() const;
+    QPID_MESSAGING_EXTERN const std::string& getMessageId() const;
     void setUserId(const std::string& );
-    const std::string& getUserId() const;
+    QPID_MESSAGING_EXTERN const std::string& getUserId() const;
     void setCorrelationId(const std::string& );
-    const std::string& getCorrelationId() const;
+    QPID_MESSAGING_EXTERN const std::string& getCorrelationId() const;
     void setPriority(uint8_t);
-    uint8_t getPriority() const;
+    QPID_MESSAGING_EXTERN uint8_t getPriority() const;
     void setTtl(uint64_t);
-    uint64_t getTtl() const;
+    QPID_MESSAGING_EXTERN uint64_t getTtl() const;
     void setDurable(bool);
-    bool isDurable() const;
+    QPID_MESSAGING_EXTERN bool isDurable() const;
     void setRedelivered(bool);
-    bool isRedelivered() const;
+    QPID_MESSAGING_EXTERN bool isRedelivered() const;
 
 
-    const qpid::types::Variant::Map& getHeaders() const;
+    QPID_MESSAGING_EXTERN const qpid::types::Variant::Map& getHeaders() const;
     qpid::types::Variant::Map& getHeaders();
     void setHeader(const std::string& key, const qpid::types::Variant& val);
 
     void setBytes(const std::string& bytes);
     void setBytes(const char* chars, size_t count);
-    const std::string& getBytes() const;
+    QPID_MESSAGING_EXTERN const std::string& getBytes() const;
     std::string& getBytes();
     qpid::types::Variant& getContent();
-    const qpid::types::Variant& getContent() const;
+    QPID_MESSAGING_EXTERN const qpid::types::Variant& getContent() const;
 
-    void setInternalId(qpid::framing::SequenceNumber id);
-    qpid::framing::SequenceNumber getInternalId();
+    QPID_MESSAGING_EXTERN void setInternalId(qpid::framing::SequenceNumber id);
+    QPID_MESSAGING_EXTERN qpid::framing::SequenceNumber getInternalId();
     void setEncoded(boost::shared_ptr<const qpid::messaging::amqp::EncodedMessage>
e) { encoded = e; }
     boost::shared_ptr<const qpid::messaging::amqp::EncodedMessage> getEncoded() const
{ return encoded; }
 };
@@ -109,8 +112,8 @@ class Message;
  */
 struct MessageImplAccess
 {
-    static MessageImpl& get(Message&);
-    static const MessageImpl& get(const Message&);
+    QPID_MESSAGING_EXTERN static MessageImpl& get(Message&);
+    QPID_MESSAGING_EXTERN static const MessageImpl& get(const Message&);
 };
 
 }} // namespace qpid::messaging

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.h?rev=1516549&r1=1516548&r2=1516549&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.h Thu Aug 22 19:31:15 2013
@@ -21,6 +21,9 @@
  * under the License.
  *
  */
+
+#include "qpid/messaging/ImportExport.h"
+
 #include "qpid/types/Variant.h"
 
 namespace qpid {
@@ -34,7 +37,7 @@ class ProtocolRegistry
   public:
     typedef ConnectionImpl* Factory(const std::string& url, const qpid::types::Variant::Map&
options);
     static ConnectionImpl* create(const std::string& url, const qpid::types::Variant::Map&
options);
-    static void add(const std::string& name, Factory* factory);
+    QPID_MESSAGING_EXTERN static void add(const std::string& name, Factory* factory);
   private:
 };
 }} // namespace qpid::messaging

Modified: qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.h?rev=1516549&r1=1516548&r2=1516549&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.h Thu Aug 22 19:31:15 2013
@@ -21,6 +21,9 @@
  * under the License.
  *
  */
+
+#include "qpid/messaging/ImportExport.h"
+
 #include "qpid/amqp/CharSequence.h"
 #include "qpid/amqp/MessageId.h"
 #include "qpid/amqp/MessageReader.h"
@@ -71,17 +74,17 @@ namespace amqp {
 class EncodedMessage
 {
   public:
-    EncodedMessage();
-    EncodedMessage(size_t);
-    EncodedMessage(const EncodedMessage&);
-    ~EncodedMessage();
+    QPID_MESSAGING_EXTERN EncodedMessage();
+    QPID_MESSAGING_EXTERN EncodedMessage(size_t);
+    QPID_MESSAGING_EXTERN EncodedMessage(const EncodedMessage&);
+    QPID_MESSAGING_EXTERN ~EncodedMessage();
 
 
-    size_t getSize() const;
-    char* getData();
-    const char* getData() const;
-    void trim(size_t);
-    void resize(size_t);
+    QPID_MESSAGING_EXTERN size_t getSize() const;
+    QPID_MESSAGING_EXTERN char* getData();
+    QPID_MESSAGING_EXTERN const char* getData() const;
+    QPID_MESSAGING_EXTERN void trim(size_t);
+    QPID_MESSAGING_EXTERN void resize(size_t);
 
     void getReplyTo(qpid::messaging::Address&) const;
     void getSubject(std::string&) const;
@@ -92,11 +95,10 @@ class EncodedMessage
     void populate(qpid::types::Variant::Map&) const;
     void getBody(std::string&, qpid::types::Variant&) const;
 
-    void init(qpid::messaging::MessageImpl&);
-    qpid::amqp::CharSequence getBareMessage() const;
+    QPID_MESSAGING_EXTERN void init(qpid::messaging::MessageImpl&);
+    QPID_MESSAGING_EXTERN qpid::amqp::CharSequence getBareMessage() const;
     qpid::amqp::CharSequence getBody() const;
-    bool hasHeaderChanged(const qpid::messaging::MessageImpl&) const;
-
+    QPID_MESSAGING_EXTERN bool hasHeaderChanged(const qpid::messaging::MessageImpl&)
const;
   private:
     size_t size;
     char* data;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message