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
00029
00030
00031
00032
00033
00034
00035
#ifndef DBSTORE_H
00036
#define DBSTORE_H
00037
00038
00039
#include "osconfig.h"
00040
00041
#define INCLUDE_CSTDLIB
00042
#define INCLUDE_CSTDIO
00043
#define INCLUDE_CERRNO
00044
#define INCLUDE_CTIME
00045
#include "ofstdinc.h"
00046
00047 BEGIN_EXTERN_C
00048
#ifdef HAVE_SYS_TYPES_H
00049
#include <sys/types.h>
00050
#endif
00051
#ifdef HAVE_SYS_FILE_H
00052
#include <sys/file.h>
00053
#endif
00054
#ifdef HAVE_SYS_TIME_H
00055
#include <sys/time.h>
00056
#endif
00057
#ifdef HAVE_SYS_STAT_H
00058
#include <sys/stat.h>
00059
#endif
00060
#ifdef HAVE_FCNTL_H
00061
#include <fcntl.h>
00062
#endif
00063
END_EXTERN_C
00064
00065
#include "dcompat.h"
00066
#include "imagedb.h"
00067
#include "dbpriv.h"
00068
#include "dcfilefo.h"
00069
#include "dimse.h"
00070
00071
00075
OFCondition DB_deleteImageFile(
char* imgFile);
00076
00080
extern int
00081 DB_DeleteOldestStudy(DB_Private_Handle *phandle, StudyDescRecord *pStudyDesc);
00082
00086
OFCondition
00087 DB_DeleteOldestImages(DB_Private_Handle *phandle, StudyDescRecord *pStudyDesc,
int StudyNum,
char *StudyUID,
long RequiredSize);
00088
00092
extern int
00093 DB_MatchStudyUIDInStudyDesc (StudyDescRecord *pStudyDesc,
char *StudyUID,
int maxStudiesAllowed);
00094
00098
OFCondition
00099 DB_CheckupinStudyDesc(DB_Private_Handle *phandle, StudyDescRecord *pStudyDesc,
char *StudyUID,
long imageSize);
00100
00101
00106
OFCondition DB_removeDuplicateImage(DB_Private_Handle *phandle,
00107
const char *SOPInstanceUID,
const char *StudyInstanceUID,
00108 StudyDescRecord *pStudyDesc,
const char *newImageFileName);
00109
00110
00114
OFCondition
00115 DB_storeRequest (
00116 DB_Handle *handle,
00117
const char *SOPClassUID,
00118
const char * ,
00119
const char *imageFileName,
00120 DB_Status *status,
00121 OFBool isNew);
00122
00123
00127
OFCondition DB_pruneInvalidRecords(DB_Handle *dbHandle);
00128
#endif
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167