Class: ODPI::Dpi::DeqOptions

Inherits:
Object
  • Object
show all
Defined in:
ext/odpi_ext/rbdpi-deq-options.c

Instance Method Summary collapse

Constructor Details

#initializeObject


41
42
43
44
45
# File 'ext/odpi_ext/rbdpi.c', line 41

VALUE rbdpi_initialize_error(VALUE self)
{
    rb_raise(rb_eRuntimeError, "could not initialize by %s::new", rb_obj_classname(self));
    return Qnil;
}

Instance Method Details

#conditionObject


69
70
71
72
73
74
75
76
77
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 69

static VALUE deq_options_get_condition(VALUE self)
{
    deq_options_t *options = rbdpi_to_deq_options(self);
    const char *val;
    uint32_t len;

    CHK(dpiDeqOptions_getCondition(options->handle, &val, &len));
    return rb_external_str_new_with_enc(val, len, options->enc);
}

#condition=(val) ⇒ Object


155
156
157
158
159
160
161
162
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 155

static VALUE deq_options_set_condition(VALUE self, VALUE val)
{
    deq_options_t *options = rbdpi_to_deq_options(self);

    CHK_STR_ENC(val, options->enc);
    CHK(dpiDeqOptions_setCondition(options->handle, RSTRING_PTR(val), RSTRING_LEN(val)));
    return val;
}

#consumer_nameObject


79
80
81
82
83
84
85
86
87
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 79

static VALUE deq_options_get_consumer_name(VALUE self)
{
    deq_options_t *options = rbdpi_to_deq_options(self);
    const char *val;
    uint32_t len;

    CHK(dpiDeqOptions_getConsumerName(options->handle, &val, &len));
    return rb_external_str_new_with_enc(val, len, options->enc);
}

#consumer_name=(val) ⇒ Object


164
165
166
167
168
169
170
171
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 164

static VALUE deq_options_set_consumer_name(VALUE self, VALUE val)
{
    deq_options_t *options = rbdpi_to_deq_options(self);

    CHK_STR_ENC(val, options->enc);
    CHK(dpiDeqOptions_setConsumerName(options->handle, RSTRING_PTR(val), RSTRING_LEN(val)));
    return val;
}

#correlationObject


89
90
91
92
93
94
95
96
97
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 89

static VALUE deq_options_get_correlation(VALUE self)
{
    deq_options_t *options = rbdpi_to_deq_options(self);
    const char *val;
    uint32_t len;

    CHK(dpiDeqOptions_getCorrelation(options->handle, &val, &len));
    return rb_external_str_new_with_enc(val, len, options->enc);
}

#correlation=(val) ⇒ Object


172
173
174
175
176
177
178
179
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 172

static VALUE deq_options_set_correlation(VALUE self, VALUE val)
{
    deq_options_t *options = rbdpi_to_deq_options(self);

    CHK_STR_ENC(val, options->enc);
    CHK(dpiDeqOptions_setCorrelation(options->handle, RSTRING_PTR(val), RSTRING_LEN(val)));
    return val;
}

#delivery_mode=(val) ⇒ Object


181
182
183
184
185
186
187
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 181

static VALUE deq_options_set_delivery_mode(VALUE self, VALUE val)
{
    deq_options_t *options = rbdpi_to_deq_options(self);

    CHK(dpiDeqOptions_setDeliveryMode(options->handle, rbdpi_to_dpiMessageDeliveryMode(val)));
    return val;
}

#initialize_copy(other) ⇒ Object


58
59
60
61
62
63
64
65
66
67
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 58

static VALUE deq_options_initialize_copy(VALUE self, VALUE other)
{
    deq_options_t *deq_options = rbdpi_to_deq_options(self);

    *deq_options = *rbdpi_to_deq_options(other);
    if (deq_options->handle != NULL) {
        CHK(dpiDeqOptions_addRef(deq_options->handle));
    }
    return self;
}

#modeObject


99
100
101
102
103
104
105
106
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 99

static VALUE deq_options_get_mode(VALUE self)
{
    deq_options_t *options = rbdpi_to_deq_options(self);
    dpiDeqMode val;

    CHK(dpiDeqOptions_getMode(options->handle, &val));
    return rbdpi_from_dpiDeqMode(val);
}

#mode=(val) ⇒ Object


189
190
191
192
193
194
195
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 189

static VALUE deq_options_set_mode(VALUE self, VALUE val)
{
    deq_options_t *options = rbdpi_to_deq_options(self);

    CHK(dpiDeqOptions_setMode(options->handle, rbdpi_to_dpiDeqMode(val)));
    return val;
}

#msg_idObject


108
109
110
111
112
113
114
115
116
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 108

static VALUE deq_options_get_msg_id(VALUE self)
{
    deq_options_t *options = rbdpi_to_deq_options(self);
    const char *val;
    uint32_t len;

    CHK(dpiDeqOptions_getMsgId(options->handle, &val, &len));
    return rb_external_str_new_with_enc(val, len, options->enc);
}

#msg_id=(val) ⇒ Object


197
198
199
200
201
202
203
204
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 197

static VALUE deq_options_set_msg_id(VALUE self, VALUE val)
{
    deq_options_t *options = rbdpi_to_deq_options(self);

    CHK_STR_ENC(val, options->enc);
    CHK(dpiDeqOptions_setMsgId(options->handle, RSTRING_PTR(val), RSTRING_LEN(val)));
    return val;
}

118
119
120
121
122
123
124
125
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 118

static VALUE deq_options_get_navigation(VALUE self)
{
    deq_options_t *options = rbdpi_to_deq_options(self);
    dpiDeqNavigation val;

    CHK(dpiDeqOptions_getNavigation(options->handle, &val));
    return rbdpi_from_dpiDeqNavigation(val);
}

206
207
208
209
210
211
212
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 206

static VALUE deq_options_set_navigation(VALUE self, VALUE val)
{
    deq_options_t *options = rbdpi_to_deq_options(self);

    CHK(dpiDeqOptions_setNavigation(options->handle, rbdpi_to_dpiDeqNavigation(val)));
    return val;
}

#transformationObject


127
128
129
130
131
132
133
134
135
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 127

static VALUE deq_options_get_transformation(VALUE self)
{
    deq_options_t *options = rbdpi_to_deq_options(self);
    const char *val;
    uint32_t len;

    CHK(dpiDeqOptions_getTransformation(options->handle, &val, &len));
    return rb_external_str_new_with_enc(val, len, options->enc);
}

#transformation=(val) ⇒ Object


214
215
216
217
218
219
220
221
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 214

static VALUE deq_options_set_transformation(VALUE self, VALUE val)
{
    deq_options_t *options = rbdpi_to_deq_options(self);

    CHK_STR_ENC(val, options->enc);
    CHK(dpiDeqOptions_setTransformation(options->handle, RSTRING_PTR(val), RSTRING_LEN(val)));
    return val;
}

#visibilityObject


137
138
139
140
141
142
143
144
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 137

static VALUE deq_options_get_visibility(VALUE self)
{
    deq_options_t *options = rbdpi_to_deq_options(self);
    dpiVisibility val;

    CHK(dpiDeqOptions_getVisibility(options->handle, &val));
    return rbdpi_from_dpiVisibility(val);
}

#visibility=(val) ⇒ Object


223
224
225
226
227
228
229
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 223

static VALUE deq_options_set_visibility(VALUE self, VALUE val)
{
    deq_options_t *options = rbdpi_to_deq_options(self);

    CHK(dpiDeqOptions_setVisibility(options->handle, rbdpi_to_dpiVisibility(val)));
    return val;
}

#waitObject


146
147
148
149
150
151
152
153
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 146

static VALUE deq_options_get_wait(VALUE self)
{
    deq_options_t *options = rbdpi_to_deq_options(self);
    uint32_t val;

    CHK(dpiDeqOptions_getWait(options->handle, &val));
    return UINT2NUM(val);
}

#wait=(val) ⇒ Object


231
232
233
234
235
236
237
# File 'ext/odpi_ext/rbdpi-deq-options.c', line 231

static VALUE deq_options_set_wait(VALUE self, VALUE val)
{
    deq_options_t *options = rbdpi_to_deq_options(self);

    CHK(dpiDeqOptions_setWait(options->handle, NUM2UINT(val)));
    return val;
}