17b1b5d19SPaolo Bonzini /* 27b1b5d19SPaolo Bonzini * String printing Visitor 37b1b5d19SPaolo Bonzini * 47b1b5d19SPaolo Bonzini * Copyright Red Hat, Inc. 2012 57b1b5d19SPaolo Bonzini * 67b1b5d19SPaolo Bonzini * Author: Paolo Bonzini <pbonzini@redhat.com> 77b1b5d19SPaolo Bonzini * 87b1b5d19SPaolo Bonzini * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 97b1b5d19SPaolo Bonzini * See the COPYING.LIB file in the top-level directory. 107b1b5d19SPaolo Bonzini * 117b1b5d19SPaolo Bonzini */ 127b1b5d19SPaolo Bonzini 137b1b5d19SPaolo Bonzini #ifndef STRING_OUTPUT_VISITOR_H 147b1b5d19SPaolo Bonzini #define STRING_OUTPUT_VISITOR_H 157b1b5d19SPaolo Bonzini 167b1b5d19SPaolo Bonzini #include "qapi/visitor.h" 177b1b5d19SPaolo Bonzini 187b1b5d19SPaolo Bonzini typedef struct StringOutputVisitor StringOutputVisitor; 197b1b5d19SPaolo Bonzini 20adfb264cSEric Blake /* 213b098d56SEric Blake * Create a new string output visitor. 223b098d56SEric Blake * 233b098d56SEric Blake * Using @human creates output that is a bit easier for humans to read 243b098d56SEric Blake * (for example, showing integer values in both decimal and hex). 253b098d56SEric Blake * 263b098d56SEric Blake * If everything else succeeds, pass @result to visit_complete() to 273b098d56SEric Blake * collect the result of the visit. 283b098d56SEric Blake * 29*ff32bb53SStefan Hajnoczi * The string output visitor does not implement support for alternates, null, 30*ff32bb53SStefan Hajnoczi * or arbitrary QTypes. Struct fields are not shown. It also requires a 31*ff32bb53SStefan Hajnoczi * non-null list argument to visit_start_list(). 32adfb264cSEric Blake */ 333b098d56SEric Blake Visitor *string_output_visitor_new(bool human, char **result); 347b1b5d19SPaolo Bonzini 357b1b5d19SPaolo Bonzini #endif 36