Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
common_xml.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 The University of Utah
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of
7  * the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
17  */
18 
19 #include "common.h"
20 #include "log.h"
21 #include "common_xml.h"
22 
24 x_ResultT_to_t_result_t(struct soap *soap,
25  enum vmi1__ResultT in) {
26  switch (in) {
27  case vmi1__ResultT__success:
28  return RESULT_SUCCESS;
29  case vmi1__ResultT__error:
30  return RESULT_ERROR;
31  case vmi1__ResultT__abort:
32  return RESULT_ABORT;
33  default:
34  verror("unknown ResultT %d; returning RESULT_ABORT!\n",in);
35  return RESULT_ABORT;
36  }
37 }
38 enum vmi1__ResultT
39 t_result_t_to_x_ResultT(struct soap *soap,
40  result_t in) {
41  switch (in) {
42  case RESULT_SUCCESS:
43  return vmi1__ResultT__success;
44  case RESULT_ERROR:
45  return vmi1__ResultT__error;
46  case RESULT_ABORT:
47  return vmi1__ResultT__abort;
48  default:
49  verror("unknown result_t %d; returning ResultT__abort!\n",in);
50  return vmi1__ResultT__abort;
51  }
52 }
enum vmi1__ResultT t_result_t_to_x_ResultT(struct soap *soap, result_t in)
Definition: common_xml.c:39
#define verror(format,...)
Definition: log.h:30
result_t x_ResultT_to_t_result_t(struct soap *soap, enum vmi1__ResultT in)
Definition: common_xml.c:24
result_t
Definition: common.h:25