forked from fish-shell/fish-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
env_universal.h
72 lines (58 loc) · 1.64 KB
/
env_universal.h
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
/** \file env_universal.h
Universal variable client library.
*/
#ifndef ENV_UNIVERSAL_H
#define ENV_UNIVERSAL_H
#include <wchar.h>
#include "env_universal_common.h"
/**
Data about the universal variable server.
*/
extern connection_t env_universal_server;
/**
Initialize the envuni library
*/
void env_universal_init( wchar_t * p,
wchar_t *u,
void (*sf)(),
void (*cb)( fish_message_type_t type, const wchar_t *name, const wchar_t *val ));
/**
Free memory used by envuni
*/
void env_universal_destroy();
/**
Get the value of a universal variable
*/
wchar_t *env_universal_get( const wcstring &name );
/**
Get the export flag of the variable with the specified
name. Returns 0 if the variable doesn't exist.
*/
int env_universal_get_export( const wcstring &name );
/**
Set the value of a universal variable
*/
void env_universal_set( const wcstring &name, const wcstring &val, int exportv );
/**
Erase a universal variable
\return zero if the variable existed, and non-zero if the variable did not exist
*/
int env_universal_remove( const wchar_t *name );
/**
Read all available messages from the server.
*/
int env_universal_read_all();
/**
Get the names of all universal variables
\param l the list to insert the names into
\param show_exported whether exported variables should be shown
\param show_unexported whether unexported variables should be shown
*/
void env_universal_get_names2( wcstring_list_t &list,
int show_exported,
int show_unexported );
/**
Synchronize with fishd
*/
void env_universal_barrier();
#endif