diff -r 000000000000 -r 2b3e5ec03512 servlib/storage/SQLRegistrationStore.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/servlib/storage/SQLRegistrationStore.cc Thu Apr 21 14:57:45 2011 +0100 @@ -0,0 +1,88 @@ +/* + * Copyright 2004-2006 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if SQL_ENABLED + +#include "SQLRegistrationStore.h" +#include "SQLStore.h" + +namespace dtn { + +/** + * Constructor + */ +SQLRegistrationStore::SQLRegistrationStore(oasys::SQLImplementation* impl, + const char* table_name) +{ + store_ = new SQLStore(table_name, impl); +} + +/** + * Destructor + */ +SQLRegistrationStore::~SQLRegistrationStore() +{ + NOTREACHED; +} + +/** + * Load in the whole database of registrations, populating the + * given list. + */ +void +SQLRegistrationStore::load(RegistrationList* reg_list) +{ + // NOTIMPLEMENTED +} + +/** + * Add a new registration to the database. Returns true if the + * registration is successfully added, false on error. + */ +bool +SQLRegistrationStore::add(Registration* reg) +{ + //NOTIMPLEMENTED; + return true; +} + +/** + * Remove the registration from the database, returns true if + * successful, false on error. + */ +bool +SQLRegistrationStore::del(Registration* reg) +{ + NOTIMPLEMENTED; +} + +/** + * Update the registration in the database. Returns true on + * success, false if there's no matching registration or on error. + */ +bool +SQLRegistrationStore::update(Registration* reg) +{ + NOTIMPLEMENTED; +} + +} // namespace dtn + +#endif /* SQL_ENABLED */