OpenMPI  0.1.1
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  */
43  (void);
44 
45 /**
46  * Module finalization function.
47  * Returns OPAL_SUCCESS
48  */
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  */
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  */
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  */
86  /** MCA base component */
88  /** MCA base data */
90 
91  /** Verbosity Level */
92  int verbose;
93  /** Output Handle for opal_output */
95  /** Default Priority */
96  int priority;
97 };
100 
101 /**
102  * Structure for COMPRESS modules
103  */
105  /** Initialization Function */
107  /** Finalization Function */
109 
110  /** Compress interface */
112  opal_compress_base_module_compress_nb_fn_t compress_nb;
113 
114  /** Decompress Interface */
116  opal_compress_base_module_decompress_nb_fn_t decompress_nb;
117 };
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 
Common type for all MCA components.
Definition: mca.h:250
opal_compress_base_module_finalize_fn_t finalize
Finalization Function.
Definition: compress.h:108
int(* opal_compress_base_module_init_fn_t)(void)
Module initialization function.
Definition: compress.h:43
int(* opal_compress_base_module_decompress_fn_t)(char *cname, char **fname)
Decompress the file provided.
Definition: compress.h:78
opal_compress_base_module_decompress_fn_t decompress
Decompress Interface.
Definition: compress.h:115
Top-level interface for all MCA components.
int(* opal_compress_base_module_finalize_fn_t)(void)
Module finalization function.
Definition: compress.h:50
mca_base_component_t base_version
MCA base component.
Definition: compress.h:87
opal_compress_base_module_init_fn_t init
Initialization Function.
Definition: compress.h:106
int(* opal_compress_base_module_compress_fn_t)(char *fname, char **cname, char **postfix)
Compress the file provided.
Definition: compress.h:63
Structure for COMPRESS modules.
Definition: compress.h:104
int verbose
Verbosity Level.
Definition: compress.h:92
Meta data for MCA v2.0.0 components.
Definition: mca.h:309
int output_handle
Output Handle for opal_output.
Definition: compress.h:94
int priority
Default Priority.
Definition: compress.h:96
mca_base_component_data_t base_data
MCA base data.
Definition: compress.h:89
A simple C-language object-oriented system with single inheritance and ownership-based memory managem...
Structure for COMPRESS components.
Definition: compress.h:85
opal_compress_base_module_compress_fn_t compress
Compress interface.
Definition: compress.h:111