| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- /*
- * Copyright (C) 2007-2012 Siemens AG
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- /*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.7
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer.com</p>
- ********************************************************************/
- #ifndef EXI_appHand_QNAMES_C
- #define EXI_appHand_QNAMES_C
- #include "EXITypes.h"
- #include "ErrorCodes.h"
- #include "appHandQNameDefines.h"
- /* qname is a composition of namespaceURI(ID) and localPart(ID) */
- static exi_eqname_t qnames[EXI_appHandMAX_NUMBER_OF_QNAMES] = {
- /* qnameID == 0: AppProtocol */
- {0, 0},
- /* qnameID == 1: Priority */
- {0, 1},
- /* qnameID == 2: ProtocolNamespace */
- {0, 2},
- /* qnameID == 3: ResponseCode */
- {0, 3},
- /* qnameID == 4: SchemaID */
- {0, 4},
- /* qnameID == 5: VersionNumberMajor */
- {0, 5},
- /* qnameID == 6: VersionNumberMinor */
- {0, 6},
- /* qnameID == 7: {http://www.w3.org/XML/1998/namespace}base */
- {1, 0},
- /* qnameID == 8: {http://www.w3.org/XML/1998/namespace}id */
- {1, 1},
- /* qnameID == 9: {http://www.w3.org/XML/1998/namespace}lang */
- {1, 2},
- /* qnameID == 10: {http://www.w3.org/XML/1998/namespace}space */
- {1, 3},
- /* qnameID == 11: {http://www.w3.org/2001/XMLSchema-instance}nil */
- {2, 0},
- /* qnameID == 12: {http://www.w3.org/2001/XMLSchema-instance}type */
- {2, 1},
- /* qnameID == 13: {http://www.w3.org/2001/XMLSchema}ENTITIES */
- {3, 0},
- /* qnameID == 14: {http://www.w3.org/2001/XMLSchema}ENTITY */
- {3, 1},
- /* qnameID == 15: {http://www.w3.org/2001/XMLSchema}ID */
- {3, 2},
- /* qnameID == 16: {http://www.w3.org/2001/XMLSchema}IDREF */
- {3, 3},
- /* qnameID == 17: {http://www.w3.org/2001/XMLSchema}IDREFS */
- {3, 4},
- /* qnameID == 18: {http://www.w3.org/2001/XMLSchema}NCName */
- {3, 5},
- /* qnameID == 19: {http://www.w3.org/2001/XMLSchema}NMTOKEN */
- {3, 6},
- /* qnameID == 20: {http://www.w3.org/2001/XMLSchema}NMTOKENS */
- {3, 7},
- /* qnameID == 21: {http://www.w3.org/2001/XMLSchema}NOTATION */
- {3, 8},
- /* qnameID == 22: {http://www.w3.org/2001/XMLSchema}Name */
- {3, 9},
- /* qnameID == 23: {http://www.w3.org/2001/XMLSchema}QName */
- {3, 10},
- /* qnameID == 24: {http://www.w3.org/2001/XMLSchema}anySimpleType */
- {3, 11},
- /* qnameID == 25: {http://www.w3.org/2001/XMLSchema}anyType */
- {3, 12},
- /* qnameID == 26: {http://www.w3.org/2001/XMLSchema}anyURI */
- {3, 13},
- /* qnameID == 27: {http://www.w3.org/2001/XMLSchema}base64Binary */
- {3, 14},
- /* qnameID == 28: {http://www.w3.org/2001/XMLSchema}boolean */
- {3, 15},
- /* qnameID == 29: {http://www.w3.org/2001/XMLSchema}byte */
- {3, 16},
- /* qnameID == 30: {http://www.w3.org/2001/XMLSchema}date */
- {3, 17},
- /* qnameID == 31: {http://www.w3.org/2001/XMLSchema}dateTime */
- {3, 18},
- /* qnameID == 32: {http://www.w3.org/2001/XMLSchema}decimal */
- {3, 19},
- /* qnameID == 33: {http://www.w3.org/2001/XMLSchema}double */
- {3, 20},
- /* qnameID == 34: {http://www.w3.org/2001/XMLSchema}duration */
- {3, 21},
- /* qnameID == 35: {http://www.w3.org/2001/XMLSchema}float */
- {3, 22},
- /* qnameID == 36: {http://www.w3.org/2001/XMLSchema}gDay */
- {3, 23},
- /* qnameID == 37: {http://www.w3.org/2001/XMLSchema}gMonth */
- {3, 24},
- /* qnameID == 38: {http://www.w3.org/2001/XMLSchema}gMonthDay */
- {3, 25},
- /* qnameID == 39: {http://www.w3.org/2001/XMLSchema}gYear */
- {3, 26},
- /* qnameID == 40: {http://www.w3.org/2001/XMLSchema}gYearMonth */
- {3, 27},
- /* qnameID == 41: {http://www.w3.org/2001/XMLSchema}hexBinary */
- {3, 28},
- /* qnameID == 42: {http://www.w3.org/2001/XMLSchema}int */
- {3, 29},
- /* qnameID == 43: {http://www.w3.org/2001/XMLSchema}integer */
- {3, 30},
- /* qnameID == 44: {http://www.w3.org/2001/XMLSchema}language */
- {3, 31},
- /* qnameID == 45: {http://www.w3.org/2001/XMLSchema}long */
- {3, 32},
- /* qnameID == 46: {http://www.w3.org/2001/XMLSchema}negativeInteger */
- {3, 33},
- /* qnameID == 47: {http://www.w3.org/2001/XMLSchema}nonNegativeInteger */
- {3, 34},
- /* qnameID == 48: {http://www.w3.org/2001/XMLSchema}nonPositiveInteger */
- {3, 35},
- /* qnameID == 49: {http://www.w3.org/2001/XMLSchema}normalizedString */
- {3, 36},
- /* qnameID == 50: {http://www.w3.org/2001/XMLSchema}positiveInteger */
- {3, 37},
- /* qnameID == 51: {http://www.w3.org/2001/XMLSchema}short */
- {3, 38},
- /* qnameID == 52: {http://www.w3.org/2001/XMLSchema}string */
- {3, 39},
- /* qnameID == 53: {http://www.w3.org/2001/XMLSchema}time */
- {3, 40},
- /* qnameID == 54: {http://www.w3.org/2001/XMLSchema}token */
- {3, 41},
- /* qnameID == 55: {http://www.w3.org/2001/XMLSchema}unsignedByte */
- {3, 42},
- /* qnameID == 56: {http://www.w3.org/2001/XMLSchema}unsignedInt */
- {3, 43},
- /* qnameID == 57: {http://www.w3.org/2001/XMLSchema}unsignedLong */
- {3, 44},
- /* qnameID == 58: {http://www.w3.org/2001/XMLSchema}unsignedShort */
- {3, 45},
- /* qnameID == 59: {urn:iso:15118:2:2010:AppProtocol}AppProtocolType */
- {4, 0},
- /* qnameID == 60: {urn:iso:15118:2:2010:AppProtocol}idType */
- {4, 1},
- /* qnameID == 61: {urn:iso:15118:2:2010:AppProtocol}priorityType */
- {4, 2},
- /* qnameID == 62: {urn:iso:15118:2:2010:AppProtocol}protocolNameType */
- {4, 3},
- /* qnameID == 63: {urn:iso:15118:2:2010:AppProtocol}protocolNamespaceType */
- {4, 4},
- /* qnameID == 64: {urn:iso:15118:2:2010:AppProtocol}responseCodeType */
- {4, 5},
- /* qnameID == 65: {urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq */
- {4, 6},
- /* qnameID == 66: {urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes */
- {4, 7}
- };
- int exiappHandGetEQName(exi_state_t* state, uint16_t qnameID, uint16_t* namespaceURI, uint16_t* localPart) {
- int errn = 0;
- /* EXI_appHandNUMBER_OF_QNAMES */
- if (qnameID < state->nextQNameID) {
- *namespaceURI = qnames[qnameID].namespaceURI;
- *localPart = qnames[qnameID].localPart;
- } else {
- errn = EXI_ERROR_OUT_OF_BOUNDS;
- }
- return errn;
- }
- int exiappHandGetQNameID(exi_state_t* state, uint16_t namespaceURI, uint16_t localPart, uint16_t* qnameID) {
- uint16_t i;
- /* TODO Do something more efficient than just walk over the entire list */
- /* EXI_appHandNUMBER_OF_QNAMES */
- for(i=0; i<state->nextQNameID; i++) {
- if(qnames[i].localPart == localPart && qnames[i].namespaceURI == namespaceURI) {
- *qnameID = i;
- return 0;
- }
- }
- return EXI_ERROR_OUT_OF_BOUNDS;
- }
- int exiappHandAddEQName(exi_state_t* state, uint16_t* qnameID, uint16_t namespaceURI, uint16_t localPart) {
- int errn = 0;
- if(state->nextQNameID < (EXI_appHandMAX_NUMBER_OF_QNAMES -1)) {
- /* store IDs */
- qnames[state->nextQNameID].namespaceURI = namespaceURI;
- qnames[state->nextQNameID].localPart = localPart;
- /* increment counter */
- *qnameID = state->nextQNameID++;
- } else {
- errn = EXI_ERROR_OUT_OF_BOUNDS;
- }
- return errn;
- }
- #endif
|