File: export.h

package info (click to toggle)
paho.mqtt.cpp 1.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,672 kB
  • sloc: cpp: 13,068; ansic: 113; sh: 55; makefile: 22
file content (44 lines) | stat: -rw-r--r-- 1,631 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/////////////////////////////////////////////////////////////////////////////
/// @file export.h
/// Library symbol export definitions, primarily for Windows MSVC DLL's
/// @date November 20, 2023
/// @author Frank Pagliughi
/////////////////////////////////////////////////////////////////////////////

/*******************************************************************************
 * Copyright (c) 2023 Frank Pagliughi <fpagliughi@mindspring.com>
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * and Eclipse Distribution License v1.0 which accompany this distribution.
 *
 * The Eclipse Public License is available at
 *    http://www.eclipse.org/legal/epl-v20.html
 * and the Eclipse Distribution License is available at
 *   http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * Contributors:
 *    Frank Pagliughi - initial implementation and documentation
 *    Frank Pagliughi - MQTT v5 support
 *******************************************************************************/

#ifndef __mqtt_export_h
#define __mqtt_export_h

#if defined(_WIN32) && defined(_MSC_VER)
    #if defined(PAHO_MQTTPP_EXPORTS)
        #define PAHO_MQTTPP_EXPORT __declspec(dllexport)
    #elif defined(PAHO_MQTTPP_IMPORTS)
        #define PAHO_MQTTPP_EXPORT __declspec(dllimport)
    #else
        #define PAHO_MQTTPP_EXPORT
    #endif
#else
    #if defined(PAHO_MQTTPP_EXPORTS)
        #define PAHO_MQTTPP_EXPORT __attribute__((visibility("default")))
    #else
        #define PAHO_MQTTPP_EXPORT
    #endif
#endif

#endif  // __mqtt_export_h