src/3rdparty/phonon/mmf/utils.h
branchRCL_3
changeset 4 3b1da2848fc7
parent 0 1918ee327afb
child 5 d3bac044e0f0
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
    19 #ifndef PHONON_MMF_UTILS_H
    19 #ifndef PHONON_MMF_UTILS_H
    20 #define PHONON_MMF_UTILS_H
    20 #define PHONON_MMF_UTILS_H
    21 
    21 
    22 #include <private/qcore_symbian_p.h>
    22 #include <private/qcore_symbian_p.h>
    23 #include <e32debug.h>   // for RDebug
    23 #include <e32debug.h>   // for RDebug
    24 
    24 #include <QtCore/QCoreApplication> // for Q_DECLARE_TR_FUNCTIONS
    25 #include <QColor>
    25 #include <QColor>
    26 
    26 
    27 #include "defs.h"
    27 #include "defs.h"
    28 
    28 
    29 QT_BEGIN_NAMESPACE
    29 QT_BEGIN_NAMESPACE
    36  * Panic codes for fatal errors
    36  * Panic codes for fatal errors
    37  */
    37  */
    38 enum PanicCode {
    38 enum PanicCode {
    39     InvalidStatePanic               = 1,
    39     InvalidStatePanic               = 1,
    40     InvalidMediaTypePanic           = 2,
    40     InvalidMediaTypePanic           = 2,
    41     InvalidBackendInterfaceClass    = 3
    41     InvalidBackendInterfaceClass    = 3,
       
    42     AudioUtilityUrlNotSupported     = 4
    42 };
    43 };
    43 
    44 
    44 namespace Utils
    45 class Utils
    45 {
    46 {
       
    47     Q_DECLARE_TR_FUNCTIONS(Utils)
       
    48 
       
    49 public:
    46 /**
    50 /**
    47  * Raise a fatal exception
    51  * Raise a fatal exception
    48  */
    52  */
    49 void panic(PanicCode code);
    53 static void panic(PanicCode code);
    50 
    54 
    51 /**
    55 /**
    52  * Determines whether the provided MIME type is an audio or video
    56  * Determines whether the provided MIME type is an audio or video
    53  * type.  If it is neither, the function returns MediaTypeUnknown.
    57  * type.  If it is neither, the function returns MediaTypeUnknown.
    54  */
    58  */
    55 MediaType mimeTypeToMediaType(const TDesC& mimeType);
    59 static MediaType mimeTypeToMediaType(const TDesC& mimeType);
       
    60 
       
    61 /**
       
    62  * Translates a Symbian error code into a user-readable string.
       
    63  */
       
    64 static QString symbianErrorToString(int errorCode);
    56 
    65 
    57 #ifndef QT_NO_DEBUG
    66 #ifndef QT_NO_DEBUG
    58 /**
    67 /**
    59  * Retrieve color of specified pixel from the screen.
    68  * Retrieve color of specified pixel from the screen.
    60  */
    69  */
    61 QColor getScreenPixel(const QPoint& pos);
    70 static QColor getScreenPixel(const QPoint& pos);
    62 
    71 
    63 /**
    72 /**
    64  * Samples a small number of pixels from the screen, and dumps their
    73  * Samples a small number of pixels from the screen, and dumps their
    65  * colors to the debug log.
    74  * colors to the debug log.
    66  */
    75  */
    67 void dumpScreenPixelSample();
    76 static void dumpScreenPixelSample();
    68 #endif
    77 #endif
    69 }
    78 };
    70 
    79 
    71 /**
    80 /**
    72  * Available trace categories;
    81  * Available trace categories;
    73  */
    82  */
    74 enum TTraceCategory {
    83 enum TTraceCategory {