27 |
|
|
28 |
|
cdef extern from "statgrab.h": |
29 |
|
cdef extern int sg_init() |
30 |
+ |
cdef extern int sg_shutdown() |
31 |
+ |
cdef extern int sg_snapshot() |
32 |
|
cdef extern int sg_drop_privileges() |
33 |
|
|
34 |
|
ctypedef enum sg_error: |
293 |
|
|
294 |
|
def py_sg_init(): |
295 |
|
if sg_init() == 0: |
296 |
+ |
return True |
297 |
+ |
else: |
298 |
+ |
return False |
299 |
+ |
|
300 |
+ |
def py_sg_shutdown(): |
301 |
+ |
if sg_shutdown() == 0: |
302 |
+ |
return True |
303 |
+ |
else: |
304 |
+ |
return False |
305 |
+ |
|
306 |
+ |
def py_sg_snapshot(): |
307 |
+ |
if sg_snapshot() == 0: |
308 |
|
return True |
309 |
|
else: |
310 |
|
return False |