giqclog.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 <cxstring.h>
00033
00034 #include "giqclog.h"
00035
00036
00045 GiPaf *
00046 giraffe_qclog_open(cxsize id)
00047 {
00048
00049 cx_string *name = cx_string_new();
00050
00051 cpl_propertylist *properties = NULL;
00052
00053 GiPaf *self = NULL;
00054
00055
00056 cx_string_sprintf(name, "qc%04" CX_PRINTF_FORMAT_SIZE_TYPE ".paf", id);
00057
00058 self = giraffe_paf_new(cx_string_get(name), "QC1 parameters", NULL, NULL);
00059
00060 cx_string_delete(name);
00061 name = NULL;
00062
00063 properties = giraffe_paf_get_properties(self);
00064 cpl_propertylist_append_string(properties, "QC.DID", QC_DID);
00065 cpl_propertylist_set_comment(properties,"QC.DID", "QC1 dictionary");
00066
00067 return self;
00068
00069 }
00070
00071
00072 cxint
00073 giraffe_qclog_close(GiPaf *qclog)
00074 {
00075
00076 if (qclog != NULL) {
00077
00078 cxint status = 0;
00079
00080 status = giraffe_paf_write(qclog);
00081 giraffe_paf_delete(qclog);
00082
00083 if (status != 0) {
00084 return 1;
00085 }
00086
00087 }
00088
00089 return 0;
00090
00091 }