diff --git a/QCommsy.pro b/QCommsy.pro index b7d4ef1..5b5521d 100644 --- a/QCommsy.pro +++ b/QCommsy.pro @@ -22,7 +22,8 @@ SOURCES += \ HEADERS += \ libcommsy.hpp \ - libcommsyauth.hpp + libcommsyauth.hpp \ + libcommsylowlevel.hpp FORMS += \ failure.ui \ diff --git a/libcommsy.cpp b/libcommsy.cpp index efd4cac..b90a5d5 100644 --- a/libcommsy.cpp +++ b/libcommsy.cpp @@ -188,6 +188,7 @@ std::string gumbo_find_text_by_tag(GumboNode *node, const GumboTag& searchtag) { } +namespace libCommsyLowlevel { auto get_posts(GumboNode *node) { std::vector posts; gumbo_search_by_class(&posts, node, "uk-comment", GUMBO_TAG_ARTICLE); @@ -314,8 +315,10 @@ std::string get_post_desc(const std::string& post_url, const std::string& server // Return first occurence return result_string; } +}; +using namespace libCommsyLowlevel; // Class functions bool libCommsy::postExists(unsigned long postID) { return postID < numposts; diff --git a/libcommsy.hpp b/libcommsy.hpp index 706398b..45b2e99 100644 --- a/libcommsy.hpp +++ b/libcommsy.hpp @@ -68,3 +68,7 @@ public: class descDownloadError {}; class scrapError {}; }; + +namespace libCommsyLowlevel { + std::string get_post_desc(const std::string& post_url, const std::string& server_sid); +} diff --git a/libcommsylowlevel.hpp b/libcommsylowlevel.hpp new file mode 100644 index 0000000..e69de29