Savarese Software Research Corporation
GroupSessionOptions.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2006-2009 Savarese Software Research 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  *     https://www.savarese.com/software/ApacheLicense-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 
00022 #ifndef __SSRC_WSPR_GROUP_SESSION_OPTIONS_H
00023 #define __SSRC_WSPR_GROUP_SESSION_OPTIONS_H
00024 
00025 #include <ssrc/wispers/utility/ServiceMainOptions.h>
00026 #include <ssrc/wispers/utility/Properties.h>
00027 
00028 __BEGIN_NS_SSRC_WSPR_GROUP_SESSION
00029 
00030 struct GroupSessionInitializer {
00031   // In seconds.
00032   unsigned int gs_poll_interval;
00033   unsigned int partition_id;
00034   unsigned int num_partitions;
00035   unsigned int ids_per_expiration_message;
00036   std::string db_file;
00037   std::string gs_name;
00038   NS_SSRC_WSPR_UTILITY::Properties properties;
00039 
00040   GroupSessionInitializer() :
00041     gs_poll_interval(300), partition_id(0), num_partitions(1),
00042     ids_per_expiration_message(2000), db_file(), properties()
00043   { }
00044 };
00045 
00046 class GroupSessionOptions : public NS_SSRC_WSPR_UTILITY::ServiceMainOptions {
00047   typedef ServiceMainOptions super;
00048 
00049   boost::program_options::options_description _group_session_description;
00050 
00051 public:
00052   GroupSessionInitializer initializer;
00053 
00054   GroupSessionOptions();
00055 
00056   virtual ~GroupSessionOptions() { }
00057 
00058   virtual void notify(boost::program_options::variables_map & vm);
00059 };
00060 
00061 __END_NS_SSRC_WSPR_GROUP_SESSION
00062 
00063 #endif

Savarese Software Research Corporation
Copyright © 2006-2011 Savarese Software Research Corporation. All rights reserved.