Page MenuHomePhabricator

D5065.diff
No OneTemporary

D5065.diff

diff --git a/services/tunnelbroker/src/Tools/ConfigManager.h b/services/tunnelbroker/src/Tools/ConfigManager.h
--- a/services/tunnelbroker/src/Tools/ConfigManager.h
+++ b/services/tunnelbroker/src/Tools/ConfigManager.h
@@ -22,6 +22,10 @@
static const std::string OPTION_DYNAMODB_SESSIONS_VERIFICATION_TABLE;
static const std::string OPTION_DYNAMODB_SESSIONS_PUBLIC_KEY_TABLE;
static const std::string OPTION_DYNAMODB_MESSAGES_TABLE;
+ static const std::string OPTION_NOTIFS_APNS_P12_CERT_PATH;
+ static const std::string OPTION_NOTIFS_APNS_P12_CERT_PASSWORD;
+ static const std::string OPTION_NOTIFS_APNS_TOPIC;
+ static const std::string OPTION_NOTIFS_FCM_SERVER_KEY;
static ConfigManager &getInstance();
void load();
diff --git a/services/tunnelbroker/src/Tools/ConfigManager.cpp b/services/tunnelbroker/src/Tools/ConfigManager.cpp
--- a/services/tunnelbroker/src/Tools/ConfigManager.cpp
+++ b/services/tunnelbroker/src/Tools/ConfigManager.cpp
@@ -23,6 +23,14 @@
"dynamodb.sessions_public_key_table_name";
const std::string ConfigManager::OPTION_DYNAMODB_MESSAGES_TABLE =
"dynamodb.messages_table_name";
+const std::string ConfigManager::OPTION_NOTIFS_APNS_P12_CERT_PATH =
+ "notifications.apns_cert_path";
+const std::string ConfigManager::OPTION_NOTIFS_APNS_P12_CERT_PASSWORD =
+ "notifications.apns_cert_password";
+const std::string ConfigManager::OPTION_NOTIFS_APNS_TOPIC =
+ "notifications.apns_topic";
+const std::string ConfigManager::OPTION_NOTIFS_FCM_SERVER_KEY =
+ "notifications.fcm_server_key";
ConfigManager &ConfigManager::getInstance() {
static ConfigManager instance;
@@ -92,6 +100,23 @@
MESSAGES_TABLE_NAME),
"DynamoDB table name for messages");
+ description.add_options()(
+ this->OPTION_NOTIFS_APNS_P12_CERT_PATH.c_str(),
+ boost::program_options::value<std::string>()->required(),
+ "P12 certificate path for iOS notifications");
+ description.add_options()(
+ this->OPTION_NOTIFS_APNS_P12_CERT_PASSWORD.c_str(),
+ boost::program_options::value<std::string>()->required(),
+ "P12 certificate password for iOS notifications");
+ description.add_options()(
+ this->OPTION_NOTIFS_APNS_TOPIC.c_str(),
+ boost::program_options::value<std::string>()->required(),
+ "APNs messages topic for iOS notifications");
+ description.add_options()(
+ this->OPTION_NOTIFS_FCM_SERVER_KEY.c_str(),
+ boost::program_options::value<std::string>()->required(),
+ "Firebase Cloud Messaging server key for Android notifications");
+
boost::program_options::parsed_options parsedDescription =
boost::program_options::parse_config_file(
fileStream, description, true);

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 7, 3:07 AM (16 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2252270
Default Alt Text
D5065.diff (2 KB)

Event Timeline