// Copyright Onix Solutions Limited [OnixS]. All rights reserved. // // This software owned by Onix Solutions Limited [OnixS] and is // protected by copyright law and international copyright treaties. // // Access to and use of the software is governed by the terms of the applicable // OnixS Software Services Agreement (the Agreement) and Customer end user license // agreements granting a non-assignable, non-transferable and non-exclusive license // to use the software for it's own data processing purposes under the terms defined // in the Agreement. // // Except as otherwise granted within the terms of the Agreement, copying or // reproduction of any part of this source code or associated reference material // to any other location for further reproduction or redistribution, and any // amendments to this copyright notice, are expressly prohibited. // // Any reproduction or redistribution for sale or hiring of the Software not in // accordance with the terms of the Agreement is a violation of copyright law. // #pragma once #include #include #include ONIXS_CMEMDH_NAMESPACE_BEGIN /// List of network interfaces. typedef std::vector NifList; /// Network feed connection attributes. ONIXS_CMEMDH_LTWT_CLASS NetFeedConnection { UInt32 port_; std::string ip_; NifList nifs_; public: /// Initializes blank instance. NetFeedConnection() : port_(0) , ip_() , nifs_() { } /// Cleans everything up. ~NetFeedConnection() { } /// Identifies connection port. UInt32 port() const { return port_; } /// Updates connection port. void port(UInt32 port) { port_ = port; } /// Identifies connection host IP. const std::string& ip() const { return ip_; } /// Updates connection host IP. void ip(const std::string& ip) { ip_ = ip; } /// List of network interfaces on which /// connection is to be binded (if binding /// to network interfaces is applicable). NifList& nifs() { return nifs_; } /// List of network interfaces on which /// connection is to be binded (if binding /// to network interfaces is applicable). const NifList& nifs() const { return nifs_; } }; /// Serializes feed connection attributes to a given string. ONIXS_CMEMDH_EXPORTED void toStr( std::string&, const NetFeedConnection&); /// Serializes feed connection attributes to a given string. inline std::string toStr( const NetFeedConnection& connection) { std::string str; toStr(str, connection); return str; } ONIXS_CMEMDH_NAMESPACE_END