00001 /* 00002 * Copyright 2004-2006 Intel Corporation 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef _SQL_REGISTRATION_STORE_H_ 00018 #define _SQL_REGISTRATION_STORE_H_ 00019 00020 #include "RegistrationStore.h" 00021 00022 namespace oasys { 00023 class SQLImplementation; 00024 } 00025 00026 namespace dtn { 00027 00028 class SQLStore; 00029 00033 class SQLRegistrationStore : public RegistrationStore { 00034 public: 00038 SQLRegistrationStore(oasys::SQLImplementation* impl, 00039 const char* table_name = "registration"); 00040 00044 virtual ~SQLRegistrationStore(); 00045 00050 virtual void load(RegistrationList* reg_list); 00051 00056 virtual bool add(Registration* reg); 00057 00062 virtual bool del(Registration* reg); 00063 00068 virtual bool update(Registration* reg); 00069 00070 protected: 00071 SQLStore* store_; 00072 }; 00073 } // namespace dtn 00074 00075 #endif /* _SQL_REGISTRATION_STORE_H_ */