1 /* 2 * LASH 3 * 4 * Copyright (C) 2002 Robert Ham <rah@bash.sh> 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 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 */ 20 21 #ifndef __LASH_ARGS_H__ 22 #define __LASH_ARGS_H__ 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 #include <uuid/uuid.h> 29 30 struct _lash_args 31 { 32 char * project; 33 char * server; 34 uuid_t id; 35 int flags; 36 37 int argc; 38 char ** argv; 39 }; 40 41 void lash_args_free (lash_args_t * args); 42 43 lash_args_t * lash_args_new (); 44 lash_args_t * lash_args_duplicate (const lash_args_t *const src); 45 void lash_args_destroy (lash_args_t * args); 46 47 void lash_args_set_project (lash_args_t * args, const char * project); 48 void lash_args_set_server (lash_args_t * args, const char * server); 49 void lash_args_set_port (lash_args_t * args, int port); 50 void lash_args_set_id (lash_args_t * args, uuid_t id); 51 void lash_args_set_flags (lash_args_t * args, int flags); 52 void lash_args_set_flag (lash_args_t * args, int flag); 53 void lash_args_set_args (lash_args_t * args, int argc, const char ** argv); 54 55 const char * lash_args_get_project (const lash_args_t * args); 56 const char * lash_args_get_server (const lash_args_t * args); 57 int lash_args_get_port (const lash_args_t * args); 58 void lash_args_get_id (const lash_args_t * args, uuid_t id); 59 int lash_args_get_flags (const lash_args_t * args); 60 int lash_args_get_argc (const lash_args_t * args); 61 char ** lash_args_take_argv (lash_args_t * args); 62 const char * const * lash_args_get_argv (const lash_args_t * args); 63 64 #ifdef __cplusplus 65 } 66 #endif 67 68 #endif /* __LASH_ARGS_H__ */ 69