Module: Cqpid

Defined in:
ext/cqpid/cqpid.cpp

Defined Under Namespace

Classes: Address, Connection, Duration, EncodingException, FailoverUpdates, Logger, LoggerOutput, Message, Receiver, Sender, Session

Constant Summary collapse

Trace =
SWIG_From_int(static_cast< int >(qpid::messaging::trace))
Debug =
SWIG_From_int(static_cast< int >(qpid::messaging::debug))
Info =
SWIG_From_int(static_cast< int >(qpid::messaging::info))
Notice =
SWIG_From_int(static_cast< int >(qpid::messaging::notice))
Warning =
SWIG_From_int(static_cast< int >(qpid::messaging::warning))
Error =
SWIG_From_int(static_cast< int >(qpid::messaging::error))
Critical =
SWIG_From_int(static_cast< int >(qpid::messaging::critical))

Class Method Summary collapse

Class Method Details

.*(*args, self) ⇒ Object



5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
# File 'ext/cqpid/cqpid.cpp', line 5101

SWIGINTERN VALUE _wrap___mul__(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[2];
  int ii;
  
  argc = nargs;
  if (argc > 2) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Duration, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = FIXNUM_P(argv[1]);
      }
      if (_v) {
        return _wrap___mul____SWIG_0(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = FIXNUM_P(argv[0]);
    }
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_qpid__messaging__Duration, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap___mul____SWIG_1(nargs, args, self);
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 2, "__mul__", 
    "    qpid::messaging::Duration __mul__(qpid::messaging::Duration const &duration, uint64_t multiplier)\n"
    "    qpid::messaging::Duration __mul__(uint64_t multiplier, qpid::messaging::Duration const &duration)\n");
  
  return Qnil;
}

.==(*args) ⇒ Object

call-seq:

==(a, b) -> bool

Equality comparison operator.



5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
# File 'ext/cqpid/cqpid.cpp', line 5158

SWIGINTERN VALUE
_wrap___eq__(int argc, VALUE *argv, VALUE self) {
  qpid::messaging::Duration *arg1 = 0 ;
  qpid::messaging::Duration *arg2 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_qpid__messaging__Duration,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "qpid::messaging::Duration const &","qpid::messaging::operator ==", 1, argv[0] )); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "qpid::messaging::Duration const &","qpid::messaging::operator ==", 1, argv[0])); 
  }
  arg1 = reinterpret_cast< qpid::messaging::Duration * >(argp1);
  res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_qpid__messaging__Duration,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "qpid::messaging::Duration const &","qpid::messaging::operator ==", 2, argv[1] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "qpid::messaging::Duration const &","qpid::messaging::operator ==", 2, argv[1])); 
  }
  arg2 = reinterpret_cast< qpid::messaging::Duration * >(argp2);
  {
    static VALUE eMessagingError = rb_define_class("MessagingError",
      rb_eStandardError);
    
    try {
      result = (bool)qpid::messaging::operator ==((qpid::messaging::Duration const &)*arg1,(qpid::messaging::Duration const &)*arg2);
    }
    catch(qpid::messaging::ConnectionError& error) {
      static VALUE merror = rb_define_class("ConnectionError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TransportFailure& error) {
      static VALUE merror = rb_define_class("TransportFailure", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TransactionAborted& error) {
      static VALUE merror = rb_define_class("TransactionAborted", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TransactionUnknown& error) {
      static VALUE merror = rb_define_class("TransactionUnknown", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TransactionError& error) {
      static VALUE merror = rb_define_class("TransactionError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::UnauthorizedAccess& error) {
      static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::SessionError& error) {
      static VALUE merror = rb_define_class("SessionError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TargetCapacityExceeded& error) {
      static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::SendError& error) {
      static VALUE merror = rb_define_class("SendError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::SenderError& error) {
      static VALUE merror = rb_define_class("SenderError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::NoMessageAvailable& error) {
      static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::FetchError& error) {
      static VALUE merror = rb_define_class("FetchError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::ReceiverError& error) {
      static VALUE merror = rb_define_class("ReceiverError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::InvalidOptionString& error) {
      static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::KeyError& error) {
      static VALUE merror = rb_define_class("KeyError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::AssertionFailed& error) {
      static VALUE merror = rb_define_class("AssertionFailed", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::NotFound& error) {
      static VALUE merror = rb_define_class("NotFound", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::ResolutionError& error) {
      static VALUE merror = rb_define_class("ResolutionError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::MalformedAddress& error) {
      static VALUE merror = rb_define_class("MalformedAddress", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::AddressError& error) {
      static VALUE merror = rb_define_class("AddressError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::LinkError& error) {
      static VALUE merror = rb_define_class("LinkError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::MessagingException& error) {
      rb_raise(eMessagingError, "%s", error.what());
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}

.decode(*args, self) ⇒ Object



10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
# File 'ext/cqpid/cqpid.cpp', line 10999

SWIGINTERN VALUE _wrap_decode(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs;
  if (argc > 3) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Message, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (TYPE(argv[1]) == T_HASH) ? 1 : 0;
      }
      if (_v) {
        return _wrap_decode__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Message, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (TYPE(argv[1]) == T_ARRAY) ? 1 : 0;
      }
      if (_v) {
        return _wrap_decode__SWIG_3(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Message, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (TYPE(argv[1]) == T_ARRAY) ? 1 : 0;
      }
      if (_v) {
        int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_decode__SWIG_2(nargs, args, self);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qpid__messaging__Message, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = (TYPE(argv[1]) == T_HASH) ? 1 : 0;
      }
      if (_v) {
        int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_decode__SWIG_0(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "decode", 
    "    void decode(qpid::messaging::Message const &message, qpid::types::Variant::Map &map, std::string const &encoding)\n"
    "    void decode(qpid::messaging::Message const &message, qpid::types::Variant::Map &map)\n"
    "    void decode(qpid::messaging::Message const &message, qpid::types::Variant::List &list, std::string const &encoding)\n"
    "    void decode(qpid::messaging::Message const &message, qpid::types::Variant::List &list)\n");
  
  return Qnil;
}

.decodeList(*args) ⇒ Object



24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
# File 'ext/cqpid/cqpid.cpp', line 24238

SWIGINTERN VALUE
_wrap_decodeList(int argc, VALUE *argv, VALUE self) {
  qpid::messaging::Message *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  qpid::types::Variant::List *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_qpid__messaging__Message,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "qpid::messaging::Message const &","decodeList", 1, argv[0] )); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "qpid::messaging::Message const &","decodeList", 1, argv[0])); 
  }
  arg1 = reinterpret_cast< qpid::messaging::Message * >(argp1);
  {
    static VALUE eMessagingError = rb_define_class("MessagingError",
      rb_eStandardError);
    
    try {
      result = (qpid::types::Variant::List *) &decodeList((qpid::messaging::Message const &)*arg1);
    }
    catch(qpid::messaging::ConnectionError& error) {
      static VALUE merror = rb_define_class("ConnectionError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TransportFailure& error) {
      static VALUE merror = rb_define_class("TransportFailure", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TransactionAborted& error) {
      static VALUE merror = rb_define_class("TransactionAborted", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TransactionUnknown& error) {
      static VALUE merror = rb_define_class("TransactionUnknown", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TransactionError& error) {
      static VALUE merror = rb_define_class("TransactionError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::UnauthorizedAccess& error) {
      static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::SessionError& error) {
      static VALUE merror = rb_define_class("SessionError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TargetCapacityExceeded& error) {
      static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::SendError& error) {
      static VALUE merror = rb_define_class("SendError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::SenderError& error) {
      static VALUE merror = rb_define_class("SenderError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::NoMessageAvailable& error) {
      static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::FetchError& error) {
      static VALUE merror = rb_define_class("FetchError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::ReceiverError& error) {
      static VALUE merror = rb_define_class("ReceiverError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::InvalidOptionString& error) {
      static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::KeyError& error) {
      static VALUE merror = rb_define_class("KeyError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::AssertionFailed& error) {
      static VALUE merror = rb_define_class("AssertionFailed", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::NotFound& error) {
      static VALUE merror = rb_define_class("NotFound", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::ResolutionError& error) {
      static VALUE merror = rb_define_class("ResolutionError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::MalformedAddress& error) {
      static VALUE merror = rb_define_class("MalformedAddress", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::AddressError& error) {
      static VALUE merror = rb_define_class("AddressError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::LinkError& error) {
      static VALUE merror = rb_define_class("LinkError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::MessagingException& error) {
      rb_raise(eMessagingError, "%s", error.what());
    }
  }
  {
    vresult = ListToRb(result);
  }
  return vresult;
fail:
  return Qnil;
}

.decodeMap(*args) ⇒ Object



24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
# File 'ext/cqpid/cqpid.cpp', line 24115

SWIGINTERN VALUE
_wrap_decodeMap(int argc, VALUE *argv, VALUE self) {
  qpid::messaging::Message *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  qpid::types::Variant::Map *result = 0 ;
  VALUE vresult = Qnil;
  
  if ((argc < 1) || (argc > 1)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_qpid__messaging__Message,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "qpid::messaging::Message const &","decodeMap", 1, argv[0] )); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "qpid::messaging::Message const &","decodeMap", 1, argv[0])); 
  }
  arg1 = reinterpret_cast< qpid::messaging::Message * >(argp1);
  {
    static VALUE eMessagingError = rb_define_class("MessagingError",
      rb_eStandardError);
    
    try {
      result = (qpid::types::Variant::Map *) &decodeMap((qpid::messaging::Message const &)*arg1);
    }
    catch(qpid::messaging::ConnectionError& error) {
      static VALUE merror = rb_define_class("ConnectionError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TransportFailure& error) {
      static VALUE merror = rb_define_class("TransportFailure", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TransactionAborted& error) {
      static VALUE merror = rb_define_class("TransactionAborted", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TransactionUnknown& error) {
      static VALUE merror = rb_define_class("TransactionUnknown", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TransactionError& error) {
      static VALUE merror = rb_define_class("TransactionError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::UnauthorizedAccess& error) {
      static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::SessionError& error) {
      static VALUE merror = rb_define_class("SessionError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::TargetCapacityExceeded& error) {
      static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::SendError& error) {
      static VALUE merror = rb_define_class("SendError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::SenderError& error) {
      static VALUE merror = rb_define_class("SenderError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::NoMessageAvailable& error) {
      static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::FetchError& error) {
      static VALUE merror = rb_define_class("FetchError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::ReceiverError& error) {
      static VALUE merror = rb_define_class("ReceiverError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::InvalidOptionString& error) {
      static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::KeyError& error) {
      static VALUE merror = rb_define_class("KeyError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::AssertionFailed& error) {
      static VALUE merror = rb_define_class("AssertionFailed", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::NotFound& error) {
      static VALUE merror = rb_define_class("NotFound", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::ResolutionError& error) {
      static VALUE merror = rb_define_class("ResolutionError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::MalformedAddress& error) {
      static VALUE merror = rb_define_class("MalformedAddress", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::AddressError& error) {
      static VALUE merror = rb_define_class("AddressError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::LinkError& error) {
      static VALUE merror = rb_define_class("LinkError", eMessagingError);
      rb_raise(merror, "%s", error.what());
    }
    catch(qpid::messaging::MessagingException& error) {
      rb_raise(eMessagingError, "%s", error.what());
    }
  }
  {
    vresult = MapToRb(result);
  }
  return vresult;
fail:
  return Qnil;
}

.encode(*args, self) ⇒ Object



11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
# File 'ext/cqpid/cqpid.cpp', line 11631

SWIGINTERN VALUE _wrap_encode(int nargs, VALUE *args, VALUE self) {
  int argc;
  VALUE argv[3];
  int ii;
  
  argc = nargs;
  if (argc > 3) SWIG_fail;
  for (ii = 0; (ii < argc); ++ii) {
    argv[ii] = args[ii];
  }
  if (argc == 2) {
    int _v;
    {
      _v = (TYPE(argv[0]) == T_HASH) ? 1 : 0;
    }
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_qpid__messaging__Message, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_encode__SWIG_1(nargs, args, self);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = (TYPE(argv[0]) == T_ARRAY) ? 1 : 0;
    }
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_qpid__messaging__Message, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_encode__SWIG_3(nargs, args, self);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = (TYPE(argv[0]) == T_ARRAY) ? 1 : 0;
    }
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_qpid__messaging__Message, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_encode__SWIG_2(nargs, args, self);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = (TYPE(argv[0]) == T_HASH) ? 1 : 0;
    }
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_qpid__messaging__Message, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_encode__SWIG_0(nargs, args, self);
        }
      }
    }
  }
  
fail:
  Ruby_Format_OverloadedError( argc, 3, "encode", 
    "    void encode(qpid::types::Variant::Map const &map, qpid::messaging::Message &message, std::string const &encoding)\n"
    "    void encode(qpid::types::Variant::Map const &map, qpid::messaging::Message &message)\n"
    "    void encode(qpid::types::Variant::List const &list, qpid::messaging::Message &message, std::string const &encoding)\n"
    "    void encode(qpid::types::Variant::List const &list, qpid::messaging::Message &message)\n");
  
  return Qnil;
}