00001
00007 #ifndef z_charneg_H
00008 #define z_charneg_H
00009
00010 #include <yaz/odr.h>
00011 #include <yaz/z-exp.h>
00012 #ifdef __cplusplus
00013 extern "C" {
00014 #endif
00015
00016 typedef struct Z_CharSetandLanguageNegotiation Z_CharSetandLanguageNegotiation;
00017 YAZ_EXPORT int z_CharSetandLanguageNegotiation (ODR o, Z_CharSetandLanguageNegotiation **p, int opt, const char *name);
00018
00019 typedef struct Z_OriginProposal_0 Z_OriginProposal_0;
00020 YAZ_EXPORT int z_OriginProposal_0 (ODR o, Z_OriginProposal_0 **p, int opt, const char *name);
00021
00022 typedef struct Z_OriginProposal Z_OriginProposal;
00023 YAZ_EXPORT int z_OriginProposal (ODR o, Z_OriginProposal **p, int opt, const char *name);
00024
00025 typedef struct Z_TargetResponse Z_TargetResponse;
00026 YAZ_EXPORT int z_TargetResponse (ODR o, Z_TargetResponse **p, int opt, const char *name);
00027
00028 typedef struct Z_PrivateCharacterSetViaOid Z_PrivateCharacterSetViaOid;
00029 YAZ_EXPORT int z_PrivateCharacterSetViaOid (ODR o, Z_PrivateCharacterSetViaOid **p, int opt, const char *name);
00030
00031 typedef struct Z_PrivateCharacterSet Z_PrivateCharacterSet;
00032 YAZ_EXPORT int z_PrivateCharacterSet (ODR o, Z_PrivateCharacterSet **p, int opt, const char *name);
00033
00034 typedef struct Z_Iso2022OriginProposal Z_Iso2022OriginProposal;
00035 YAZ_EXPORT int z_Iso2022OriginProposal (ODR o, Z_Iso2022OriginProposal **p, int opt, const char *name);
00036
00037 typedef struct Z_Iso2022TargetResponse Z_Iso2022TargetResponse;
00038 YAZ_EXPORT int z_Iso2022TargetResponse (ODR o, Z_Iso2022TargetResponse **p, int opt, const char *name);
00039
00040 typedef struct Z_Iso2022 Z_Iso2022;
00041 YAZ_EXPORT int z_Iso2022 (ODR o, Z_Iso2022 **p, int opt, const char *name);
00042
00043 typedef struct Z_Environment Z_Environment;
00044 YAZ_EXPORT int z_Environment (ODR o, Z_Environment **p, int opt, const char *name);
00045
00046 typedef struct Z_InitialSet Z_InitialSet;
00047 YAZ_EXPORT int z_InitialSet (ODR o, Z_InitialSet **p, int opt, const char *name);
00048
00049 typedef struct Z_LeftAndRight Z_LeftAndRight;
00050 YAZ_EXPORT int z_LeftAndRight (ODR o, Z_LeftAndRight **p, int opt, const char *name);
00051
00052 typedef struct Z_Iso10646 Z_Iso10646;
00053 YAZ_EXPORT int z_Iso10646 (ODR o, Z_Iso10646 **p, int opt, const char *name);
00054 #ifdef __cplusplus
00055 }
00056 #endif
00057 #ifdef __cplusplus
00058 extern "C" {
00059 #endif
00060 struct Z_CharSetandLanguageNegotiation {
00061 int which;
00062 union {
00063 Z_OriginProposal *proposal;
00064 Z_TargetResponse *response;
00065 #define Z_CharSetandLanguageNegotiation_proposal 1
00066 #define Z_CharSetandLanguageNegotiation_response 2
00067 } u;
00068 };
00069
00070 struct Z_OriginProposal_0 {
00071 int which;
00072 union {
00073 Z_Iso2022 *iso2022;
00074 Z_Iso10646 *iso10646;
00075 Z_PrivateCharacterSet *zprivate;
00076 #define Z_OriginProposal_0_iso2022 1
00077 #define Z_OriginProposal_0_iso10646 2
00078 #define Z_OriginProposal_0_private 3
00079 } u;
00080 };
00081
00082 struct Z_OriginProposal {
00083 int num_proposedCharSets;
00084 Z_OriginProposal_0 **proposedCharSets;
00085 int num_proposedlanguages;
00086 Z_LanguageCode **proposedlanguages;
00087 bool_t *recordsInSelectedCharSets;
00088 };
00089
00090 struct Z_TargetResponse {
00091 int which;
00092 union {
00093 Z_Iso2022 *iso2022;
00094 Z_Iso10646 *iso10646;
00095 Z_PrivateCharacterSet *zprivate;
00096 Odr_null *none;
00097 #define Z_TargetResponse_iso2022 1
00098 #define Z_TargetResponse_iso10646 2
00099 #define Z_TargetResponse_private 3
00100 #define Z_TargetResponse_none 4
00101 } u;
00102 Z_LanguageCode *selectedLanguage;
00103 bool_t *recordsInSelectedCharSets;
00104 };
00105
00106 struct Z_PrivateCharacterSetViaOid {
00107 int num;
00108 Odr_oid **elements;
00109 };
00110
00111 struct Z_PrivateCharacterSet {
00112 int which;
00113 union {
00114 Z_PrivateCharacterSetViaOid *viaOid;
00115 Z_External *externallySpecified;
00116 Odr_null *previouslyAgreedUpon;
00117 #define Z_PrivateCharacterSet_viaOid 1
00118 #define Z_PrivateCharacterSet_externallySpecified 2
00119 #define Z_PrivateCharacterSet_previouslyAgreedUpon 3
00120 } u;
00121 };
00122
00123 struct Z_Iso2022OriginProposal {
00124 Z_Environment *proposedEnvironment;
00125 int num_proposedSets;
00126 int **proposedSets;
00127 int num_proposedInitialSets;
00128 Z_InitialSet **proposedInitialSets;
00129 Z_LeftAndRight *proposedLeftAndRight;
00130 };
00131
00132 struct Z_Iso2022TargetResponse {
00133 Z_Environment *selectedEnvironment;
00134 int num_selectedSets;
00135 int **selectedSets;
00136 Z_InitialSet *selectedinitialSet;
00137 Z_LeftAndRight *selectedLeftAndRight;
00138 };
00139
00140 struct Z_Iso2022 {
00141 int which;
00142 union {
00143 Z_Iso2022OriginProposal *originProposal;
00144 Z_Iso2022TargetResponse *targetResponse;
00145 #define Z_Iso2022_originProposal 1
00146 #define Z_Iso2022_targetResponse 2
00147 } u;
00148 };
00149
00150 struct Z_Environment {
00151 int which;
00152 union {
00153 Odr_null *sevenBit;
00154 Odr_null *eightBit;
00155 #define Z_Environment_sevenBit 1
00156 #define Z_Environment_eightBit 2
00157 } u;
00158 };
00159
00160 struct Z_InitialSet {
00161 int *g0;
00162 int *g1;
00163 int *g2;
00164 int *g3;
00165 int *c0;
00166 int *c1;
00167 };
00168
00169 struct Z_LeftAndRight {
00170 #define Z_LeftAndRight_g0 0
00171 #define Z_LeftAndRight_g1 1
00172 #define Z_LeftAndRight_g2 2
00173 #define Z_LeftAndRight_g3 3
00174 int *gLeft;
00175 #define Z_LeftAndRight_g1 1
00176 #define Z_LeftAndRight_g2 2
00177 #define Z_LeftAndRight_g3 3
00178 int *gRight;
00179 };
00180
00181 struct Z_Iso10646 {
00182 Odr_oid *collections;
00183 Odr_oid *encodingLevel;
00184 };
00185
00186 #ifdef __cplusplus
00187 }
00188 #endif
00189 #endif