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 { |