src/3rdparty/phonon/mmf/utils.h
branchRCL_3
changeset 4 3b1da2848fc7
parent 0 1918ee327afb
child 5 d3bac044e0f0
--- a/src/3rdparty/phonon/mmf/utils.h	Tue Feb 02 00:43:10 2010 +0200
+++ b/src/3rdparty/phonon/mmf/utils.h	Fri Feb 19 23:40:16 2010 +0200
@@ -21,7 +21,7 @@
 
 #include <private/qcore_symbian_p.h>
 #include <e32debug.h>   // for RDebug
-
+#include <QtCore/QCoreApplication> // for Q_DECLARE_TR_FUNCTIONS
 #include <QColor>
 
 #include "defs.h"
@@ -38,35 +38,44 @@
 enum PanicCode {
     InvalidStatePanic               = 1,
     InvalidMediaTypePanic           = 2,
-    InvalidBackendInterfaceClass    = 3
+    InvalidBackendInterfaceClass    = 3,
+    AudioUtilityUrlNotSupported     = 4
 };
 
-namespace Utils
+class Utils
 {
+    Q_DECLARE_TR_FUNCTIONS(Utils)
+
+public:
 /**
  * Raise a fatal exception
  */
-void panic(PanicCode code);
+static void panic(PanicCode code);
 
 /**
  * Determines whether the provided MIME type is an audio or video
  * type.  If it is neither, the function returns MediaTypeUnknown.
  */
-MediaType mimeTypeToMediaType(const TDesC& mimeType);
+static MediaType mimeTypeToMediaType(const TDesC& mimeType);
+
+/**
+ * Translates a Symbian error code into a user-readable string.
+ */
+static QString symbianErrorToString(int errorCode);
 
 #ifndef QT_NO_DEBUG
 /**
  * Retrieve color of specified pixel from the screen.
  */
-QColor getScreenPixel(const QPoint& pos);
+static QColor getScreenPixel(const QPoint& pos);
 
 /**
  * Samples a small number of pixels from the screen, and dumps their
  * colors to the debug log.
  */
-void dumpScreenPixelSample();
+static void dumpScreenPixelSample();
 #endif
-}
+};
 
 /**
  * Available trace categories;