mirror of
https://gitlab.com/niansa/qcommsy.git
synced 2025-03-06 20:53:33 +01:00
Added libCommsyLowlevel namespace
This commit is contained in:
parent
9b200f79c1
commit
f9b56f2f36
4 changed files with 9 additions and 1 deletions
|
@ -22,7 +22,8 @@ SOURCES += \
|
|||
|
||||
HEADERS += \
|
||||
libcommsy.hpp \
|
||||
libcommsyauth.hpp
|
||||
libcommsyauth.hpp \
|
||||
libcommsylowlevel.hpp
|
||||
|
||||
FORMS += \
|
||||
failure.ui \
|
||||
|
|
|
@ -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<GumboNode *> 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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
0
libcommsylowlevel.hpp
Normal file
0
libcommsylowlevel.hpp
Normal file
Loading…
Add table
Reference in a new issue