Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

gtask-error-packet.h

Go to the documentation of this file.
00001 #ifndef GTASK_ERROR_PACKET_H
00002 #define GTASK_ERROR_PACKET_H
00003 
00004 #include <gtask/gtask-packet.h>
00005 
00008 /* @{ */
00009 
00010 typedef struct _GTaskErrorPacket        GTaskErrorPacket;
00011 typedef struct _GTaskErrorPacketPrivate GTaskErrorPacketPrivate;
00012 typedef struct _GTaskErrorPacketClass   GTaskErrorPacketClass;
00013 
00014 
00016 #define GTASK_ERROR_PACKET_TYPE            (gtask_error_packet_get_type())
00017 
00019 #define GTASK_ERROR_PACKET(obj)            (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
00020                                             GTASK_ERROR_PACKET_TYPE, \
00021                                             GTaskErrorPacket ))
00022 
00024 #define GTASK_ERROR_PACKET_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST( (klass), \
00025                                             GTASK_ERROR_PACKET_TYPE, \
00026                                             GTaskErrorPacketClass ))
00027 
00032 #define GTASK_IS_ERROR_PACKET(obj)         (G_TYPE_CHECK_INSTANCE_TYPE( (obj), \
00033                                             GTASK_ERROR_PACKET_TYPE ))
00034 
00039 #define GTASK_IS_ERROR_PACKET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE( (klass), \
00040                                             GTASK_ERROR_PACKET_TYPE ))
00041 
00042 #define GTASK_ERROR_PACKET_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS( (obj), \
00043                                             GTASK_ERROR_PACKET_TYPE, \
00044                                             GTaskErrorPacketClass ))
00045 
00046 typedef enum {
00047     GTASK_ERROR_NONE,
00048     GTASK_ERROR_UNDEFINED
00049 } GTaskErrorType;
00050 
00051 struct _GTaskErrorPacket {
00052     GTaskPacket              parent;
00053     GTaskErrorPacketPrivate *private;
00054 };
00055 
00056 struct _GTaskErrorPacketPrivate {
00057     GTaskErrorType  error;
00058     GString        *error_msg;
00059 };
00060 
00061 struct _GTaskErrorPacketClass {
00062     GTaskPacketClass parent;
00063 };
00064 
00065 GType gtask_error_packet_get_type( void );
00066 
00067 GTaskErrorPacket *
00068 gtask_error_packet_new( void );
00069 
00070 GTaskErrorType
00071 gtask_error_packet_get_error_type( GTaskErrorPacket *packet );
00072 
00073 void
00074 gtask_error_packet_set_error_type( GTaskErrorPacket *packet,
00075                                    GTaskErrorType error );
00076 
00077 const char *
00078 gtask_error_packet_get_error_message( GTaskErrorPacket *packet );
00079 
00080 void
00081 gtask_error_packet_set_error_message( GTaskErrorPacket *packet,
00082                                       const char *error_msg );
00083 
00084 /* @} */
00085 
00086 #endif

Generated on Mon Feb 2 21:26:14 2004 for libgtask by doxygen 1.3.4