emailservices/nmailagent/src/main.cpp
changeset 56 15bc1d5d6267
parent 43 99bcbff212ad
equal deleted inserted replaced
51:d845db10c0d4 56:15bc1d5d6267
    20 #include "nmmailagentheaders.h"
    20 #include "nmmailagentheaders.h"
    21 #include "nmmailagent.h"
    21 #include "nmmailagent.h"
    22 #include "ssastartupwatcher.h"
    22 #include "ssastartupwatcher.h"
    23 
    23 
    24 #ifdef __WINSCW__
    24 #ifdef __WINSCW__
    25 const int NmStartupDelay = 14000; // 14s
    25 const int NmStartupDelay = 4000; // 4s
    26 #else
    26 #else
    27 const int NmStartupDelay = 4000; // 4s
    27 const int NmStartupDelay = 1000; // 1s
    28 #endif
    28 #endif
    29 
    29 
    30 NmMailAgent *agent = NULL;
    30 NmMailAgent *agent = NULL;
    31 
    31 
    32 /*!
    32 /*!
    34 */
    34 */
    35 static void startupCallback(int status)
    35 static void startupCallback(int status)
    36 {
    36 {
    37     NM_FUNCTION;
    37     NM_FUNCTION;
    38     NM_COMMENT(QString("nmailagent: startupCallback(): status=%1").arg(status));
    38     NM_COMMENT(QString("nmailagent: startupCallback(): status=%1").arg(status));
    39     
    39 
    40     Q_UNUSED(status);
    40     Q_UNUSED(status);
    41 
    41 
    42     // 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
    43     // Start the agent in both cases
    43     // Start the agent in both cases
    44     QTimer::singleShot(NmStartupDelay, agent, SLOT(delayedStart()));
    44     QTimer::singleShot(NmStartupDelay, agent, SLOT(delayedStart()));
    48 	main
    48 	main
    49 */
    49 */
    50 int main(int argc, char *argv[])
    50 int main(int argc, char *argv[])
    51 {
    51 {
    52     NM_FUNCTION;
    52     NM_FUNCTION;
    53     
    53 
    54     QCoreApplication app(argc, argv);
    54     QCoreApplication app(argc, argv);
    55 
    55 
    56     agent = new NmMailAgent;
    56     agent = new NmMailAgent;
    57 
    57 
    58     CSSAStartupWatcher *startupWatcher = CSSAStartupWatcher::New(startupCallback);
    58     CSSAStartupWatcher *startupWatcher = CSSAStartupWatcher::New(startupCallback);