nettools/conntest/src/ConnTestAppUi.cpp
changeset 35 304daf3cbbe0
parent 21 4b172782dca4
equal deleted inserted replaced
30:d02cab725a8c 35:304daf3cbbe0
    20 #include <AknsUtils.h>
    20 #include <AknsUtils.h>
    21 #include <AknQueryDialog.h>
    21 #include <AknQueryDialog.h>
    22 #include <aknnotewrappers.h> 
    22 #include <aknnotewrappers.h> 
    23 #include <CMessageData.h>
    23 #include <CMessageData.h>
    24 #include <TSendingCapabilities.h> 
    24 #include <TSendingCapabilities.h> 
    25 #include <sendui.h>
       
    26 
    25 
    27 #include "ConnTestAppUi.h"
    26 #include "ConnTestAppUi.h"
    28 #include "ConnTestView.h"
    27 #include "ConnTestView.h"
    29 #include <conntest.rsg>
    28 #include <conntest.rsg>
    30 #include "conntest.hrh"
    29 #include "conntest.hrh"
   112         delete iIpdumpEngine;
   111         delete iIpdumpEngine;
   113         iIpdumpEngine = NULL;
   112         iIpdumpEngine = NULL;
   114         }
   113         }
   115     delete iDecoratedTabGroup;
   114     delete iDecoratedTabGroup;
   116     iConnTestViews.Reset();
   115     iConnTestViews.Reset();
   117     delete iSendUi;
       
   118     // currently used with ->ExecuteLD, so deleted automatically elsewhere
   116     // currently used with ->ExecuteLD, so deleted automatically elsewhere
   119     // delete iWarningDialog;
   117     // delete iWarningDialog;
   120     }
   118     }
   121 
   119 
   122 // ----------------------------------------------------
   120 // ----------------------------------------------------
   279 // Launches the send ui for the ip log
   277 // Launches the send ui for the ip log
   280 // ----------------------------------------------------
   278 // ----------------------------------------------------
   281 //
   279 //
   282 void CConnTestAppUi::SendLogFileL()
   280 void CConnTestAppUi::SendLogFileL()
   283     {
   281     {
   284     if(!iIpdumpEngine)
   282     // Empty implementation, CSendUi dependency removed
   285         {
       
   286         iIpdumpEngine = CIpdumpEngine::NewL();                   
       
   287         }
       
   288     if(!iSendUi)
       
   289         {
       
   290         iSendUi = CSendUi::NewL();   
       
   291         }
       
   292     CMessageData* messageData = CMessageData::NewL();
       
   293     CleanupStack::PushL(messageData);
       
   294 
       
   295     // 
       
   296     // Since CSendUi doesn't support sending .log or .cap files, 
       
   297     // the file is renamed here.
       
   298     //
       
   299     _LIT(KNewName, "c:\\logs\\tcpdump\\probe.cap.txt"); 
       
   300     RFs fs;
       
   301     if (fs.Connect() == KErrNone)
       
   302         {
       
   303         fs.Replace(iIpdumpEngine->LogFileName(), KNewName);
       
   304         }
       
   305     fs.Close();
       
   306 
       
   307     messageData->AppendAttachmentL(KNewName); 
       
   308 
       
   309     TSendingCapabilities cap(0, 1024, TSendingCapabilities::ESupportsAttachments);
       
   310     iSendUi->ShowQueryAndSendL(messageData, cap);
       
   311     CleanupStack::PopAndDestroy(messageData); // messageData
       
   312     }
   283     }
   313 
   284 
   314 // ----------------------------------------------------
   285 // ----------------------------------------------------
   315 // CConnTestAppUi::StartIpLoggingL() 
   286 // CConnTestAppUi::StartIpLoggingL() 
   316 // Starts the logging of the ip traffic
   287 // Starts the logging of the ip traffic