Searched refs:XmlNode (Results 1 – 12 of 12) sorted by relevance
13 XmlNode::XmlNode(const std::string& name, in XmlNode() function in weave::XmlNode17 const std::string& XmlNode::name() const { in name()21 const std::string& XmlNode::text() const { in text()25 const std::map<std::string, std::string>& XmlNode::attributes() const { in attributes()29 const std::vector<std::unique_ptr<XmlNode>>& XmlNode::children() const { in children()33 bool XmlNode::GetAttribute(const std::string& name, std::string* value) const { in GetAttribute()42 std::string XmlNode::GetAttributeOrEmpty(const std::string& name) const { in GetAttributeOrEmpty()48 const XmlNode* XmlNode::FindFirstChild(const std::string& name_path, in FindFirstChild()53 std::vector<const XmlNode*> XmlNode::FindChildren(const std::string& name_path, in FindChildren()55 std::vector<const XmlNode*> children; in FindChildren()[all …]
23 class XmlNode final {25 XmlNode(const std::string& name,37 const std::vector<std::unique_ptr<XmlNode>>& children() const;54 const XmlNode* FindFirstChild(const std::string& name_path,76 std::vector<const XmlNode*> FindChildren(const std::string& name_path,80 void AddChild(std::unique_ptr<XmlNode> child);107 const XmlNode* FindChildHelper(const std::string& name_path,109 std::vector<const XmlNode*>* children) const;111 const XmlNode* parent_{nullptr}; // Weak pointer to the parent node, if any.115 std::vector<std::unique_ptr<XmlNode>> children_;[all …]
18 std::unique_ptr<XmlNode> Parse(const std::string& xml) { in Parse()27 node_.reset(new XmlNode{node_name, std::move(attributes)}); in OnStreamStart()32 void OnStanza(std::unique_ptr<XmlNode> stanza) override { in OnStanza()36 std::unique_ptr<XmlNode> node_;46 new XmlNode{"test_node", {{"attr1", "val1"}, {"attr2", "val2"}}}); in SetUp()50 static const XmlNode* GetParent(const XmlNode& node) { return node.parent_; } in GetParent()52 static void SetText(XmlNode* node, const std::string& text) { in SetText()56 static void AppendText(XmlNode* node, const std::string& text) { in AppendText()71 std::unique_ptr<XmlNode> node_;92 std::unique_ptr<XmlNode> child{new XmlNode{"child", {}}}; in TEST_F()[all …]
91 void OnStanza(std::unique_ptr<XmlNode> stanza) override;96 void HandleStanza(std::unique_ptr<XmlNode> stanza);97 void HandleMessageStanza(std::unique_ptr<XmlNode> stanza);111 void OnBindCompleted(std::unique_ptr<XmlNode> reply);112 void OnSessionEstablished(std::unique_ptr<XmlNode> reply);113 void OnSubscribed(std::unique_ptr<XmlNode> reply);118 void OnPingResponse(base::Time sent_time, std::unique_ptr<XmlNode> reply);
62 void OnStanza(std::unique_ptr<XmlNode> stanza) override { in OnStanza()78 std::vector<std::unique_ptr<XmlNode>> stanzas_;136 const XmlNode* stanza1 = stanzas_[0].get(); in TEST_F()139 const XmlNode* child1 = stanza1->children()[0].get(); in TEST_F()143 const XmlNode* child2 = stanza1->children()[1].get(); in TEST_F()151 const XmlNode* stanza2 = stanzas_[1].get(); in TEST_F()166 const XmlNode* child = stanza2->children().back().get(); in TEST_F()
145 void XmppChannel::OnStanza(std::unique_ptr<XmlNode> stanza) { in OnStanza()157 void XmppChannel::HandleStanza(std::unique_ptr<XmlNode> stanza) { in HandleStanza()221 void XmppChannel::OnBindCompleted(std::unique_ptr<XmlNode> reply) { in OnBindCompleted()226 const XmlNode* jid_node = reply->FindFirstChild("bind/jid", false); in OnBindCompleted()242 void XmppChannel::OnSessionEstablished(std::unique_ptr<XmlNode> reply) { in OnSessionEstablished()257 void XmppChannel::OnSubscribed(std::unique_ptr<XmlNode> reply) { in OnSubscribed()267 void XmppChannel::HandleMessageStanza(std::unique_ptr<XmlNode> stanza) { in HandleMessageStanza()268 const XmlNode* node = stanza->FindFirstChild("push:push/push:data", true); in HandleMessageStanza()444 std::unique_ptr<XmlNode> reply) { in OnPingResponse()
37 std::unique_ptr<XmlNode> Parse(const std::string& xml) { in Parse()46 node_.reset(new XmlNode{node_name, std::move(attributes)}); in OnStreamStart()51 void OnStanza(std::unique_ptr<XmlNode> stanza) override { in OnStanza()55 std::unique_ptr<XmlNode> node_;69 void OnResponseCallback(int id, std::unique_ptr<XmlNode> response) { in OnResponseCallback()
28 std::stack<std::unique_ptr<XmlNode>>{}.swap(node_stack_); in Reset()67 node_stack_.emplace(new XmlNode{node_name, std::move(attributes)}); in OnOpenElement()83 XmlNode* parent = node_stack_.top().get(); in OnCloseElement()92 XmlNode* node = node_stack_.top().get(); in OnCharData()
19 class XmlNode; variable49 virtual void OnStanza(std::unique_ptr<XmlNode> stanza) = 0;81 std::stack<std::unique_ptr<XmlNode>> node_stack_;
29 using ResponseCallback = base::Callback<void(std::unique_ptr<XmlNode>)>;66 bool HandleIqStanza(std::unique_ptr<XmlNode> stanza);
90 bool IqStanzaHandler::HandleIqStanza(std::unique_ptr<XmlNode> stanza) { in HandleIqStanza()
META-INF/ META-INF/MANIFEST.MF org/ org/robolectric/ org/ ...