Class: StropheRuby::StreamError

Inherits:
Object
  • Object
show all
Defined in:
ext/strophe_ruby.c,
ext/strophe_ruby.c

Instance Method Summary collapse

Instance Method Details

#error_typeObject

Get the type of a StreamError.



216
217
218
219
220
# File 'ext/strophe_ruby.c', line 216

static VALUE t_xmpp_stream_error_get_type(VALUE self) {
    xmpp_stream_error_t *stream_error;    
    Data_Get_Struct(self, xmpp_stream_error_t, stream_error);
    return INT2FIX(stream_error->type);
}

#stanzaObject

Get the stanza of a StreamError.



230
231
232
233
234
# File 'ext/strophe_ruby.c', line 230

static VALUE t_xmpp_stream_error_get_stanza(VALUE self) {
    xmpp_stream_error_t *stream_error;    
    Data_Get_Struct(self, xmpp_stream_error_t, stream_error);  
    return (NULL != stream_error->stanza) ? Data_Wrap_Struct(cStanza, 0, NULL, stream_error->stanza) : Qnil;
}

#textObject

Get the text of a StreamError.



223
224
225
226
227
# File 'ext/strophe_ruby.c', line 223

static VALUE t_xmpp_stream_error_get_text(VALUE self) {
    xmpp_stream_error_t *stream_error;    
    Data_Get_Struct(self, xmpp_stream_error_t, stream_error);  
    return (NULL != stream_error->text) ? rb_str_new2(stream_error->text) : Qnil;
}