Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 1 | /* parser.h |
| 2 | * |
| 3 | * Copyright © 2010 - 2013 UNISYS CORPORATION |
| 4 | * All rights reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or (at |
| 9 | * your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, but |
| 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or |
| 14 | * NON INFRINGEMENT. See the GNU General Public License for more |
| 15 | * details. |
| 16 | */ |
| 17 | |
| 18 | #ifndef __PARSER_H__ |
| 19 | #define __PARSER_H__ |
| 20 | |
| 21 | #include "uniklog.h" |
| 22 | #include "timskmod.h" |
| 23 | #include "channel.h" |
| 24 | |
| 25 | typedef enum { |
| 26 | PARSERSTRING_INITIATOR, |
| 27 | PARSERSTRING_TARGET, |
| 28 | PARSERSTRING_CONNECTION, |
| 29 | PARSERSTRING_NAME, |
| 30 | } PARSER_WHICH_STRING; |
| 31 | |
| 32 | typedef struct PARSER_CONTEXT_Tag PARSER_CONTEXT; |
| 33 | |
| 34 | PARSER_CONTEXT *parser_init(U64 addr, U32 bytes, BOOL isLocal, BOOL *tryAgain); |
| 35 | PARSER_CONTEXT *parser_init_byteStream(U64 addr, U32 bytes, BOOL isLocal, |
| 36 | BOOL *tryAgain); |
| 37 | void parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string); |
| 38 | void *parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize); |
| 39 | void *parser_string_get(PARSER_CONTEXT *ctx); |
| 40 | GUID parser_id_get(PARSER_CONTEXT *ctx); |
| 41 | char *parser_simpleString_get(PARSER_CONTEXT *ctx); |
| 42 | void *parser_byteStream_get(PARSER_CONTEXT *ctx, ulong *nbytes); |
| 43 | void parser_done(PARSER_CONTEXT *ctx); |
| 44 | |
| 45 | #endif |