00001
00002
00003
00004
00005
00011 #include <stdlib.h>
00012 #include <yaz/ill.h>
00013
00014 bool_t *ill_get_bool (struct ill_get_ctl *gc, const char *name,
00015 const char *sub, int val)
00016 {
00017 ODR o = gc->odr;
00018 char element[128];
00019 const char *v;
00020 bool_t *r = (bool_t *) odr_malloc (o, sizeof(*r));
00021
00022 strcpy(element, name);
00023 if (sub)
00024 {
00025 strcat (element, ",");
00026 strcat (element, sub);
00027 }
00028
00029 v = (gc->f)(gc->clientData, element);
00030 if (v)
00031 val = atoi(v);
00032 else if (val < 0)
00033 return 0;
00034 *r = val;
00035 return r;
00036 }
00037
00038 int *ill_get_int (struct ill_get_ctl *gc, const char *name,
00039 const char *sub, int val)
00040 {
00041 ODR o = gc->odr;
00042 char element[128];
00043 const char *v;
00044
00045 strcpy(element, name);
00046 if (sub)
00047 {
00048 strcat (element, ",");
00049 strcat (element, sub);
00050 }
00051 v = (gc->f)(gc->clientData, element);
00052 if (v)
00053 val = atoi(v);
00054 return odr_intdup(o, val);
00055 }
00056
00057 int *ill_get_enumerated (struct ill_get_ctl *gc, const char *name,
00058 const char *sub, int val)
00059 {
00060 return ill_get_int(gc, name, sub, val);
00061 }
00062
00063 ILL_String *ill_get_ILL_String_x (struct ill_get_ctl *gc, const char *name,
00064 const char *sub, const char *vdefault)
00065 {
00066 ILL_String *r = (ILL_String *) odr_malloc (gc->odr, sizeof(*r));
00067 char element[128];
00068 const char *v;
00069
00070 strcpy(element, name);
00071 if (sub)
00072 {
00073 strcat (element, ",");
00074 strcat (element, sub);
00075 }
00076 v = (gc->f)(gc->clientData, element);
00077 if (!v)
00078 v = vdefault;
00079 if (!v)
00080 return 0;
00081 r->which = ILL_String_GeneralString;
00082 r->u.GeneralString = odr_strdup (gc->odr, v);
00083 return r;
00084 }
00085
00086 ILL_String *ill_get_ILL_String(struct ill_get_ctl *gc, const char *name,
00087 const char *sub)
00088 {
00089 return ill_get_ILL_String_x (gc, name, sub, 0);
00090 }
00091
00092 ILL_ISO_Date *ill_get_ILL_ISO_Date (struct ill_get_ctl *gc, const char *name,
00093 const char *sub, const char *val)
00094 {
00095 char element[128];
00096 const char *v;
00097
00098 strcpy(element, name);
00099 if (sub)
00100 {
00101 strcat (element, ",");
00102 strcat (element, sub);
00103 }
00104 v = (gc->f)(gc->clientData, element);
00105 if (!v)
00106 v = val;
00107 if (!v)
00108 return 0;
00109 return odr_strdup (gc->odr, v);
00110 }
00111
00112 ILL_ISO_Time *ill_get_ILL_ISO_Time (struct ill_get_ctl *gc, const char *name,
00113 const char *sub, const char *val)
00114 {
00115 char element[128];
00116 const char *v;
00117
00118 strcpy(element, name);
00119 if (sub)
00120 {
00121 strcat (element, ",");
00122 strcat (element, sub);
00123 }
00124 v = (gc->f)(gc->clientData, element);
00125 if (!v)
00126 v = val;
00127 if (!v)
00128 return 0;
00129 return odr_strdup (gc->odr, v);
00130 }
00131
00132 ILL_Person_Or_Institution_Symbol *ill_get_Person_Or_Insitution_Symbol (
00133 struct ill_get_ctl *gc, const char *name, const char *sub)
00134 {
00135 char element[128];
00136 ODR o = gc->odr;
00137 ILL_Person_Or_Institution_Symbol *p =
00138 (ILL_Person_Or_Institution_Symbol *) odr_malloc (o, sizeof(*p));
00139
00140 strcpy(element, name);
00141 if (sub)
00142 {
00143 strcat (element, ",");
00144 strcat (element, sub);
00145 }
00146 p->which = ILL_Person_Or_Institution_Symbol_person_symbol;
00147 if ((p->u.person_symbol = ill_get_ILL_String (gc, element, "person")))
00148 return p;
00149
00150 p->which = ILL_Person_Or_Institution_Symbol_institution_symbol;
00151 if ((p->u.institution_symbol =
00152 ill_get_ILL_String (gc, element, "institution")))
00153 return p;
00154 return 0;
00155 }
00156
00157 static ILL_Name_Of_Person_Or_Institution *ill_get_Name_Of_Person_Or_Institution(
00158 struct ill_get_ctl *gc, const char *name, const char *sub)
00159 {
00160 char element[128];
00161 ODR o = gc->odr;
00162 ILL_Name_Of_Person_Or_Institution *p =
00163 (ILL_Name_Of_Person_Or_Institution *) odr_malloc (o, sizeof(*p));
00164
00165 strcpy(element, name);
00166 if (sub)
00167 {
00168 strcat (element, ",");
00169 strcat (element, sub);
00170 }
00171 p->which = ILL_Name_Of_Person_Or_Institution_name_of_person;
00172 if ((p->u.name_of_person =
00173 ill_get_ILL_String (gc, element, "name-of-person")))
00174 return p;
00175
00176 p->which = ILL_Name_Of_Person_Or_Institution_name_of_institution;
00177 if ((p->u.name_of_institution =
00178 ill_get_ILL_String (gc, element, "name-of-institution")))
00179 return p;
00180 return 0;
00181 }
00182
00183 ILL_System_Id *ill_get_System_Id(struct ill_get_ctl *gc,
00184 const char *name, const char *sub)
00185 {
00186 ODR o = gc->odr;
00187 char element[128];
00188 ILL_System_Id *p;
00189
00190 strcpy(element, name);
00191 if (sub)
00192 {
00193 strcat (element, ",");
00194 strcat (element, sub);
00195 }
00196 p = (ILL_System_Id *) odr_malloc (o, sizeof(*p));
00197 p->person_or_institution_symbol = ill_get_Person_Or_Insitution_Symbol (
00198 gc, element, "person-or-institution-symbol");
00199 p->name_of_person_or_institution = ill_get_Name_Of_Person_Or_Institution (
00200 gc, element, "name-of-person-or-institution");
00201 return p;
00202 }
00203
00204 ILL_Transaction_Id *ill_get_Transaction_Id (struct ill_get_ctl *gc,
00205 const char *name, const char *sub)
00206 {
00207 ODR o = gc->odr;
00208 ILL_Transaction_Id *r = (ILL_Transaction_Id *) odr_malloc (o, sizeof(*r));
00209 char element[128];
00210
00211 strcpy(element, name);
00212 if (sub)
00213 {
00214 strcat (element, ",");
00215 strcat (element, sub);
00216 }
00217 r->initial_requester_id =
00218 ill_get_System_Id (gc, element, "initial-requester-id");
00219 r->transaction_group_qualifier =
00220 ill_get_ILL_String_x (gc, element, "transaction-group-qualifier", "");
00221 r->transaction_qualifier =
00222 ill_get_ILL_String_x (gc, element, "transaction-qualifier", "");
00223 r->sub_transaction_qualifier =
00224 ill_get_ILL_String (gc, element, "sub-transaction-qualifier");
00225 return r;
00226 }
00227
00228
00229 ILL_Service_Date_this *ill_get_Service_Date_this (
00230 struct ill_get_ctl *gc, const char *name, const char *sub)
00231 {
00232 ODR o = gc->odr;
00233 ILL_Service_Date_this *r =
00234 (ILL_Service_Date_this *) odr_malloc (o, sizeof(*r));
00235 char element[128];
00236
00237 strcpy(element, name);
00238 if (sub)
00239 {
00240 strcat (element, ",");
00241 strcat (element, sub);
00242 }
00243 r->date = ill_get_ILL_ISO_Date (gc, element, "date", "20000101");
00244 r->time = ill_get_ILL_ISO_Time (gc, element, "time", 0);
00245 return r;
00246 }
00247
00248 ILL_Service_Date_original *ill_get_Service_Date_original (
00249 struct ill_get_ctl *gc, const char *name, const char *sub)
00250 {
00251 ODR o = gc->odr;
00252 ILL_Service_Date_original *r =
00253 (ILL_Service_Date_original *) odr_malloc (o, sizeof(*r));
00254 char element[128];
00255
00256 strcpy(element, name);
00257 if (sub)
00258 {
00259 strcat (element, ",");
00260 strcat (element, sub);
00261 }
00262 r->date = ill_get_ILL_ISO_Date (gc, element, "date", 0);
00263 r->time = ill_get_ILL_ISO_Time (gc, element, "time", 0);
00264 if (!r->date && !r->time)
00265 return 0;
00266 return r;
00267 }
00268
00269 ILL_Service_Date_Time *ill_get_Service_Date_Time (
00270 struct ill_get_ctl *gc, const char *name, const char *sub)
00271 {
00272 ODR o = gc->odr;
00273 ILL_Service_Date_Time *r =
00274 (ILL_Service_Date_Time *) odr_malloc (o, sizeof(*r));
00275 char element[128];
00276
00277 strcpy(element, name);
00278 if (sub)
00279 {
00280 strcat (element, ",");
00281 strcat (element, sub);
00282 }
00283 r->date_time_of_this_service = ill_get_Service_Date_this (
00284 gc, element, "this");
00285 r->date_time_of_original_service = ill_get_Service_Date_original (
00286 gc, element, "original");
00287 return r;
00288 }
00289
00290 ILL_Requester_Optional_Messages_Type *ill_get_Requester_Optional_Messages_Type (
00291 struct ill_get_ctl *gc, const char *name, const char *sub)
00292 {
00293 ODR o = gc->odr;
00294 ILL_Requester_Optional_Messages_Type *r =
00295 (ILL_Requester_Optional_Messages_Type *) odr_malloc (o, sizeof(*r));
00296 char element[128];
00297
00298 strcpy(element, name);
00299 if (sub)
00300 {
00301 strcat (element, ",");
00302 strcat (element, sub);
00303 }
00304 r->can_send_RECEIVED = ill_get_bool (gc, element, "can-send-RECEIVED", 0);
00305 r->can_send_RETURNED = ill_get_bool (gc, element, "can-send-RETURNED", 0);
00306 r->requester_SHIPPED =
00307 ill_get_enumerated (gc, element, "requester-SHIPPED", 1);
00308 r->requester_CHECKED_IN =
00309 ill_get_enumerated (gc, element, "requester-CHECKED-IN", 1);
00310 return r;
00311 }
00312
00313 ILL_Item_Id *ill_get_Item_Id (
00314 struct ill_get_ctl *gc, const char *name, const char *sub)
00315 {
00316 ODR o = gc->odr;
00317 ILL_Item_Id *r = (ILL_Item_Id *) odr_malloc (o, sizeof(*r));
00318 char element[128];
00319
00320 strcpy(element, name);
00321 if (sub)
00322 {
00323 strcat (element, ",");
00324 strcat (element, sub);
00325 }
00326 r->item_type = ill_get_enumerated (gc, element, "item-type",
00327 ILL_Item_Id_monograph);
00328 r->held_medium_type = 0;
00329 r->call_number = ill_get_ILL_String(gc, element, "call-number");
00330 r->author = ill_get_ILL_String(gc, element, "author");
00331 r->title = ill_get_ILL_String(gc, element, "title");
00332 r->sub_title = ill_get_ILL_String(gc, element, "sub-title");
00333 r->sponsoring_body = ill_get_ILL_String(gc, element, "sponsoring-body");
00334 r->place_of_publication =
00335 ill_get_ILL_String(gc, element, "place-of-publication");
00336 r->publisher = ill_get_ILL_String(gc, element, "publisher");
00337 r->series_title_number =
00338 ill_get_ILL_String(gc, element, "series-title-number");
00339 r->volume_issue = ill_get_ILL_String(gc, element, "volume-issue");
00340 r->edition = ill_get_ILL_String(gc, element, "edition");
00341 r->publication_date = ill_get_ILL_String(gc, element, "publication-date");
00342 r->publication_date_of_component =
00343 ill_get_ILL_String(gc, element, "publication-date-of-component");
00344 r->author_of_article = ill_get_ILL_String(gc, element,
00345 "author-of-article");
00346 r->title_of_article = ill_get_ILL_String(gc, element, "title-of-article");
00347 r->pagination = ill_get_ILL_String(gc, element, "pagination");
00348 r->national_bibliography_no = 0;
00349 r->iSBN = ill_get_ILL_String(gc, element, "ISBN");
00350 r->iSSN = ill_get_ILL_String(gc, element, "ISSN");
00351 r->system_no = 0;
00352 r->additional_no_letters =
00353 ill_get_ILL_String(gc, element, "additional-no-letters");
00354 r->verification_reference_source =
00355 ill_get_ILL_String(gc, element, "verification-reference-source");
00356 return r;
00357 }
00358
00359
00360 ILL_Client_Id *ill_get_Client_Id (
00361 struct ill_get_ctl *gc, const char *name, const char *sub)
00362 {
00363 char element[128];
00364 ODR o = gc->odr;
00365 ILL_Client_Id *r = (ILL_Client_Id *) odr_malloc(o, sizeof(*r));
00366
00367 strcpy(element, name);
00368 if (sub)
00369 {
00370 strcat (element, ",");
00371 strcat (element, sub);
00372 }
00373 r->client_name = ill_get_ILL_String (gc, element, "client-name");
00374 r->client_status = ill_get_ILL_String (gc, element, "client-status");
00375 r->client_identifier = ill_get_ILL_String (gc, element,
00376 "client-identifier");
00377 return r;
00378 }
00379
00380 ILL_Postal_Address *ill_get_Postal_Address (
00381 struct ill_get_ctl *gc, const char *name, const char *sub)
00382 {
00383 ODR o = gc->odr;
00384 ILL_Postal_Address *r =
00385 (ILL_Postal_Address *) odr_malloc(o, sizeof(*r));
00386 char element[128];
00387
00388 strcpy(element, name);
00389 if (sub)
00390 {
00391 strcat (element, ",");
00392 strcat (element, sub);
00393 }
00394 r->name_of_person_or_institution =
00395 ill_get_Name_Of_Person_Or_Institution (
00396 gc, element, "name-of-person-or-institution");
00397 r->extended_postal_delivery_address =
00398 ill_get_ILL_String (
00399 gc, element, "extended-postal-delivery-address");
00400 r->street_and_number =
00401 ill_get_ILL_String (gc, element, "street-and-number");
00402 r->post_office_box =
00403 ill_get_ILL_String (gc, element, "post-office-box");
00404 r->city = ill_get_ILL_String (gc, element, "city");
00405 r->region = ill_get_ILL_String (gc, element, "region");
00406 r->country = ill_get_ILL_String (gc, element, "country");
00407 r->postal_code = ill_get_ILL_String (gc, element, "postal-code");
00408 return r;
00409 }
00410
00411 ILL_System_Address *ill_get_System_Address (
00412 struct ill_get_ctl *gc, const char *name, const char *sub)
00413 {
00414 ODR o = gc->odr;
00415 ILL_System_Address *r =
00416 (ILL_System_Address *) odr_malloc(o, sizeof(*r));
00417 char element[128];
00418
00419 strcpy(element, name);
00420 if (sub)
00421 {
00422 strcat (element, ",");
00423 strcat (element, sub);
00424 }
00425 r->telecom_service_identifier =
00426 ill_get_ILL_String (gc, element, "telecom-service-identifier");
00427 r->telecom_service_address =
00428 ill_get_ILL_String (gc, element, "telecom-service-addreess");
00429 return r;
00430 }
00431
00432 ILL_Delivery_Address *ill_get_Delivery_Address (
00433 struct ill_get_ctl *gc, const char *name, const char *sub)
00434 {
00435 ODR o = gc->odr;
00436 ILL_Delivery_Address *r =
00437 (ILL_Delivery_Address *) odr_malloc(o, sizeof(*r));
00438 char element[128];
00439
00440 strcpy(element, name);
00441 if (sub)
00442 {
00443 strcat (element, ",");
00444 strcat (element, sub);
00445 }
00446 r->postal_address =
00447 ill_get_Postal_Address (gc, element, "postal-address");
00448 r->electronic_address =
00449 ill_get_System_Address (gc, element, "electronic-address");
00450 return r;
00451 }
00452
00453 ILL_Search_Type *ill_get_Search_Type (
00454 struct ill_get_ctl *gc, const char *name, const char *sub)
00455 {
00456 ODR o = gc->odr;
00457 ILL_Search_Type *r = (ILL_Search_Type *) odr_malloc(o, sizeof(*r));
00458 char element[128];
00459
00460 strcpy(element, name);
00461 if (sub)
00462 {
00463 strcat (element, ",");
00464 strcat (element, sub);
00465 }
00466 r->level_of_service = ill_get_ILL_String (gc, element, "level-of-service");
00467 r->need_before_date = ill_get_ILL_ISO_Date (gc, element,
00468 "need-before-date", 0);
00469 r->expiry_date = ill_get_ILL_ISO_Date (gc, element, "expiry-date", 0);
00470 r->expiry_flag = ill_get_enumerated (gc, element, "expiry-flag", 3);
00471
00472 return r;
00473 }
00474
00475 ILL_Request *ill_get_ILLRequest (
00476 struct ill_get_ctl *gc, const char *name, const char *sub)
00477 {
00478 ODR o = gc->odr;
00479 ILL_Request *r = (ILL_Request *) odr_malloc(o, sizeof(*r));
00480 char element[128];
00481
00482 strcpy(element, name);
00483 if (sub)
00484 {
00485 strcat (element, ",");
00486 strcat (element, sub);
00487 }
00488 r->protocol_version_num =
00489 ill_get_enumerated (gc, element, "protocol-version-num",
00490 ILL_Request_version_2);
00491
00492 r->transaction_id = ill_get_Transaction_Id (gc, element, "transaction-id");
00493 r->service_date_time =
00494 ill_get_Service_Date_Time (gc, element, "service-date-time");
00495 r->requester_id = ill_get_System_Id (gc, element, "requester-id");
00496 r->responder_id = ill_get_System_Id (gc, element, "responder-id");
00497 r->transaction_type =
00498 ill_get_enumerated(gc, element, "transaction-type", 1);
00499
00500 r->delivery_address =
00501 ill_get_Delivery_Address (gc, element, "delivery-address");
00502 r->delivery_service = 0;
00503
00504 r->billing_address =
00505 ill_get_Delivery_Address (gc, element, "billing-address");
00506
00507 r->num_iLL_service_type = 1;
00508 r->iLL_service_type = (ILL_Service_Type **)
00509 odr_malloc (o, sizeof(*r->iLL_service_type));
00510 *r->iLL_service_type =
00511 ill_get_enumerated (gc, element, "ill-service-type",
00512 ILL_Service_Type_copy_non_returnable);
00513
00514 r->responder_specific_service = 0;
00515 r->requester_optional_messages =
00516 ill_get_Requester_Optional_Messages_Type (
00517 gc, element,"requester-optional-messages");
00518 r->search_type = ill_get_Search_Type(gc, element, "search-type");
00519 r->num_supply_medium_info_type = 0;
00520 r->supply_medium_info_type = 0;
00521
00522 r->place_on_hold = ill_get_enumerated (
00523 gc, element, "place-on-hold",
00524 ILL_Place_On_Hold_Type_according_to_responder_policy);
00525 r->client_id = ill_get_Client_Id (gc, element, "client-id");
00526
00527 r->item_id = ill_get_Item_Id (gc, element, "item-id");
00528 r->supplemental_item_description = 0;
00529 r->cost_info_type = 0;
00530 r->copyright_compliance =
00531 ill_get_ILL_String(gc, element, "copyright-complicance");
00532 r->third_party_info_type = 0;
00533 r->retry_flag = ill_get_bool (gc, element, "retry-flag", 0);
00534 r->forward_flag = ill_get_bool (gc, element, "forward-flag", 0);
00535 r->requester_note = ill_get_ILL_String(gc, element, "requester-note");
00536 r->forward_note = ill_get_ILL_String(gc, element, "forward-note");
00537 r->num_iLL_request_extensions = 0;
00538 r->iLL_request_extensions = 0;
00539 return r;
00540 }
00541
00542 ILL_ItemRequest *ill_get_ItemRequest (
00543 struct ill_get_ctl *gc, const char *name, const char *sub)
00544 {
00545 ODR o = gc->odr;
00546 ILL_ItemRequest *r = (ILL_ItemRequest *)odr_malloc(o, sizeof(*r));
00547 char element[128];
00548
00549 strcpy(element, name);
00550 if (sub)
00551 {
00552 strcat (element, ",");
00553 strcat (element, sub);
00554 }
00555 r->protocol_version_num =
00556 ill_get_enumerated (gc, element, "protocol-version-num",
00557 ILL_Request_version_2);
00558
00559 r->transaction_id = ill_get_Transaction_Id (gc, element, "transaction-id");
00560 r->service_date_time =
00561 ill_get_Service_Date_Time (gc, element, "service-date-time");
00562 r->requester_id = ill_get_System_Id (gc, element, "requester-id");
00563 r->responder_id = ill_get_System_Id (gc, element, "responder-id");
00564 r->transaction_type =
00565 ill_get_enumerated(gc, element, "transaction-type", 1);
00566
00567 r->delivery_address =
00568 ill_get_Delivery_Address (gc, element, "delivery-address");
00569 r->delivery_service = 0;
00570
00571 r->billing_address =
00572 ill_get_Delivery_Address (gc, element, "billing-address");
00573
00574 r->num_iLL_service_type = 1;
00575 r->iLL_service_type = (ILL_Service_Type **)
00576 odr_malloc (o, sizeof(*r->iLL_service_type));
00577 *r->iLL_service_type =
00578 ill_get_enumerated (gc, element, "ill-service-type",
00579 ILL_Service_Type_copy_non_returnable);
00580
00581 r->responder_specific_service = 0;
00582 r->requester_optional_messages =
00583 ill_get_Requester_Optional_Messages_Type (
00584 gc, element,"requester-optional-messages");
00585 r->search_type = ill_get_Search_Type(gc, element, "search-type");
00586 r->num_supply_medium_info_type = 0;
00587 r->supply_medium_info_type = 0;
00588
00589 r->place_on_hold = ill_get_enumerated (
00590 gc, element, "place-on-hold",
00591 ILL_Place_On_Hold_Type_according_to_responder_policy);
00592 r->client_id = ill_get_Client_Id (gc, element, "client-id");
00593
00594 r->item_id = ill_get_Item_Id (gc, element, "item-id");
00595 r->supplemental_item_description = 0;
00596 r->cost_info_type = 0;
00597 r->copyright_compliance =
00598 ill_get_ILL_String(gc, element, "copyright-complicance");
00599 r->third_party_info_type = 0;
00600 r->retry_flag = ill_get_bool (gc, element, "retry-flag", 0);
00601 r->forward_flag = ill_get_bool (gc, element, "forward-flag", 0);
00602 r->requester_note = ill_get_ILL_String(gc, element, "requester-note");
00603 r->forward_note = ill_get_ILL_String(gc, element, "forward-note");
00604 r->num_iLL_request_extensions = 0;
00605 r->iLL_request_extensions = 0;
00606 return r;
00607 }
00608
00609 ILL_Cancel *ill_get_Cancel (
00610 struct ill_get_ctl *gc, const char *name, const char *sub)
00611 {
00612 ODR o = gc->odr;
00613 ILL_Cancel *r = (ILL_Cancel *)odr_malloc(o, sizeof(*r));
00614 char element[128];
00615
00616 strcpy(element, name);
00617 if (sub)
00618 {
00619 strcat (element, ",");
00620 strcat (element, sub);
00621 }
00622 r->protocol_version_num =
00623 ill_get_enumerated (gc, element, "protocol-version-num",
00624 ILL_Request_version_2);
00625
00626 r->transaction_id = ill_get_Transaction_Id (gc, element, "transaction-id");
00627 r->service_date_time =
00628 ill_get_Service_Date_Time (gc, element, "service-date-time");
00629 r->requester_id = ill_get_System_Id (gc, element, "requester-id");
00630 r->responder_id = ill_get_System_Id (gc, element, "responder-id");
00631 r->requester_note = ill_get_ILL_String(gc, element, "requester-note");
00632
00633 r->num_cancel_extensions = 0;
00634 r->cancel_extensions = 0;
00635 return r;
00636 }
00637
00638 ILL_APDU *ill_get_APDU (
00639 struct ill_get_ctl *gc, const char *name, const char *sub)
00640 {
00641 ODR o = gc->odr;
00642 ILL_APDU *r = (ILL_APDU *)odr_malloc(o, sizeof(*r));
00643 char element[128];
00644 const char *v;
00645
00646 strcpy (element, name);
00647 strcat (element, ",which");
00648
00649 v = (gc->f)(gc->clientData, element);
00650 if (!v)
00651 v = "request";
00652 if (!strcmp (v, "request"))
00653 {
00654 r->which = ILL_APDU_ILL_Request;
00655 r->u.illRequest = ill_get_ILLRequest(gc, name, sub);
00656 }
00657 else if (!strcmp (v, "cancel"))
00658 {
00659 r->which = ILL_APDU_Cancel;
00660 r->u.Cancel = ill_get_Cancel(gc, name, sub);
00661 }
00662 else
00663 return 0;
00664 return r;
00665 }
00666
00667
00668
00669
00670
00671
00672
00673