aboutsummaryrefslogtreecommitdiff
path: root/mpiosh/callback.h
diff options
context:
space:
mode:
authorcrunchy <crunchy>2002-09-13 06:59:38 +0000
committercrunchy <crunchy>2002-09-13 06:59:38 +0000
commit2c7a0370fd13e02590ba52408fbe39d9b93c77e6 (patch)
treeffb82704577d78bacfa7adce5b8b3c81da2180ea /mpiosh/callback.h
parent5833e532a1dd6084bc5775f4672886b9b7e7658e (diff)
downloadmpiosh-2c7a0370fd13e02590ba52408fbe39d9b93c77e6.tar.gz
mpiosh-2c7a0370fd13e02590ba52408fbe39d9b93c77e6.tar.bz2
mpiosh-2c7a0370fd13e02590ba52408fbe39d9b93c77e6.zip
added callback.[ch]
Diffstat (limited to 'mpiosh/callback.h')
-rw-r--r--mpiosh/callback.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/mpiosh/callback.h b/mpiosh/callback.h
new file mode 100644
index 0000000..4a0f79e
--- /dev/null
+++ b/mpiosh/callback.h
@@ -0,0 +1,84 @@
+/* callback.h
+ *
+ * Author: Andreas Büsching <crunchy@tzi.de>
+ *
+ * $Id: callback.h,v 1.1 2002/09/13 06:59:38 crunchy Exp $
+ *
+ * Copyright (C) 2001 Andreas Büsching <crunchy@tzi.de>
+ *
+ * This program 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 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CALLBACK_HH
+#define CALLBACK_HH
+
+#include "libmpio/mpio.h"
+
+/* mpio command callbacks */
+void mpiosh_cmd_debug(char *args[]);
+void mpiosh_cmd_version(char *args[]);
+void mpiosh_cmd_help(char *args[]);
+void mpiosh_cmd_dir(char *args[]);
+void mpiosh_cmd_info(char *args[]);
+void mpiosh_cmd_mem(char *args[]);
+void mpiosh_cmd_open(char *args[]);
+void mpiosh_cmd_close(char *args[]);
+void mpiosh_cmd_quit(char *args[]);
+void mpiosh_cmd_get(char *args[]);
+void mpiosh_cmd_mget(char *args[]);
+void mpiosh_cmd_put(char *args[]);
+void mpiosh_cmd_mput(char *args[]);
+void mpiosh_cmd_del(char *args[]);
+void mpiosh_cmd_mdel(char *args[]);
+void mpiosh_cmd_dump(char *args[]);
+void mpiosh_cmd_free(char *args[]);
+void mpiosh_cmd_format(char *args[]);
+void mpiosh_cmd_switch(char *args[]);
+
+/* local command callbacks */
+void mpiosh_cmd_ldir(char *args[]);
+void mpiosh_cmd_lcd(char *args[]);
+void mpiosh_cmd_lmkdir(char *args[]);
+
+/* progress callbacks */
+BYTE mpiosh_callback_get(int read, int total);
+BYTE mpiosh_callback_put(int read, int total);
+BYTE mpiosh_callback_del(int read, int total);
+BYTE mpiosh_callback_format(int read, int total);
+
+/* check situation */
+
+#define MPIOSH_CHECK_CONNECTION_OPEN \
+ if (mpiosh.dev != NULL) { \
+ printf("connection to MPIO player is open\n"); \
+ return; \
+ }
+
+#define MPIOSH_CHECK_CONNECTION_CLOSED \
+ if (mpiosh.dev == NULL) { \
+ printf("connection to MPIO player is closed\n"); \
+ return; \
+ }
+
+#define MPIOSH_CHECK_ARG \
+ if (args[0] == NULL) { \
+ printf("error: no argument given\n"); \
+ return; \
+ }
+
+
+#endif
+
+/* end of callback.h */