/* * vsh.h: common data to be used by clients to exercise the libvirt API * * Copyright (C) 2005, 2007-2015 Red Hat, Inc. * * This library 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 2.1 of the License, or (at your option) any later version. * * This library 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. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see * . */ #pragma once #include #ifndef WIN32 # include #endif #include "internal.h" #include "virthread.h" #define VIR_FROM_THIS VIR_FROM_NONE #define VSH_MAX_XML_FILE (10*1024*1024) #define VSH_MATCH(FLAG) (flags & (FLAG)) /** * The log configuration */ #define MSG_BUFFER 4096 #define DIR_MODE (S_IWUSR | S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) /* 0755 */ #define FILE_MODE (S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH) /* 0644 */ #define LOCK_MODE (S_IWUSR | S_IRUSR) /* 0600 */ #define LVL_DEBUG "DEBUG" #define LVL_INFO "INFO" #define LVL_NOTICE "NOTICE" #define LVL_WARNING "WARNING" #define LVL_ERROR "ERROR" /** * vshErrorLevel: * * Indicates the level of a log message */ typedef enum { VSH_ERR_DEBUG = 0, VSH_ERR_INFO, VSH_ERR_NOTICE, VSH_ERR_WARNING, VSH_ERR_ERROR } vshErrorLevel; #define VSH_DEBUG_DEFAULT VSH_ERR_ERROR /* * virsh command line grammar: * * command_line = \n | ; ; ... * * command =