/* This file is part of Eclat. Copyright (C) 2012 Sergey Poznyakoff. Eclat is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. Eclat 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 General Public License for more details. You should have received a copy of the GNU General Public License along with Eclat. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include "grecs.h" #include "wordsplit.h" #include "libeclat.h" #define ECLAT_DEBCAT_MAIN 0 #define ECLAT_DEBCAT_CFGRAM 1 #define ECLAT_DEBCAT_CFLEX 2 #define ECLAT_DEBCAT_CONF 3 #define ECLAT_DEBCAT_CURL 4 #define ECLAT_DEBCAT_FORLAN 5 extern char *endpoint; extern int use_ssl; extern int dry_run_mode; extern char *region_name; extern char *access_file_name; extern char *access_key; extern char *secret_key; typedef int (*config_finish_hook_t) (void*); void add_config_finish_hook(config_finish_hook_t fun, void *data); void config_help(void); void config_init(void); void config_finish(struct grecs_node *tree); int run_config_finish_hooks(void); enum eclat_command { eclat_command_unspecified, eclat_command_start_instances, eclat_command_stop_instances, eclat_command_describe_tags }; extern enum eclat_command eclat_command; typedef int (*eclat_command_handler_t) (CURL *curl, int argc, char **argv); int eclat_start_instance(CURL *curl, int argc, char **argv); int eclat_stop_instance(CURL *curl, int argc, char **argv); int eclat_describe_tags(CURL *curl, int argc, char **argv); char *region_to_endpoint(const char *region);