class Openwsman::XmlDoc

Public Class Methods

new(*args) click to toggle source
SWIGINTERN VALUE
_wrap_new_XmlDoc(int argc, VALUE *argv, VALUE self) {
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  struct _WsXmlDoc *result = 0 ;
  
  if ((argc < 1) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","_WsXmlDoc", 1, argv[0] ));
  }
  arg1 = (char *)(buf1);
  if (argc > 1) {
    res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","_WsXmlDoc", 2, argv[1] ));
    }
    arg2 = (char *)(buf2);
  }
  result = (struct _WsXmlDoc *)new__WsXmlDoc((char const *)arg1,(char const *)arg2);
  DATA_PTR(self) = result;
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return self;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return Qnil;
}

Public Instance Methods

body(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_body(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  WsXmlNodeH result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","body", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  result = (WsXmlNodeH)_WsXmlDoc_body(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlNode, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}
context(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_context(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","context", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  result = (char *)_WsXmlDoc_context(arg1);
  vresult = SWIG_FromCharPtr((const char *)result);
  free(result);
  return vresult;
fail:
  return Qnil;
}
create_response_envelope(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_create_response_envelope(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  char *arg2 = (char *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  WsXmlDocH result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","create_response_envelope", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  if (argc > 0) {
    res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","create_response_envelope", 2, argv[0] ));
    }
    arg2 = (char *)(buf2);
  }
  result = (WsXmlDocH)_WsXmlDoc_create_response_envelope(arg1,(char const *)arg2);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return Qnil;
}
dump_file(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_dump_file(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","dump_file", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  {
    struct rb_io *fptr;
    
    
    
    Check_Type(argv[0], T_FILE);
    GetOpenFile(argv[0], fptr);
    /*rb_io_check_writable(fptr);*/
    
    arg2 = rb_io_stdio_file(fptr);
    
    
    
  }
  _WsXmlDoc_dump_file(arg1,arg2);
  return Qnil;
fail:
  return Qnil;
}
element(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_element(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  WsXmlNodeH result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","element", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","element", 2, argv[0] ));
  }
  arg2 = (char *)(buf2);
  result = (WsXmlNodeH)_WsXmlDoc_element(arg1,(char const *)arg2);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlNode, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return Qnil;
}
encode(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_encode(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  char *arg2 = (char *) "utf-8" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","encode", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  if (argc > 0) {
    res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","encode", 2, argv[0] ));
    }
    arg2 = (char *)(buf2);
  }
  result = (char *)_WsXmlDoc_encode(arg1,(char const *)arg2);
  vresult = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  free(result);
  return vresult;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return Qnil;
}
end_of_sequence?(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_end_of_sequenceq___(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","is_end_of_sequence", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  result = (int)_WsXmlDoc_is_end_of_sequence(arg1);
  vresult = (result != 0) ? Qtrue : Qfalse;
  return vresult;
fail:
  return Qnil;
}
envelope(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_envelope(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  WsXmlNodeH result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","envelope", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  result = (WsXmlNodeH)_WsXmlDoc_envelope(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlNode, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}
fault(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_fault(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  WsManFault *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","fault", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  result = (WsManFault *)_WsXmlDoc_fault(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__WsManFault, SWIG_POINTER_OWN |  0 );
  return vresult;
fail:
  return Qnil;
}
fault?(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_faultq___(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","is_fault", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  result = (int)_WsXmlDoc_is_fault(arg1);
  vresult = (result != 0) ? Qtrue : Qfalse;
  return vresult;
fail:
  return Qnil;
}
generate_fault(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_generate_fault(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  WsmanStatus *arg2 = (WsmanStatus *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  WsXmlDocH result;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","generate_fault", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p__WsmanStatus, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "WsmanStatus *","generate_fault", 2, argv[0] )); 
  }
  arg2 = (WsmanStatus *)(argp2);
  result = (WsXmlDocH)_WsXmlDoc_generate_fault(arg1,arg2);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}
header(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_header(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  WsXmlNodeH result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","header", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  result = (WsXmlNodeH)_WsXmlDoc_header(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlNode, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}
root(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_root(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  WsXmlNodeH result;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","root", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  result = (WsXmlNodeH)_WsXmlDoc_root(arg1);
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p___WsXmlNode, 0 |  0 );
  return vresult;
fail:
  return Qnil;
}
string(*args) click to toggle source
SWIGINTERN VALUE
_wrap_XmlDoc_string(int argc, VALUE *argv, VALUE self) {
  struct _WsXmlDoc *arg1 = (struct _WsXmlDoc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__WsXmlDoc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _WsXmlDoc *","string", 1, self )); 
  }
  arg1 = (struct _WsXmlDoc *)(argp1);
  result = (char *)_WsXmlDoc_string(arg1);
  vresult = SWIG_FromCharPtr((const char *)result);
  free(result);
  return vresult;
fail:
  return Qnil;
}