equal
deleted
inserted
replaced
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
|
17 |
|
18 #include "emailtrace.h" |
|
19 |
17 #include "nmmailagentheaders.h" |
20 #include "nmmailagentheaders.h" |
18 #include "nmmailagent.h" |
21 #include "nmmailagent.h" |
19 #include "ssastartupwatcher.h" |
22 #include "ssastartupwatcher.h" |
20 |
23 |
21 #ifdef __WINSCW__ |
24 #ifdef __WINSCW__ |
29 /*! |
32 /*! |
30 Callback for reporting startup state |
33 Callback for reporting startup state |
31 */ |
34 */ |
32 static void startupCallback(int status) |
35 static void startupCallback(int status) |
33 { |
36 { |
34 NMLOG(QString("nmailagent: startupCallback %1").arg(status)); |
37 NM_FUNCTION; |
|
38 NM_COMMENT(QString("nmailagent: startupCallback(): status=%1").arg(status)); |
|
39 |
35 Q_UNUSED(status); |
40 Q_UNUSED(status); |
36 |
41 |
37 // either it is an error or 'non critical startup' state has been reached |
42 // either it is an error or 'non critical startup' state has been reached |
38 // Start the agent in both cases |
43 // Start the agent in both cases |
39 QTimer::singleShot(NmStartupDelay, agent, SLOT(delayedStart())); |
44 QTimer::singleShot(NmStartupDelay, agent, SLOT(delayedStart())); |
42 /*! |
47 /*! |
43 main |
48 main |
44 */ |
49 */ |
45 int main(int argc, char *argv[]) |
50 int main(int argc, char *argv[]) |
46 { |
51 { |
|
52 NM_FUNCTION; |
|
53 |
47 QCoreApplication app(argc, argv); |
54 QCoreApplication app(argc, argv); |
48 |
55 |
49 agent = new NmMailAgent; |
56 agent = new NmMailAgent; |
50 |
57 |
51 CSSAStartupWatcher *startupWatcher = CSSAStartupWatcher::New(startupCallback); |
58 CSSAStartupWatcher *startupWatcher = CSSAStartupWatcher::New(startupCallback); |
52 if (!startupWatcher) { |
59 if (!startupWatcher) { |
53 NMLOG("nmmailagent - watcher start failed"); |
60 NM_ERROR(1,"nmmailagent: watcher start failed"); |
54 QTimer::singleShot(NmStartupDelay, agent, SLOT(delayedStart())); |
61 QTimer::singleShot(NmStartupDelay, agent, SLOT(delayedStart())); |
55 } |
62 } |
56 |
63 |
57 int retValue = app.exec(); |
64 int retValue = app.exec(); |
58 delete startupWatcher; |
65 delete startupWatcher; |