// Generated by Haxe 4.3.3
#ifndef INCLUDED_snikket_streams_XmppStropheStream
#define INCLUDED_snikket_streams_XmppStropheStream
#ifndef HXCPP_H
#include <hxcpp.h>
#endif
#ifndef INCLUDED_snikket_GenericStream
#include <snikket/GenericStream.h>
#endif
#ifndef INCLUDED_18a1146676e1af0b
#define INCLUDED_18a1146676e1af0b
#include "strophe.h"
#endif
HX_DECLARE_CLASS1(haxe,IMap)
HX_DECLARE_CLASS1(haxe,Timer)
HX_DECLARE_CLASS2(haxe,ds,BalancedTree)
HX_DECLARE_CLASS2(haxe,ds,EnumValueMap)
HX_DECLARE_CLASS1(snikket,EventEmitter)
HX_DECLARE_CLASS1(snikket,GenericStream)
HX_DECLARE_CLASS1(snikket,IqRequestType)
HX_DECLARE_CLASS1(snikket,IqResult)
HX_DECLARE_CLASS1(snikket,Stanza)
HX_DECLARE_CLASS2(snikket,_Stanza,NodeInterface)
HX_DECLARE_CLASS2(snikket,streams,XmppStropheStream)
#include "strophe.h"
namespace snikket{
namespace streams{
class HXCPP_CLASS_ATTRIBUTES XmppStropheStream_obj : public ::snikket::GenericStream_obj
{
public:
typedef ::snikket::GenericStream_obj super;
typedef XmppStropheStream_obj OBJ_;
XmppStropheStream_obj();
public:
enum { _hx_ClassId = 0x7e6ea620 };
void __construct();
inline void *operator new(size_t inSize, bool inContainer=true,const char *inName="snikket.streams.XmppStropheStream")
{ return ::hx::Object::operator new(inSize,inContainer,inName); }
inline void *operator new(size_t inSize, int extra)
{ return ::hx::Object::operator new(inSize+extra,true,"snikket.streams.XmppStropheStream"); }
static ::hx::ObjectPtr< XmppStropheStream_obj > __new();
static ::hx::ObjectPtr< XmppStropheStream_obj > __alloc(::hx::Ctx *_hx_ctx);
static void * _hx_vtable;
static Dynamic __CreateEmpty();
static Dynamic __Create(::hx::DynamicArray inArgs);
//~XmppStropheStream_obj();
HX_DO_RTTI_ALL;
::hx::Val __Field(const ::String &inString, ::hx::PropertyAccess inCallProp);
static bool __GetStatic(const ::String &inString, Dynamic &outValue, ::hx::PropertyAccess inCallProp);
::hx::Val __SetField(const ::String &inString,const ::hx::Val &inValue, ::hx::PropertyAccess inCallProp);
void __GetFields(Array< ::String> &outFields);
static void __register();
void __Mark(HX_MARK_PARAMS);
void __Visit(HX_VISIT_PARAMS);
bool _hx_isInstanceOf(int inClassId);
::String __ToString() const { return HX_("XmppStropheStream",da,d9,8d,8c); }
static int strophe_certfail_handler( const xmpp_tlscert_t* cert,const char* err);
static void strophe_fast_token_handler( xmpp_conn_t* conn,const char* token,void* userdata);
static void strophe_sm_handler( xmpp_conn_t* conn,void* userdata,const unsigned char* sm_state,size_t sm_state_len);
static void strophe_sm_ack_handler( xmpp_conn_t* conn,void* userdata,const char* id);
static void strophe_sm_fail_handler( xmpp_conn_t* conn,void* userdata,const char* id);
static int strophe_stanza( xmpp_conn_t* conn, xmpp_stanza_t* sstanza,void* userdata);
static void strophe_connect( xmpp_conn_t* conn, xmpp_conn_event_t event,int error, xmpp_stream_error_t* stream_error,int resumed,void* userdata);
static ::snikket::Stanza parseStanza(::String s);
static ::Dynamic parseStanza_dyn();
static ::snikket::Stanza convertToStanza( xmpp_stanza_t* el,void* dummy);
::haxe::ds::EnumValueMap iqHandlers;
::Array< ::Dynamic> pending;
::haxe::Timer pollTimer;
bool ready;
bool stanzaThisPoll;
::String newId();
void onIq( ::snikket::IqRequestType type,::String tag,::String xmlns, ::Dynamic handler);
void connect(::String jid,::Array< unsigned char > sm);
void disconnect();
void poll( ::Dynamic timeout);
::Dynamic poll_dyn();
xmpp_stanza_t* convertFromStanza( ::snikket::Stanza el);
::Dynamic convertFromStanza_dyn();
void sendStanza( ::snikket::Stanza stanza);
void finalize();
::Dynamic finalize_dyn();
private: static xmpp_ctx_t *ctx;
private: xmpp_conn_t *conn;
};
} // end namespace snikket
} // end namespace streams
#endif /* INCLUDED_snikket_streams_XmppStropheStream */