1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef REMOTING_SIGNALING_XMPP_STREAM_PARSER_H_
6 #define REMOTING_SIGNALING_XMPP_STREAM_PARSER_H_
10 #include "base/callback.h"
18 // XmppStreamParser is used to parse XMPP stream. Data is fed to the parser
19 // using appendData() method and it calls |on_stanza_callback\ and
20 // |on_error_callback| specified using SetCallbacks().
21 class XmppStreamParser
{
23 typedef base::Callback
<void(scoped_ptr
<buzz::XmlElement
> stanza
)>
29 void SetCallbacks(const OnStanzaCallback
& on_stanza_callback
,
30 const base::Closure
& on_error_callback
);
32 void AppendData(const std::string
& data
);
37 scoped_ptr
<Core
> core_
;
39 DISALLOW_COPY_AND_ASSIGN(XmppStreamParser
);
42 } // namespace remoting
44 #endif // REMOTING_SIGNALING_XMPP_STREAM_PARSER_H_