servlib/storage/DTNStorageConfig.h
changeset 0 2b3e5ec03512
equal deleted inserted replaced
-1:000000000000 0:2b3e5ec03512
       
     1 /*
       
     2  *    Copyright 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 #ifndef _DTNSTORAGECONFIG_H_
       
    18 #define _DTNSTORAGECONFIG_H_
       
    19 
       
    20 #include <oasys/storage/StorageConfig.h>
       
    21 
       
    22 namespace dtn {
       
    23 
       
    24 /**
       
    25  * Subclass of the basic oasys storage config to add dtn-specific
       
    26  * configuration variables.
       
    27  */
       
    28 class DTNStorageConfig : public oasys::StorageConfig {
       
    29 public:
       
    30     DTNStorageConfig(
       
    31         const std::string& cmd,
       
    32         const std::string& type,
       
    33         const std::string& dbname,
       
    34         const std::string& dbdir)
       
    35         : StorageConfig(cmd, type, dbname, dbdir),
       
    36           payload_dir_(""),
       
    37           payload_quota_(0),
       
    38           payload_fd_cache_size_(32)
       
    39     {}
       
    40 
       
    41     /// Directory to store payload files
       
    42     std::string payload_dir_;
       
    43 
       
    44     /// Total quota for the payload storage
       
    45     u_int64_t payload_quota_;
       
    46 
       
    47     /// Number of payload file descriptors to keep open in a cache.
       
    48     u_int payload_fd_cache_size_;
       
    49 };
       
    50 
       
    51 } // namespace dtn
       
    52 
       
    53 #endif /* _DTNSTORAGECONFIG_H_ */