Annotation of /mcore-src/trunk/mcore-tools/src/modules/citrix/citrix.control.class.in
Parent Directory | Revision Log
Revision 2288 -
(hide annotations)
(download)
Tue Jan 14 16:17:56 2014 UTC (10 years, 4 months ago) by niro
File size: 1249 byte(s)
Tue Jan 14 16:17:56 2014 UTC (10 years, 4 months ago) by niro
File size: 1249 byte(s)
-moved daemon/control/include/session.control.class to src/modules/citrix/citrix.control.class.in
1 | niro | 2051 | #!/bin/sh |
2 | |||
3 | # set_session_addmenuitem $name $exec $workdir $icon | ||
4 | set_session_addmenuitem() | ||
5 | { | ||
6 | local serial="$1" | ||
7 | local name="$2" | ||
8 | local exec="$3" | ||
9 | local workdir="$4" | ||
10 | local icon="$5" | ||
11 | |||
12 | mysql_insert cfg_other_menuitems,serial="${serial}",name="${name}",exec="${exec}",workdir="${workdir}",icon="${workdir}" | ||
13 | } | ||
14 | |||
15 | # control_session_addmenuitem $serial | ||
16 | control_session_addmenuitem() | ||
17 | { | ||
18 | local serial="$1" | ||
19 | local all | ||
20 | local item | ||
21 | |||
22 | # retvals of evaluate_table_xml | ||
23 | local cfg_other_menuitems_serial | ||
24 | local cfg_other_menuitems_id | ||
25 | local cfg_other_menuitems_name | ||
26 | local cfg_other_menuitems_exec | ||
27 | local cfg_other_menuitems_workdir | ||
28 | local cfg_other_menuitems_icon | ||
29 | |||
30 | all=$(mysqldo "select name from cfg_other_menuitems where serial='${serial}'") | ||
31 | for item in ${all} | ||
32 | do | ||
33 | # first of all get the vars | ||
34 | evaluate_table_xml cfg_other_menuitems "where serial='${serial}' and name='${item}'" | ||
35 | |||
36 | control_client "${serial}" set session.addmenuitem \ | ||
37 | "${cfg_other_menuitems_name}" \ | ||
38 | "${cfg_other_menuitems_exec}" \ | ||
39 | "${cfg_other_menuitems_workdir}" \ | ||
40 | "${cfg_other_menuitems_icon}" | ||
41 | done | ||
42 | } | ||
43 | |||
44 | # set_session_delmenuitem | ||
45 | control_session_delmenuitem() | ||
46 | { | ||
47 | local serial="$1" | ||
48 | |||
49 | # no arguments given to del all items! | ||
50 | control_client "${serial}" set session.delmenuitem | ||
51 | } |