00001
00002
00003 #ifndef _GSTMM_ERROR_H
00004 #define _GSTMM_ERROR_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010 namespace Gst
00011 {
00012
00013 class CoreError : public Glib::Error
00014 {
00015 public:
00016 enum Code
00017 {
00018 FAILED = 1,
00019 TOO_LAZY,
00020 NOT_IMPLEMENTED,
00021 STATE_CHANGE,
00022 PAD,
00023 THREAD,
00024 NEGOTIATION,
00025 EVENT,
00026 SEEK,
00027 CAPS,
00028 TAG,
00029 MISSING_PLUGIN,
00030 CLOCK,
00031 DISABLED,
00032 NUM_ERRORS
00033 };
00034
00035 CoreError(Code error_code, const Glib::ustring& error_message);
00036 explicit CoreError(GError* gobject);
00037 Code code() const;
00038
00039 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00040 private:
00041
00042 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00043 static void throw_func(GError* gobject);
00044 #else
00045
00046 static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
00047 #endif //GLIBMM_EXCEPTIONS_ENABLED
00048
00049 friend void wrap_init();
00050 #endif
00051 };
00052
00053
00054 class LibraryError : public Glib::Error
00055 {
00056 public:
00057 enum Code
00058 {
00059 FAILED = 1,
00060 TOO_LAZY,
00061 INIT,
00062 SHUTDOWN,
00063 SETTINGS,
00064 ENCODE,
00065 NUM_ERRORS
00066 };
00067
00068 LibraryError(Code error_code, const Glib::ustring& error_message);
00069 explicit LibraryError(GError* gobject);
00070 Code code() const;
00071
00072 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00073 private:
00074
00075 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00076 static void throw_func(GError* gobject);
00077 #else
00078
00079 static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
00080 #endif //GLIBMM_EXCEPTIONS_ENABLED
00081
00082 friend void wrap_init();
00083 #endif
00084 };
00085
00086
00087 class ResourceError : public Glib::Error
00088 {
00089 public:
00090 enum Code
00091 {
00092 FAILED = 1,
00093 TOO_LAZY,
00094 NOT_FOUND,
00095 BUSY,
00096 OPEN_READ,
00097 OPEN_WRITE,
00098 OPEN_READ_WRITE,
00099 CLOSE,
00100 READ,
00101 WRITE,
00102 SEEK,
00103 SYNC,
00104 SETTINGS,
00105 NO_SPACE_LEFT,
00106 NUM_ERRORS
00107 };
00108
00109 ResourceError(Code error_code, const Glib::ustring& error_message);
00110 explicit ResourceError(GError* gobject);
00111 Code code() const;
00112
00113 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00114 private:
00115
00116 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00117 static void throw_func(GError* gobject);
00118 #else
00119
00120 static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
00121 #endif //GLIBMM_EXCEPTIONS_ENABLED
00122
00123 friend void wrap_init();
00124 #endif
00125 };
00126
00127
00128 class StreamError : public Glib::Error
00129 {
00130 public:
00131 enum Code
00132 {
00133 FAILED = 1,
00134 TOO_LAZY,
00135 NOT_IMPLEMENTED,
00136 TYPE_NOT_FOUND,
00137 WRONG_TYPE,
00138 CODEC_NOT_FOUND,
00139 DECODE,
00140 ENCODE,
00141 DEMUX,
00142 MUX,
00143 FORMAT,
00144 NUM_ERRORS
00145 };
00146
00147 StreamError(Code error_code, const Glib::ustring& error_message);
00148 explicit StreamError(GError* gobject);
00149 Code code() const;
00150
00151 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00152 private:
00153
00154 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00155 static void throw_func(GError* gobject);
00156 #else
00157
00158 static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
00159 #endif //GLIBMM_EXCEPTIONS_ENABLED
00160
00161 friend void wrap_init();
00162 #endif
00163 };
00164
00165
00166 }
00167
00168
00169 #endif
00170