servlib/storage/SQLRegistrationStore.cc
changeset 0 2b3e5ec03512
equal deleted inserted replaced
-1:000000000000 0:2b3e5ec03512
       
     1 /*
       
     2  *    Copyright 2004-2006 Intel Corporation
       
     3  * 
       
     4  *    Licensed under the Apache License, Version 2.0 (the "License");
       
     5  *    you may not use this file except in compliance with the License.
       
     6  *    You may obtain a copy of the License at
       
     7  * 
       
     8  *        http://www.apache.org/licenses/LICENSE-2.0
       
     9  * 
       
    10  *    Unless required by applicable law or agreed to in writing, software
       
    11  *    distributed under the License is distributed on an "AS IS" BASIS,
       
    12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    13  *    See the License for the specific language governing permissions and
       
    14  *    limitations under the License.
       
    15  */
       
    16 
       
    17 #ifdef HAVE_CONFIG_H
       
    18 #  include <dtn-config.h>
       
    19 #endif
       
    20 
       
    21 #if SQL_ENABLED
       
    22 
       
    23 #include "SQLRegistrationStore.h"
       
    24 #include "SQLStore.h"
       
    25 
       
    26 namespace dtn {
       
    27 
       
    28 /**
       
    29  * Constructor
       
    30  */
       
    31 SQLRegistrationStore::SQLRegistrationStore(oasys::SQLImplementation* impl,
       
    32                                            const char* table_name)
       
    33 {
       
    34     store_ = new SQLStore(table_name, impl);
       
    35 }
       
    36 
       
    37 /**
       
    38  * Destructor
       
    39  */
       
    40 SQLRegistrationStore::~SQLRegistrationStore()
       
    41 {
       
    42     NOTREACHED;
       
    43 }
       
    44 
       
    45 /**
       
    46  * Load in the whole database of registrations, populating the
       
    47  * given list.
       
    48  */
       
    49 void
       
    50 SQLRegistrationStore::load(RegistrationList* reg_list)
       
    51 {
       
    52     // NOTIMPLEMENTED
       
    53 }
       
    54 
       
    55 /**
       
    56  * Add a new registration to the database. Returns true if the
       
    57  * registration is successfully added, false on error.
       
    58  */
       
    59 bool
       
    60 SQLRegistrationStore::add(Registration* reg)
       
    61 {
       
    62     //NOTIMPLEMENTED;
       
    63     return true;
       
    64 }
       
    65 
       
    66 /**
       
    67  * Remove the registration from the database, returns true if
       
    68  * successful, false on error.
       
    69  */
       
    70 bool
       
    71 SQLRegistrationStore::del(Registration* reg)
       
    72 {
       
    73     NOTIMPLEMENTED;
       
    74 }
       
    75     
       
    76 /**
       
    77  * Update the registration in the database. Returns true on
       
    78  * success, false if there's no matching registration or on error.
       
    79  */
       
    80 bool
       
    81 SQLRegistrationStore::update(Registration* reg)
       
    82 {
       
    83     NOTIMPLEMENTED;
       
    84 }
       
    85 
       
    86 } // namespace dtn
       
    87 
       
    88 #endif /* SQL_ENABLED */