/* * File: Defines.h * Author: jgaebler * * Created on June 28, 2010, 2:40 PM */ #pragma once #ifndef DEFINES_H #define DEFINES_H #include "Platform.h" #include "ms/PeerID.h" #include "ms/InvitationID.h" #include "ms/ViewID.h" #include "ms/register/ClusterID.h" //general includes #include #include #include #include #include #include #include #include #include #include using ::std::size_t; using ::std::cout; using ::std::cerr; using ::std::endl; //fallback for environments, witch operates without the Netbeans environment #ifndef CLOUD_SYNC_ENABLED #define CLOUD_SYNC_ENABLED 0 //if the cloud storage disabled, we have to enable the p2p storage and vice versa #define P2P_SYNC_ENABLED 1 #endif //again, only one storing method can be used for resync a peer #if CLOUD_SYNC_ENABLED #define P2P_SYNC_ENABLED 0 #endif #if OMNETPP #include #include #include "IPvXAddress.h" #define MOV_DEBUG EV #define MOV_EXPORT #else #include "core/debugging/debug.h" #include "common/utypes.h" #include "core/network/host_address.h" #include "common/ubeeme_global.h" using ubeeme::uint16; using ubeeme::uint32; using ubeeme::HostAddress; #define MOV_EXPORT UBEEME_EXPORT #endif namespace ubeeme { namespace moversight { /** * @brief Defines the shifts for the option parameter within the SPA message. */ enum ShiftTypes { SHIFT_SEMANTIC = 0x7, //0b00000111, SHIFT_FLUSH = 0x6, //0b00000110, SHIFT_REPLY = 0x5 //0b00000101 }; /** * @brief Defines the test bit for each synchronisation */ enum SyncTypes { FLUSH = 0x1, //0b00000001, SEMANTIC = 0x1, //0b00000001 }; /** * @brief Defines the bit masks for the reply parameter within the SPA message. */ enum ReplyTypes { REPLY_ALL = 0x1, //0b00000001 }; #if OMNETPP /** * @brief Represents a host address within omnetpp */ typedef IPvXAddress HostAddress; /** * @brief Represents a port within omnetpp */ typedef uint16_t Port; #else typedef PortType Port; #endif } } #endif /* DEFINES_H */