Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
c2b62bcc
Commit
c2b62bcc
authored
Oct 26, 2015
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt script functions GetUser() and GetPrivileges() added
parent
93b40620
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
128 additions
and
0 deletions
+128
-0
src/doc/man/en_us/man_opg.dat
src/doc/man/en_us/man_opg.dat
+41
-0
src/doc/man/sv_se/man_opg.dat
src/doc/man/sv_se/man_opg.dat
+39
-0
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+48
-0
No files found.
src/doc/man/en_us/man_opg.dat
View file @
c2b62bcc
...
...
@@ -2804,6 +2804,8 @@ GetCurrentObject() <LINK> getcurrentobject()
pwr_get_config() <LINK> pwr_get_config()
get_node_name() <LINK> get_node_name()
get_language() <LINK> get_language()
GetUser() <LINK> getuser()
GetPrivileges() <LINK> getprivileges()
<h2>xtt-commands
xtt-commands <LINK> xtt-commands
...
...
@@ -4022,6 +4024,8 @@ GetCurrentObject() <t>Get selected object. <LINK> getcurrentobject()
pwr_get_config() <t>Get configuration values <LINK> pwr_get_config()
get_node_name() <t>Get node name <LINK> get_node_name()
get_language() <t>Get the current language <LINK> get_language()
GetUser() <t>Get the current user. <LINK> getuser()
GetPrivileges() <t>Get the privileges for the current user. <LINK> getprivileges()
</TOPIC>
<headerlevel>
...
...
@@ -4160,6 +4164,43 @@ string <t><t>The current langage, e.g en_us, sv_se, de_de.
<c> create opmenu/name="Functions-ProcessGraphs-Overview"/command="open graph overview"
<c> endif
</TOPIC>
<TOPIC> getuser() <style> function
GetUser()
string GetUser()
<b>Description
Get the current user.
<b>Example
<c> string user;
<c> user = GetUser();
</TOPIC>
<TOPIC> getprivileges() <style> function
GetPrivileges()
int GetPrivileges()
<b>Description
Get the privileges for the current user.
<b>Example
<c> int priv;
<c> priv = GetPrivileges();
<c> if ( priv & 4)
<c> # Has system privilege
<c> ...
<c> endif
</TOPIC>
</headerlevel>
<TOPIC> xtt-commands <style> function
...
...
src/doc/man/sv_se/man_opg.dat
View file @
c2b62bcc
...
...
@@ -2577,6 +2577,8 @@ GetCurrentObject() <LINK> getcurrentobject()
pwr_get_config() <LINK> pwr_get_config()
get_node_name() <LINK> get_node_name()
get_language() <LINK> get_language()
GetUser() <LINK> getuser()
GetPrivileges() <LINK> getprivileges()
<h2>xtt-commands
xtt-commands <LINK> xtt-commands
...
...
@@ -3785,6 +3787,8 @@ GetCurrentObject() <t>H
pwr_get_config() <t>Hämta konfigurations-värden <LINK> pwr_get_config()
get_node_name() <t>Hämta nodnamn <LINK> get_node_name()
get_language() <t>Hämta nuvarande språk <LINK> get_language()
GetUser() <t>Hämta nuvarande användare. <LINK> getuser()
GetPrivileges() <t>Hämta privilegier för nuvarande användare. <LINK> getprivileges()
</TOPIC>
<headerlevel>
...
...
@@ -3924,6 +3928,41 @@ string <t><t>Nuvarande spr
<c> create opmenu/name="Functions-ProcessGraphs-Overview"/command="open graph overview"
<c> endif
</TOPIC>
<TOPIC> getuser() <style> function
GetUser()
string GetUser()
<b>Beskrivning
Hämta nuvarande användare.
<b>Exempel
<c> string user;
<c> user = GetUser();
</TOPIC>
<TOPIC> getprivileges() <style> function
GetPrivileges()
int GetPrivileges()
<b>Beskrivning
Hämta privilegier för nuvarande användare.
<b>Exempel
<c> int priv;
<c> priv = GetPrivileges();
<c> if ( priv & 4)
<c> # Has system privilege
<c> ...
<c> endif
</TOPIC>
</headerlevel>
<TOPIC> xtt-commands <style> function
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
c2b62bcc
...
...
@@ -8290,6 +8290,50 @@ static int xnav_setattribute_func(
return
1
;
}
static
int
xnav_getuser_func
(
void
*
filectx
,
ccm_sArg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
ccm_tFloat
*
return_float
,
ccm_tInt
*
return_int
,
char
*
return_string
)
{
XNav
*
xnav
;
if
(
arg_count
!=
0
)
return
CCM__ARGMISM
;
xnav_get_stored_xnav
(
&
xnav
);
strcpy
(
return_string
,
xnav
->
user
);
*
return_decl
=
CCM_DECL_STRING
;
return
1
;
}
static
int
xnav_getprivileges_func
(
void
*
filectx
,
ccm_sArg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
ccm_tFloat
*
return_float
,
ccm_tInt
*
return_int
,
char
*
return_string
)
{
XNav
*
xnav
;
if
(
arg_count
!=
0
)
return
CCM__ARGMISM
;
xnav_get_stored_xnav
(
&
xnav
);
*
return_int
=
xnav
->
priv
;
*
return_decl
=
CCM_DECL_INT
;
return
1
;
}
static
int
xnav_ccm_deffilename_func
(
char
*
outfile
,
char
*
infile
,
void
*
client_data
)
{
pwr_tFileName
fname
;
...
...
@@ -8369,6 +8413,10 @@ int XNav::readcmdfile( char *incommand, char *buffer)
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"ConfirmDialog"
,
xnav_confirmdialog_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetUser"
,
xnav_getuser_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetPrivileges"
,
xnav_getprivileges_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_create_external_var
(
"GLOW__SUBTERMINATED"
,
CCM_DECL_INT
,
0
,
GLOW__SUBTERMINATED
,
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment