OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

compress.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 *
6 * $COPYRIGHT$
7 *
8 * Additional copyrights may follow
9 *
10 * $HEADER$
11 */
12 /**
13 * @file
14 *
15 * Compression Framework
16 *
17 * General Description:
18 *
19 * The OPAL Compress framework has been created to provide an abstract interface
20 * to the compression agent library on the host machine. This fromework is useful
21 * when distributing files that can be compressed before sending to dimish the
22 * load on the network.
23 *
24 */
25
26 #ifndef MCA_COMPRESS_H
27 #define MCA_COMPRESS_H
28
29 #include "opal_config.h"
30 #include "opal/mca/mca.h"
31 #include "opal/mca/base/base.h"
32 #include "opal/class/opal_object.h"
33
34 #if defined(c_plusplus) || defined(__cplusplus)
35 extern "C" {
36 #endif
37
38 /**
39 * Module initialization function.
40 * Returns OPAL_SUCCESS
41 */
42 typedef int (*opal_compress_base_module_init_fn_t)
43 (void);
44
45 /**
46 * Module finalization function.
47 * Returns OPAL_SUCCESS
48 */
49 typedef int (*opal_compress_base_module_finalize_fn_t)
50 (void);
51
52 /**
53 * Compress the file provided
54 *
55 * Arguments:
56 * fname = Filename to compress
57 * cname = Compressed filename
58 * postfix = postfix added to filename to create compressed filename
59 * Returns:
60 * OPAL_SUCCESS on success, ow OPAL_ERROR
61 */
62 typedef int (*opal_compress_base_module_compress_fn_t)
63 (char * fname, char **cname, char **postfix);
64
65 typedef int (*opal_compress_base_module_compress_nb_fn_t)
66 (char * fname, char **cname, char **postfix, pid_t *child_pid);
67
68 /**
69 * Decompress the file provided
70 *
71 * Arguments:
72 * fname = Filename to compress
73 * cname = Compressed filename
74 * Returns:
75 * OPAL_SUCCESS on success, ow OPAL_ERROR
76 */
77 typedef int (*opal_compress_base_module_decompress_fn_t)
78 (char * cname, char **fname);
79 typedef int (*opal_compress_base_module_decompress_nb_fn_t)
80 (char * cname, char **fname, pid_t *child_pid);
81
82 /**
83 * Structure for COMPRESS components.
84 */
85 struct opal_compress_base_component_2_0_0_t {
86 /** MCA base component */
87 mca_base_component_t base_version;
88 /** MCA base data */
89 mca_base_component_data_t base_data;
90
91 /** Verbosity Level */
92 int verbose;
93 /** Output Handle for opal_output */
94 int output_handle;
95 /** Default Priority */
96 int priority;
97 };
98 typedef struct opal_compress_base_component_2_0_0_t opal_compress_base_component_2_0_0_t;
99 typedef struct opal_compress_base_component_2_0_0_t opal_compress_base_component_t;
100
101 /**
102 * Structure for COMPRESS modules
103 */
104 struct opal_compress_base_module_1_0_0_t {
105 /** Initialization Function */
106 opal_compress_base_module_init_fn_t init;
107 /** Finalization Function */
108 opal_compress_base_module_finalize_fn_t finalize;
109
110 /** Compress interface */
111 opal_compress_base_module_compress_fn_t compress;
112 opal_compress_base_module_compress_nb_fn_t compress_nb;
113
114 /** Decompress Interface */
115 opal_compress_base_module_decompress_fn_t decompress;
116 opal_compress_base_module_decompress_nb_fn_t decompress_nb;
117 };
118 typedef struct opal_compress_base_module_1_0_0_t opal_compress_base_module_1_0_0_t;
119 typedef struct opal_compress_base_module_1_0_0_t opal_compress_base_module_t;
120
121 OPAL_DECLSPEC extern opal_compress_base_module_t opal_compress;
122
123 /**
124 * Macro for use in components that are of type COMPRESS
125 */
126 #define OPAL_COMPRESS_BASE_VERSION_2_0_0 \
127 MCA_BASE_VERSION_2_0_0, \
128 "compress", 2, 0, 0
129
130 #if defined(c_plusplus) || defined(__cplusplus)
131 }
132 #endif
133
134 #endif /* OPAL_COMPRESS_H */
135
mca_base_component_2_0_0_t
Common type for all MCA components.
Definition: mca.h:250
opal_compress_base_module_1_0_0_t::finalize
opal_compress_base_module_finalize_fn_t finalize
Finalization Function.
Definition: compress.h:108
opal_compress_base_module_init_fn_t
int(* opal_compress_base_module_init_fn_t)(void)
Module initialization function.
Definition: compress.h:43
opal_compress_base_module_decompress_fn_t
int(* opal_compress_base_module_decompress_fn_t)(char *cname, char **fname)
Decompress the file provided.
Definition: compress.h:78
opal_compress_base_module_1_0_0_t::decompress
opal_compress_base_module_decompress_fn_t decompress
Decompress Interface.
Definition: compress.h:115
mca.h
Top-level interface for all MCA components.
opal_compress_base_module_finalize_fn_t
int(* opal_compress_base_module_finalize_fn_t)(void)
Module finalization function.
Definition: compress.h:50
opal_compress_base_component_2_0_0_t::base_version
mca_base_component_t base_version
MCA base component.
Definition: compress.h:87
opal_compress_base_module_1_0_0_t::init
opal_compress_base_module_init_fn_t init
Initialization Function.
Definition: compress.h:106
opal_compress_base_module_compress_fn_t
int(* opal_compress_base_module_compress_fn_t)(char *fname, char **cname, char **postfix)
Compress the file provided.
Definition: compress.h:63
opal_compress_base_module_1_0_0_t
Structure for COMPRESS modules.
Definition: compress.h:104
opal_compress_base_component_2_0_0_t::verbose
int verbose
Verbosity Level.
Definition: compress.h:92
mca_base_component_data_2_0_0_t
Meta data for MCA v2.0.0 components.
Definition: mca.h:309
opal_compress_base_component_2_0_0_t::output_handle
int output_handle
Output Handle for opal_output.
Definition: compress.h:94
opal_compress_base_component_2_0_0_t::priority
int priority
Default Priority.
Definition: compress.h:96
opal_compress_base_component_2_0_0_t::base_data
mca_base_component_data_t base_data
MCA base data.
Definition: compress.h:89
opal_object.h
A simple C-language object-oriented system with single inheritance and ownership-based memory managem...
opal_compress_base_component_2_0_0_t
Structure for COMPRESS components.
Definition: compress.h:85
opal_compress_base_module_1_0_0_t::compress
opal_compress_base_module_compress_fn_t compress
Compress interface.
Definition: compress.h:111