FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
xrootd/python/src/PyXRootDModule.cc at master · cern-eos/xrootd · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
cern-eos
/
xrootd
Public
forked from
xrootd/xrootd
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
xrootd
/
python
/
src
/
PyXRootDModule.cc
Copy path
More file actions
More file actions
Latest commit
History
History
History
120 lines (107 loc) · 5.06 KB
Breadcrumbs
xrootd
/
python
/
src
/
PyXRootDModule.cc
Copy path
File metadata and controls
120 lines (107 loc) · 5.06 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
//
------------------------------------------------------------------------------
//
Copyright (c) 2012-2013 by European Organization for Nuclear Research (CERN)
//
Author: Justin Salmon <jsalmon@cern.ch>
//
------------------------------------------------------------------------------
//
This file is part of the XRootD software suite.
//
//
XRootD is free software: you can redistribute it and/or modify
//
it under the terms of the GNU Lesser General Public License as published by
//
the Free Software Foundation, either version 3 of the License, or
//
(at your option) any later version.
//
//
XRootD 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 Lesser General Public License
//
along with XRootD. If not, see <http://www.gnu.org/licenses/>.
//
//
In applying this licence, CERN does not waive the privileges and immunities
//
granted to it by virtue of its status as an Intergovernmental Organization
//
or submit itself to any jurisdiction.
//
------------------------------------------------------------------------------
#
include
"
PyXRootD.hh
"
#
include
"
PyXRootDFileSystem.hh
"
#
include
"
PyXRootDFile.hh
"
#
include
"
PyXRootDCopyProcess.hh
"
#
include
"
PyXRootDURL.hh
"
#
include
"
PyXRootDFinalize.hh
"
#
include
"
PyXRootDEnv.hh
"
#
include
"
PyXRootDAdler32.hh
"
namespace
PyXRootD
{
//
Global module object
PyObject* ClientModule;
PyDoc_STRVAR
(client_module_doc,
"
XRootD Client extension module
"
);
//
----------------------------------------------------------------------------
//
! Visible module-level method declarations
//
----------------------------------------------------------------------------
static
PyMethodDef module_methods[] =
{
//
The finalization routine used in atexit handler.
{
"
__XrdCl_Stop_Threads
"
, __XrdCl_Stop_Threads,
METH_NOARGS
,
"
Stop XrdCl threads.
"
},
//
Ths XRootD Env
{
"
EnvPutString_cpp
"
, EnvPutString_cpp,
METH_VARARGS
,
"
Puts a string into XrdCl environment.
"
},
{
"
EnvGetString_cpp
"
, EnvGetString_cpp,
METH_VARARGS
,
"
Gets a string from XrdCl environment.
"
},
{
"
EnvDelString_cpp
"
, EnvDelString_cpp,
METH_VARARGS
,
"
Deletes a string from XrdCl environment.
"
},
{
"
EnvPutInt_cpp
"
, EnvPutInt_cpp,
METH_VARARGS
,
"
Puts an int into XrdCl environment.
"
},
{
"
EnvGetInt_cpp
"
, EnvGetInt_cpp,
METH_VARARGS
,
"
Gets an int from XrdCl environment.
"
},
{
"
EnvDelInt_cpp
"
, EnvDelInt_cpp,
METH_VARARGS
,
"
Deletes an int from XrdCl environment.
"
},
{
"
XrdVersion_cpp
"
, XrdVersion_cpp,
METH_VARARGS
,
"
Get the XRootD client version.
"
},
{
"
EnvGetDefault_cpp
"
, EnvGetDefault_cpp,
METH_VARARGS
,
"
Get default values from XrdCl environment
"
},
{
"
SetLogLevel_cpp
"
, SetLogLevel_cpp,
METH_VARARGS
,
"
Set XrdCl log level
"
},
{
"
SetLogMask_cpp
"
, SetLogMask_cpp,
METH_VARARGS
,
"
Set XrdCl log mask
"
},
{
"
setXAttrAdler32_cpp
"
, setXAttrAdler32_cpp,
METH_VARARGS
,
"
Set adler32 checksum extended attribute (path, checksum).
"
},
{
NULL
,
NULL
,
0
,
NULL
}
};
//
----------------------------------------------------------------------------
//
! Module properties
//
----------------------------------------------------------------------------
static
struct
PyModuleDef
moduledef = {
PyModuleDef_HEAD_INIT,
"
client
"
,
/*
m_name
*/
client_module_doc,
/*
m_doc
*/
-
1
,
/*
m_size
*/
module_methods,
/*
m_methods
*/
NULL
,
/*
m_reload
*/
NULL
,
/*
m_traverse
*/
NULL
,
/*
m_clear
*/
NULL
,
/*
m_free
*/
};
//
----------------------------------------------------------------------------
//
! Module initialization function
//
----------------------------------------------------------------------------
PyMODINIT_FUNC
PyInit_client
(
void
)
{
FileSystemType.
tp_new
= PyType_GenericNew;
if
(
PyType_Ready
( &FileSystemType ) <
0
) {
return
NULL
;
}
Py_INCREF
( &FileSystemType );
FileType.
tp_new
= PyType_GenericNew;
if
(
PyType_Ready
( &FileType ) <
0
) {
return
NULL
;
}
Py_INCREF
( &FileType );
URLType.
tp_new
= PyType_GenericNew;
if
(
PyType_Ready
( &URLType ) <
0
) {
return
NULL
;
}
Py_INCREF
( &URLType );
CopyProcessType.
tp_new
= PyType_GenericNew;
if
(
PyType_Ready
( &CopyProcessType ) <
0
) {
return
NULL
;
}
Py_INCREF
( &CopyProcessType );
ClientModule =
PyModule_Create
(&moduledef);
if
(ClientModule ==
NULL
) {
return
NULL
;
}
PyModule_AddObject
( ClientModule,
"
FileSystem
"
, (PyObject *) &FileSystemType );
PyModule_AddObject
( ClientModule,
"
File
"
, (PyObject *) &FileType );
PyModule_AddObject
( ClientModule,
"
URL
"
, (PyObject *) &URLType );
PyModule_AddObject
( ClientModule,
"
CopyProcess
"
, (PyObject *) &CopyProcessType );
return
ClientModule;
}
}
Back
|
FazBrowse Home
|
New Git URL