equal
deleted
inserted
replaced
32 #include <coemain.h> |
32 #include <coemain.h> |
33 #include <e32std.h> |
33 #include <e32std.h> |
34 #include <w32std.h> // RWsSession |
34 #include <w32std.h> // RWsSession |
35 #include <apacmdln.h> |
35 #include <apacmdln.h> |
36 #include <eikenv.h> |
36 #include <eikenv.h> |
37 /* |
|
38 void XQServiceUtil::hideFromFsw( bool hide ) |
|
39 { |
|
40 RAknUiServer uiServer; |
|
41 int sid = RProcess().SecureId().iId; |
|
42 uiServer.Connect(); |
|
43 uiServer.HideApplicationFromFsw( hide, sid ); |
|
44 uiServer.Close(); |
|
45 } |
|
46 */ |
|
47 |
37 |
48 void XQServiceUtil::toBackground( bool value ) |
38 void XQServiceUtil::toBackground( bool value ) |
49 { |
39 { |
50 XQSERVICE_DEBUG_PRINT("XQServiceUtil::toBackground"); |
40 XQSERVICE_DEBUG_PRINT("XQServiceUtil::toBackground"); |
51 XQSERVICE_DEBUG_PRINT("value: %d", value); |
41 XQSERVICE_DEBUG_PRINT("value: %d", value); |
52 RWsSession ws; |
42 RWsSession ws; |
53 int sid = RProcess().SecureId().iId; |
43 int sid = RProcess().SecureId().iId; // Assumes UID3 == SID !!! |
54 XQSERVICE_DEBUG_PRINT("sid: %d", sid); |
44 XQSERVICE_DEBUG_PRINT("sid: %d", sid); |
55 if (ws.Connect() == KErrNone) { |
45 if (ws.Connect() == KErrNone) { |
56 XQSERVICE_DEBUG_PRINT("Connected to window server"); |
46 XQSERVICE_DEBUG_PRINT("Connected to window server"); |
57 TApaTaskList tasklist(ws); |
47 TApaTaskList tasklist(ws); |
58 TApaTask task = tasklist.FindApp(TUid::Uid(sid)); |
48 TApaTask task = tasklist.FindApp(TUid::Uid(sid)); |
98 } |
88 } |
99 XQSERVICE_DEBUG_PRINT("Not service"); |
89 XQSERVICE_DEBUG_PRINT("Not service"); |
100 return false; |
90 return false; |
101 } |
91 } |
102 |
92 |
|
93 QString XQServiceUtil::interfaceName() |
|
94 { |
|
95 XQSERVICE_DEBUG_PRINT("XQServiceUtil::interfaceName"); |
|
96 QString ret; |
|
97 QStringList args = QCoreApplication::arguments(); |
|
98 foreach (QString arg, args) { |
|
99 if (arg.contains(QString::fromLatin1(XQServiceUtils::StartupArgInterfaceName),Qt::CaseInsensitive)) { |
|
100 QStringList l= arg.split("="); |
|
101 ret = l.value(1); |
|
102 } |
|
103 } |
|
104 XQSERVICE_DEBUG_PRINT("interfaceName=%s", qPrintable(ret)); |
|
105 return ret; |
|
106 } |
|
107 |
|
108 QString XQServiceUtil::operationName() |
|
109 { |
|
110 XQSERVICE_DEBUG_PRINT("XQServiceUtil::operationName"); |
|
111 QString ret; |
|
112 QStringList args = QCoreApplication::arguments(); |
|
113 foreach (QString arg, args) { |
|
114 if (arg.contains(QString::fromLatin1(XQServiceUtils::StartupArgOperationName),Qt::CaseInsensitive)) { |
|
115 QStringList l= arg.split("="); |
|
116 ret = l.value(1); |
|
117 } |
|
118 } |
|
119 XQSERVICE_DEBUG_PRINT("operationName=%s", qPrintable(ret)); |
|
120 return ret; |
|
121 } |
|
122 |