-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from xxanxnie/Fix/routernoresponse
Format coding style and fix no reponse bugs
- Loading branch information
Showing
5 changed files
with
431 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
// Copyright 2024 COMSW4156-Git-Gud | ||
#pragma once | ||
|
||
#include "DatabaseManager.h" | ||
#include <map> | ||
#include <string> | ||
#include <vector> | ||
|
||
#include "DatabaseManager.h" | ||
|
||
class SubscriptionManager { | ||
public: | ||
SubscriptionManager(DatabaseManager& dbManager); | ||
virtual std::string addSubscriber(const std::map<std::string, std::string>& subscriberDetails); | ||
virtual std::string deleteSubscriber(const std::string& id); | ||
virtual std::map<std::string, std::string> getSubscribers(const std::string& resource, const std::string& city); | ||
virtual void notifySubscribers(const std::string& resource, const std::string& city); | ||
public: | ||
SubscriptionManager(DatabaseManager& dbManager); | ||
virtual std::string addSubscriber( | ||
const std::map<std::string, std::string>& subscriberDetails); | ||
virtual std::string deleteSubscriber(const std::string& id); | ||
virtual std::map<std::string, std::string> getSubscribers( | ||
const std::string& resource, const std::string& city); | ||
virtual void notifySubscribers(const std::string& resource, | ||
const std::string& city); | ||
|
||
private: | ||
DatabaseManager& dbManager; | ||
private: | ||
DatabaseManager& dbManager; | ||
|
||
void sendEmail(const std::string& to, const std::string& subject, const std::string& content); | ||
void sendWebhook(const std::string& url, const std::string& payload); | ||
void sendEmail(const std::string& to, const std::string& subject, | ||
const std::string& content); | ||
void sendWebhook(const std::string& url, const std::string& payload); | ||
}; |
Oops, something went wrong.