author | zecke <zecke> | 2004-04-04 21:27:42 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-04 21:27:42 (UTC) |
commit | f664b509b5e622ab74560fb74093175e50b2790c (patch) (unidiff) | |
tree | d46acaa8dd49ab2de70aebcdcf57bce1276c6fd1 /libopie2/opiecore/odebug.cpp | |
parent | eb2831b5c94c4c27b8282842c9709234f5365e01 (diff) | |
download | opie-f664b509b5e622ab74560fb74093175e50b2790c.zip opie-f664b509b5e622ab74560fb74093175e50b2790c.tar.gz opie-f664b509b5e622ab74560fb74093175e50b2790c.tar.bz2 |
Opie::XYZ::Private -> Opie::XYZ::Internal
Diffstat (limited to 'libopie2/opiecore/odebug.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/odebug.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libopie2/opiecore/odebug.cpp b/libopie2/opiecore/odebug.cpp index cac985b..f258faa 100644 --- a/libopie2/opiecore/odebug.cpp +++ b/libopie2/opiecore/odebug.cpp | |||
@@ -46,48 +46,57 @@ | |||
46 | #include <opie2/oconfig.h> | 46 | #include <opie2/oconfig.h> |
47 | 47 | ||
48 | /* QT */ | 48 | /* QT */ |
49 | 49 | ||
50 | #include <qfile.h> | 50 | #include <qfile.h> |
51 | #include <qmessagebox.h> | 51 | #include <qmessagebox.h> |
52 | #include <qsocketdevice.h> | 52 | #include <qsocketdevice.h> |
53 | 53 | ||
54 | /* UNIX */ | 54 | /* UNIX */ |
55 | 55 | ||
56 | #include <stdlib.h> // abort | 56 | #include <stdlib.h> // abort |
57 | #include <unistd.h> // getpid | 57 | #include <unistd.h> // getpid |
58 | #include <stdarg.h> // vararg stuff | 58 | #include <stdarg.h> // vararg stuff |
59 | #include <ctype.h> // isprint | 59 | #include <ctype.h> // isprint |
60 | #include <syslog.h> | 60 | #include <syslog.h> |
61 | #include <errno.h> | 61 | #include <errno.h> |
62 | #include <string.h> | 62 | #include <string.h> |
63 | 63 | ||
64 | #ifndef OPIE_NO_BACKTRACE | 64 | #ifndef OPIE_NO_BACKTRACE |
65 | #include <execinfo.h> | 65 | #include <execinfo.h> |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | namespace Opie { | 68 | namespace Opie { |
69 | namespace Core { | 69 | namespace Core { |
70 | namespace Internal { | ||
71 | class DebugBackend { | ||
72 | }; | ||
73 | |||
74 | static DebugBackend *backEnd = 0; | ||
75 | } | ||
76 | static void clean_up_routine() { | ||
77 | delete Internal::backEnd; | ||
78 | } | ||
70 | /*====================================================================================== | 79 | /*====================================================================================== |
71 | * debug levels | 80 | * debug levels |
72 | *======================================================================================*/ | 81 | *======================================================================================*/ |
73 | 82 | ||
74 | enum DebugLevels { | 83 | enum DebugLevels { |
75 | ODEBUG_INFO = 0, | 84 | ODEBUG_INFO = 0, |
76 | ODEBUG_WARN = 1, | 85 | ODEBUG_WARN = 1, |
77 | ODEBUG_ERROR = 2, | 86 | ODEBUG_ERROR = 2, |
78 | ODEBUG_FATAL = 3 | 87 | ODEBUG_FATAL = 3 |
79 | }; | 88 | }; |
80 | 89 | ||
81 | /*====================================================================================== | 90 | /*====================================================================================== |
82 | * oDebug private data | 91 | * oDebug private data |
83 | *======================================================================================*/ | 92 | *======================================================================================*/ |
84 | 93 | ||
85 | /*====================================================================================== | 94 | /*====================================================================================== |
86 | * the main debug function | 95 | * the main debug function |
87 | *======================================================================================*/ | 96 | *======================================================================================*/ |
88 | 97 | ||
89 | static void oDebugBackend( unsigned short level, unsigned int area, const char *data) | 98 | static void oDebugBackend( unsigned short level, unsigned int area, const char *data) |
90 | { | 99 | { |
91 | //qDebug( "oDebugBackend: Level=%d, Area=%d, Data=%s", level, area, data ); | 100 | //qDebug( "oDebugBackend: Level=%d, Area=%d, Data=%s", level, area, data ); |
92 | 101 | ||
93 | // ML: OPIE doesn't use areacodes at the moment. See the KDE debug classes for an | 102 | // ML: OPIE doesn't use areacodes at the moment. See the KDE debug classes for an |
@@ -601,25 +610,25 @@ QString odBacktrace( int levels ) | |||
601 | s += QString::number(i) + | 610 | s += QString::number(i) + |
602 | QString::fromLatin1(": ") + | 611 | QString::fromLatin1(": ") + |
603 | QString::fromLatin1(strings[i]) + QString::fromLatin1("\n"); | 612 | QString::fromLatin1(strings[i]) + QString::fromLatin1("\n"); |
604 | s += "]\n"; | 613 | s += "]\n"; |
605 | free (strings); | 614 | free (strings); |
606 | #endif | 615 | #endif |
607 | return s; | 616 | return s; |
608 | } | 617 | } |
609 | 618 | ||
610 | void odClearDebugConfig() | 619 | void odClearDebugConfig() |
611 | { | 620 | { |
612 | /* | 621 | /* |
613 | delete oDebug_data->config; | 622 | delete oDebug_data->config; |
614 | oDebug_data->config = 0; | 623 | oDebug_data->config = 0; |
615 | */ | 624 | */ |
616 | } | 625 | } |
617 | 626 | ||
618 | 627 | ||
619 | #ifdef OPIE_NO_DEBUG | 628 | #ifdef OPIE_NO_DEBUG |
620 | #define odDebug ondDebug | 629 | #define odDebug ondDebug |
621 | #define odBacktrace ondBacktrace | 630 | #define odBacktrace ondBacktrace |
622 | #endif | 631 | #endif |
623 | 632 | ||
624 | } | 633 | } |
625 | } \ No newline at end of file | 634 | } |