* Copyright (c) 1995-2003, Index Data
* See the file LICENSE for details.
*
- * $Id: client.c,v 1.202 2003-07-14 12:59:23 adam Exp $
+ * $Id: client.c,v 1.203 2003-07-18 19:54:30 mike Exp $
*/
#include <stdio.h>
printf("Version: %s\n", res->implementationVersion);
if (res->userInformationField)
{
+ Z_External *uif = res->userInformationField;
printf("UserInformationfield:\n");
- if (!z_External(print, (Z_External**)&res-> userInformationField,
- 0, 0))
+ if (!z_External(print, (Z_External**)&uif, 0, 0))
{
odr_perror(print, "Printing userinfo\n");
odr_reset(print);
}
- if (res->userInformationField->which == Z_External_octet)
+ if (uif->which == Z_External_octet)
{
printf("Guessing visiblestring:\n");
- printf("'%s'\n", res->userInformationField->u. octet_aligned->buf);
- }
+ printf("'%s'\n", uif->u. octet_aligned->buf);
+ } else if (uif->which == Z_External_single
+// && oid_is(uif->direct_reference, "1.2.840.10003.10.1000.17.1")
+ ) {
+ /* FirstSearch's crappy private init-diagnostic OID */
+ Odr_any *sat = uif->u.single_ASN1_type;
+ printf("### NAUGHTY: External is '%s'\n", sat->buf);
+ }
odr_reset (print);
}
printf ("Options:");
r = sscanf (arg, "%39s %39s %39s", user, group, pass);
if (r == 0)
{
- printf("Auth field set to null\n");
+ printf("Authentication set to null\n");
auth = 0;
}
if (r == 1)
auth = &au;
au.which = Z_IdAuthentication_open;
au.u.open = user;
+ printf("Authentication set to Open (%s)\n", user);
}
if (r == 2)
{
idPass.groupId = NULL;
idPass.userId = user;
idPass.password = group;
+ printf("Authentication set to User (%s), Pass (%s)\n", user, group);
}
if (r == 3)
{
idPass.groupId = group;
idPass.userId = user;
idPass.password = pass;
+ printf("Authentication set to User (%s), Group (%s), Pass (%s)\n",
+ user, group, pass);
}
return 1;
}
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*
- * $Id: oid.h,v 1.17 2003-07-10 11:51:46 mike Exp $
+ * $Id: oid.h,v 1.18 2003-07-18 19:54:30 mike Exp $
*/
#ifndef OID_H
VAL_ZEEREX,
VAL_CQL,
VAL_DBUPDATE1,
+ VAL_OCLCUI,
/* VAL_DYNAMIC must have highest value */
VAL_DYNAMIC,
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Id: proto.h,v 1.10 2003-07-14 12:59:23 adam Exp $
+ * $Id: proto.h,v 1.11 2003-07-18 19:54:30 mike Exp $
*/
#ifndef Z_PROTO_H
#define Z_PROTO_H
#include <yaz/oid.h>
#include <yaz/wrbuf.h>
#include <yaz/zgdu.h>
+#include <yaz/z-oclcui.h>
YAZ_BEGIN_CDECL
#define Z_External_acfKrb1 25
#define Z_External_multisrch2 26
#define Z_External_CQL 27
+#define Z_External_OCLCUserInfo 28
union
{
/* Generic types */
Z_KRBObject *acfKrb1;
Z_MultipleSearchTerms_2 *multipleSearchTerms_2;
Z_InternationalString *cql;
+ Z_OCLC_UserInformation *oclc;
} u;
};
* Copyright (c) 1995-2003, Index Data
* See the file LICENSE for details.
*
- * $Id: oid.c,v 1.63 2003-07-10 11:52:37 mike Exp $
+ * $Id: oid.c,v 1.64 2003-07-18 19:54:30 mike Exp $
*/
/*
{PROTO_Z3950, CLASS_NEGOT, VAL_CHARNEG3, {15,3,-1},
"CharSetandLanguageNegotiation-3"},
{PROTO_Z3950, CLASS_USERINFO,VAL_CQL, {16, 2, -1},
- "CQL"},
+ "OCLC-userInfo"},
{PROTO_GENERAL, CLASS_GENERAL, VAL_UCS2, {1,0,10646,1,0,2,-1},
"UCS-2"},
{PROTO_GENERAL, CLASS_GENERAL, VAL_UCS4, {1,0,10646,1,0,4,-1},
"UTF-16"},
{PROTO_GENERAL, CLASS_GENERAL, VAL_UTF8, {1,0,10646,1,0,8,-1},
"UTF-8"},
+ {PROTO_Z3950, CLASS_USERINFO,VAL_OCLCUI, {10, 1000, 17, 1, -1},
+ "CQL"},
{PROTO_NOP, CLASS_NOP, VAL_NOP, {-1}, 0 }
};