diff options
Diffstat (limited to 'src/lib/utils/parsing.h')
-rw-r--r-- | src/lib/utils/parsing.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/utils/parsing.h b/src/lib/utils/parsing.h index f4936bd68..32236236e 100644 --- a/src/lib/utils/parsing.h +++ b/src/lib/utils/parsing.h @@ -24,7 +24,7 @@ namespace Botan { * @param scan_name the name * @return the name components */ -BOTAN_DLL std::vector<std::string> +BOTAN_PUBLIC_API(2,0) std::vector<std::string> parse_algorithm_name(const std::string& scan_name); /** @@ -33,7 +33,7 @@ parse_algorithm_name(const std::string& scan_name); * @param delim the delimitor * @return string split by delim */ -BOTAN_DLL std::vector<std::string> split_on( +BOTAN_PUBLIC_API(2,0) std::vector<std::string> split_on( const std::string& str, char delim); /** @@ -41,14 +41,14 @@ BOTAN_DLL std::vector<std::string> split_on( * @param str the input string * @param pred the predicate */ -BOTAN_DLL std::vector<std::string> +BOTAN_PUBLIC_API(2,0) std::vector<std::string> split_on_pred(const std::string& str, std::function<bool (char)> pred); /** * Erase characters from a string */ -BOTAN_DLL std::string erase_chars(const std::string& str, const std::set<char>& chars); +BOTAN_PUBLIC_API(2,0) std::string erase_chars(const std::string& str, const std::set<char>& chars); /** * Replace a character in a string @@ -57,7 +57,7 @@ BOTAN_DLL std::string erase_chars(const std::string& str, const std::set<char>& * @param to_char the character to replace it with * @return str with all instances of from_char replaced by to_char */ -BOTAN_DLL std::string replace_char(const std::string& str, +BOTAN_PUBLIC_API(2,0) std::string replace_char(const std::string& str, char from_char, char to_char); @@ -68,7 +68,7 @@ BOTAN_DLL std::string replace_char(const std::string& str, * @param to_char the character to replace it with * @return str with all instances of from_chars replaced by to_char */ -BOTAN_DLL std::string replace_chars(const std::string& str, +BOTAN_PUBLIC_API(2,0) std::string replace_chars(const std::string& str, const std::set<char>& from_chars, char to_char); @@ -78,7 +78,7 @@ BOTAN_DLL std::string replace_chars(const std::string& str, * @param delim the delimitor * @return string joined by delim */ -BOTAN_DLL std::string string_join(const std::vector<std::string>& strs, +BOTAN_PUBLIC_API(2,0) std::string string_join(const std::vector<std::string>& strs, char delim); /** @@ -86,7 +86,7 @@ BOTAN_DLL std::string string_join(const std::vector<std::string>& strs, * @param oid the OID in string form * @return OID components */ -BOTAN_DLL std::vector<uint32_t> parse_asn1_oid(const std::string& oid); +BOTAN_PUBLIC_API(2,0) std::vector<uint32_t> parse_asn1_oid(const std::string& oid); /** * Compare two names using the X.509 comparison algorithm @@ -94,7 +94,7 @@ BOTAN_DLL std::vector<uint32_t> parse_asn1_oid(const std::string& oid); * @param name2 the second name * @return true if name1 is the same as name2 by the X.509 comparison rules */ -BOTAN_DLL bool x500_name_cmp(const std::string& name1, +BOTAN_PUBLIC_API(2,0) bool x500_name_cmp(const std::string& name1, const std::string& name2); /** @@ -102,7 +102,7 @@ BOTAN_DLL bool x500_name_cmp(const std::string& name1, * @param str the string to convert * @return number value of the string */ -BOTAN_DLL uint32_t to_u32bit(const std::string& str); +BOTAN_PUBLIC_API(2,0) uint32_t to_u32bit(const std::string& str); /** * Convert a string to a number @@ -116,27 +116,27 @@ BOTAN_DLL uint16_t to_uint16(const std::string& str); * @param timespec the time specification * @return number of seconds represented by timespec */ -BOTAN_DLL uint32_t timespec_to_u32bit(const std::string& timespec); +BOTAN_PUBLIC_API(2,0) uint32_t timespec_to_u32bit(const std::string& timespec); /** * Convert a string representation of an IPv4 address to a number * @param ip_str the string representation * @return integer IPv4 address */ -BOTAN_DLL uint32_t string_to_ipv4(const std::string& ip_str); +BOTAN_PUBLIC_API(2,0) uint32_t string_to_ipv4(const std::string& ip_str); /** * Convert an IPv4 address to a string * @param ip_addr the IPv4 address to convert * @return string representation of the IPv4 address */ -BOTAN_DLL std::string ipv4_to_string(uint32_t ip_addr); +BOTAN_PUBLIC_API(2,0) std::string ipv4_to_string(uint32_t ip_addr); -std::map<std::string, std::string> BOTAN_DLL read_cfg(std::istream& is); +std::map<std::string, std::string> BOTAN_PUBLIC_API(2,0) read_cfg(std::istream& is); -std::string BOTAN_DLL clean_ws(const std::string& s); +std::string BOTAN_PUBLIC_API(2,0) clean_ws(const std::string& s); -bool BOTAN_DLL host_wildcard_match(const std::string& wildcard, const std::string& host); +bool BOTAN_PUBLIC_API(2,0) host_wildcard_match(const std::string& wildcard, const std::string& host); } |