camerauis/cameraxui/cxengine/src/cxefilenamegeneratorsymbian.cpp
changeset 43 0e652f8f1fbd
parent 19 d9aefe59d544
child 45 24fd82631616
--- a/camerauis/cameraxui/cxengine/src/cxefilenamegeneratorsymbian.cpp	Thu May 13 21:30:19 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxefilenamegeneratorsymbian.cpp	Thu Jul 15 01:55:05 2010 +0300
@@ -28,6 +28,11 @@
 #include "cxeerror.h"
 #include "cxeerrormappingsymbian.h"
 
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cxefilenamegeneratorsymbianTraces.h"
+#endif
+
 
 using namespace Cxe;
 
@@ -48,7 +53,10 @@
 const char MAX_CHAR = 'Z';
 
 const TInt64 KMinRequiredSpaceImage = 2000000;
-const TInt64 KMinRequiredSpaceVideo = 4000000;
+
+// Whether there's enough space for video or not is handled lower in the SW stack
+// so this is set to 0 to fix an error
+const TInt64 KMinRequiredSpaceVideo = 0;
 
 
 
@@ -76,6 +84,7 @@
          mCurrentMode(mode)
 {
     CX_DEBUG_ENTER_FUNCTION();
+    OstTrace0(camerax_performance, CXEFILENAMEGENERATOR_1, "msg: e_CX_FILENAMEGENERATOR_NEW 1");
 
     // Set default values (used in case of error retrieving values)
     mCurrentMonth = "";
@@ -89,6 +98,7 @@
     mSettings.get(CxeSettingIds::FNAME_IMAGE_COUNTER, mImageCounter);
     mSettings.get(CxeSettingIds::FNAME_VIDEO_COUNTER, mVideoCounter);
 
+    OstTrace0(camerax_performance, CXEFILENAMEGENERATOR_2, "msg: e_CX_FILENAMEGENERATOR_NEW 0");
     CX_DEBUG_EXIT_FUNCTION();
 }
 
@@ -149,6 +159,7 @@
 CxeError::Id CxeFilenameGeneratorSymbian::generateFilename(QString &qfName, const QString &fileExt)
 {
     CX_DEBUG_ENTER_FUNCTION();
+    OstTrace0(camerax_performance, CXEFILENAMEGENERATORSYMBIAN_GENERATENAME_1, "msg: e_CX_GENERATE_FILENAME 1");
 
     // Make sure that the path for images/videos exists
     QString path;
@@ -164,6 +175,7 @@
         }
     }
 
+    OstTrace0(camerax_performance, CXEFILENAMEGENERATORSYMBIAN_GENERATENAME_2, "msg: e_CX_GENERATE_FILENAME 0");
     CX_DEBUG_EXIT_FUNCTION();
     return CxeErrorHandlingSymbian::map(err);
 }
@@ -350,6 +362,7 @@
 int CxeFilenameGeneratorSymbian::selectFolder(QString &suggestedPath)
 {
     CX_DEBUG_ENTER_FUNCTION();
+    OstTrace0(camerax_performance, CXEFILENAMEGENERATORSYMBIAN_SELECTFOLDER_1, "msg: e_CX_SELECT_FOLDER 1");
 
     // Compose the path string and select counter based on mode.
     QString basePath = "%1%2\\";
@@ -425,6 +438,7 @@
         }
     }
 
+    OstTrace0(camerax_performance, CXEFILENAMEGENERATORSYMBIAN_SELECTFOLDER_2, "msg: e_CX_SELECT_FOLDER 0");
     CX_DEBUG_EXIT_FUNCTION();
 
     // We fallback to basePath in case of unknown errors,
@@ -441,6 +455,7 @@
 int CxeFilenameGeneratorSymbian::initMonthFolders()
 {
     CX_DEBUG_ENTER_FUNCTION();
+    OstTrace0(camerax_performance, CXEFILENAMEGENERATORSYMBIAN_INITFOLDERS_1, "msg: e_CX_INIT_MONTH_FOLDER 1");
 
     // Month folder: YYYYMM, with suffix: YYYYMMXX
     QString monthFolder = QDate::currentDate().toString("yyyyMM");
@@ -486,6 +501,7 @@
         CX_DEBUG(("[FATAL] - Could not create month folder, error %d", status));
     }
 
+    OstTrace0(camerax_performance, CXEFILENAMEGENERATORSYMBIAN_INITFOLDERS_2, "msg: e_CX_INIT_MONTH_FOLDER 0");
     CX_DEBUG_EXIT_FUNCTION();
     return status;
 }
@@ -593,6 +609,7 @@
 CxeError::Id CxeFilenameGeneratorSymbian::init(Cxe::CameraMode mode)
 {
     CX_DEBUG_ENTER_FUNCTION();
+    OstTrace0(camerax_performance, CXEFILENAMEGENERATORSYMBIAN_INIT_1, "msg: e_CX_FILENAMEGENERATOR_INIT 1");
 
     mCurrentMode = mode;
     int err = KErrNone;
@@ -617,6 +634,7 @@
         }
     }
 
+    OstTrace0(camerax_performance, CXEFILENAMEGENERATORSYMBIAN_INIT_2, "msg: e_CX_FILENAMEGENERATOR_INIT 0");
     CX_DEBUG_EXIT_FUNCTION();
     return CxeErrorHandlingSymbian::map(err);
 }