Page MenuHomePhabricator

D5065.id16495.diff
No OneTemporary

D5065.id16495.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
Sat, Nov 30, 6:13 AM (21 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2599494
Default Alt Text
D5065.id16495.diff (2 KB)

Event Timeline