giresponse.c
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifdef HAVE_CONFIG_H
00029 # include <config.h>
00030 #endif
00031
00032 #include <cxmemory.h>
00033
00034 #include "giresponse.h"
00035
00036
00043 GiResponse*
00044 giraffe_response_new(void)
00045 {
00046
00047 GiResponse* self = cx_calloc(1, sizeof *self);
00048
00049 if (self != NULL) {
00050 self->response = NULL;
00051 self->efficiency = NULL;
00052 }
00053
00054 return self;
00055
00056 }
00057
00058
00059 void
00060 giraffe_response_delete(GiResponse* self)
00061 {
00062
00063 if (self != NULL) {
00064 if (self->response != NULL) {
00065 giraffe_image_delete(self->response);
00066 self->response = NULL;
00067 }
00068
00069 if (self->efficiency != NULL) {
00070 giraffe_table_delete(self->efficiency);
00071 self->efficiency = NULL;
00072 }
00073
00074 cx_free(self);
00075
00076 }
00077
00078 return;
00079
00080 }
00081