~ubuntu-branches/ubuntu/precise/code-saturne/precise

« back to all changes in this revision

Viewing changes to salome/cfd_proxy/cfd_proxy_child.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2011-11-24 00:00:08 UTC
  • mfrom: (6.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20111124000008-2vo99e38267942q5
Tags: 2.1.0-3
Install a missing file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _CFD_PROXY_CHILD_H_
 
2
#define _CFD_PROXY_CHILD_H_
 
3
 
 
4
//============================================================================
 
5
// Spawn a child process and establish a connection.
 
6
//============================================================================
 
7
 
 
8
/*
 
9
  This file is part of Code_Saturne, a general-purpose CFD tool.
 
10
 
 
11
  Copyright (C) 1998-2011 EDF S.A.
 
12
 
 
13
  This program is free software; you can redistribute it and/or modify it under
 
14
  the terms of the GNU General Public License as published by the Free Software
 
15
  Foundation; either version 2 of the License, or (at your option) any later
 
16
  version.
 
17
 
 
18
  This program is distributed in the hope that it will be useful, but WITHOUT
 
19
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
20
  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 
21
  details.
 
22
 
 
23
  You should have received a copy of the GNU General Public License along with
 
24
  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
 
25
  Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
26
*/
 
27
 
 
28
//----------------------------------------------------------------------------
 
29
// System headers
 
30
//----------------------------------------------------------------------------
 
31
 
 
32
//----------------------------------------------------------------------------
 
33
// Local headers
 
34
//----------------------------------------------------------------------------
 
35
 
 
36
#include "cfd_proxy_defs.h"
 
37
 
 
38
#include "cfd_proxy_comm.h"
 
39
 
 
40
//----------------------------------------------------------------------------
 
41
 
 
42
#ifdef __cplusplus
 
43
extern "C" {
 
44
#if 0
 
45
} /* Fake brace to force back Emacs auto-indentation back to column 0 */
 
46
#endif
 
47
#endif /* __cplusplus */
 
48
 
 
49
//----------------------------------------------------------------------------
 
50
// Structure definitions
 
51
//----------------------------------------------------------------------------
 
52
 
 
53
typedef struct _cfd_proxy_child_t cfd_proxy_child_t;
 
54
 
 
55
//============================================================================
 
56
// Global variables
 
57
//============================================================================
 
58
 
 
59
//============================================================================
 
60
// Public function prototypes
 
61
//============================================================================
 
62
 
 
63
//----------------------------------------------------------------------------
 
64
// Spawn a child process and establish a connection
 
65
//
 
66
// returns:
 
67
//   child process handle in case of success, NULL in case of error.
 
68
//----------------------------------------------------------------------------
 
69
 
 
70
cfd_proxy_child_t *
 
71
cfd_proxy_child_start(const char                   *path,
 
72
                      char                   *const argv[restrict],
 
73
                      char                   *const envp[restrict],
 
74
                      cfd_proxy_comm_type_t         comm_type,
 
75
                      int                           comm_verbosity);
 
76
 
 
77
//----------------------------------------------------------------------------
 
78
// End connection with a child process and free associated structure
 
79
//----------------------------------------------------------------------------
 
80
 
 
81
int
 
82
cfd_proxy_child_stop(cfd_proxy_child_t **child);
 
83
 
 
84
//----------------------------------------------------------------------------
 
85
// Forward all calls from the client and their responses.
 
86
//----------------------------------------------------------------------------
 
87
 
 
88
void
 
89
cfd_proxy_child_forward_all(cfd_proxy_child_t  *child);
 
90
 
 
91
//----------------------------------------------------------------------------
 
92
 
 
93
#ifdef __cplusplus
 
94
}
 
95
#endif /* __cplusplus */
 
96
 
 
97
#endif /* _CFD_PROXY_CHILD_H_ */