00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _SQL_BUNDLE_STORE_H_
00018 #define _SQL_BUNDLE_STORE_H_
00019
00020 #include <sys/time.h>
00021 #include "BundleStore.h"
00022
00023 namespace dtn {
00024
00025 class SQLImplementation;
00026 class SQLStore;
00027
00033 class SQLBundleStore : public BundleStore {
00034 public:
00041 SQLBundleStore(oasys::SQLImplementation* db, const char* table_name = "bundles");
00042
00046 Bundle* get(int bundle_id) ;
00047 bool insert(Bundle* bundle);
00048 bool update(Bundle* bundle);
00049 bool del(int bundle_id) ;
00050 int delete_expired(const time_t now);
00051 bool is_custodian(int bundle_id);
00052
00053 private:
00054
00058 SQLStore* store_;
00059 };
00060 }
00061
00062 #endif