last ...
This commit is contained in:
@@ -36,7 +36,6 @@ public:
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
XSCAlert() {}
|
||||
XSCAlert(
|
||||
string prefix = "X-Alert", // Alerts Prefixe
|
||||
bool enableAlerts = true, // Enable Alerts
|
||||
@@ -1360,4 +1359,217 @@ private:
|
||||
//
|
||||
return message;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
//
|
||||
// a Base Class by Support Alert ...
|
||||
class XSCBaseAlert : public XSCBase
|
||||
{
|
||||
//
|
||||
// Public ...
|
||||
public:
|
||||
//
|
||||
// Props ...
|
||||
|
||||
//
|
||||
// Constructor(s) ...
|
||||
void XSCBaseAlert()
|
||||
{
|
||||
//
|
||||
// Instance Alert ...
|
||||
mAlert = new XSCAlert();
|
||||
}
|
||||
|
||||
//
|
||||
// Deconstructors ...
|
||||
void ~XSCBaseAlert()
|
||||
{
|
||||
//
|
||||
delete mAlert;
|
||||
}
|
||||
|
||||
//
|
||||
// Alert Handler Functions ...
|
||||
|
||||
//
|
||||
// Alert Functions Getter(s) / Setters(s) ...
|
||||
|
||||
//
|
||||
string GetAlertPrefix()
|
||||
{
|
||||
return mAlert.GetPrefix();
|
||||
}
|
||||
|
||||
//
|
||||
void SetAlertPrefix(string value)
|
||||
{
|
||||
mAlert.SetPrefix(value);
|
||||
}
|
||||
|
||||
//
|
||||
bool GetAlertLogAlerts()
|
||||
{
|
||||
return mAlert.GetLogAlerts();
|
||||
}
|
||||
|
||||
//
|
||||
void SetAlertLogAlerts(bool value)
|
||||
{
|
||||
mAlert.SetLogAlerts(value);
|
||||
}
|
||||
|
||||
//
|
||||
bool GetAlertEnableAlerts()
|
||||
{
|
||||
return mAlert.GetEnableAlerts();
|
||||
}
|
||||
|
||||
//
|
||||
void SetAlertEnableAlerts(bool value)
|
||||
{
|
||||
mAlert.SetEnableAlerts(value);
|
||||
}
|
||||
|
||||
//
|
||||
bool GetAlertPushAlerts()
|
||||
{
|
||||
return mAlert.GetPushAlerts();
|
||||
}
|
||||
|
||||
//
|
||||
void SetAlertPushAlerts(bool value)
|
||||
{
|
||||
mAlert.SetPushAlerts(value);
|
||||
}
|
||||
|
||||
//
|
||||
bool GetAlertMailAlerts()
|
||||
{
|
||||
return mAlert.GetMailAlerts();
|
||||
}
|
||||
|
||||
//
|
||||
void SetAlertMailAlerts(bool value)
|
||||
{
|
||||
mAlert.SetMailAlerts(value);
|
||||
}
|
||||
|
||||
//
|
||||
bool GetAlertTerminalAlerts()
|
||||
{
|
||||
return mAlert.GetTerminalAlerts();
|
||||
}
|
||||
|
||||
//
|
||||
void SetAlertTerminalAlerts(bool value)
|
||||
{
|
||||
mAlert.SetTerminalAlerts(value);
|
||||
}
|
||||
|
||||
//
|
||||
// Alert Actions ...
|
||||
|
||||
//
|
||||
// Logging an Alert ...
|
||||
void LogAlert(string message)
|
||||
{
|
||||
mAlert.LogAlert(message);
|
||||
}
|
||||
|
||||
//
|
||||
// Terminal Alert ...
|
||||
void TerminalAlert(string message)
|
||||
{
|
||||
mAlert.TerminalAlert(message);
|
||||
}
|
||||
|
||||
//
|
||||
// Mail Alert ...
|
||||
void MailAlert(string message)
|
||||
{
|
||||
mAlert.MailAlert(message);
|
||||
}
|
||||
|
||||
//
|
||||
// Send Push Notification ...
|
||||
void PushAlert(string message)
|
||||
{
|
||||
mAlert.PushAlert(message);
|
||||
}
|
||||
|
||||
//
|
||||
// Send an Alert by Handling all Different Specified
|
||||
// type's of Alert's if they are Enabled ...
|
||||
void Alert(string message)
|
||||
{
|
||||
mAlert.Alert(message);
|
||||
}
|
||||
|
||||
//
|
||||
// Logs ...
|
||||
|
||||
//
|
||||
// Log a Message ...
|
||||
void Log(string message)
|
||||
{
|
||||
mAlert.Log(message);
|
||||
}
|
||||
void Log(string tag, string message)
|
||||
{
|
||||
mAlert.Log(tag, message);
|
||||
}
|
||||
void LogEmpty()
|
||||
{
|
||||
mAlert.LogEmpty();
|
||||
}
|
||||
|
||||
//
|
||||
// Log Specific Array ...
|
||||
template <typename T>
|
||||
void LogArray(
|
||||
T &array[], // Array to Log
|
||||
string label = NULL // Array Label
|
||||
)
|
||||
{
|
||||
mAlert.LogArray(array, label);
|
||||
}
|
||||
|
||||
//
|
||||
// Error ...
|
||||
|
||||
//
|
||||
// Log an Error ...
|
||||
void LogError(
|
||||
int error = -1 // Specific Error, if it's equal to -1, use Last Error ...
|
||||
)
|
||||
{
|
||||
mAlert.LogError(error);
|
||||
}
|
||||
|
||||
//
|
||||
// Retrieve Specified Error Code Description ...
|
||||
string GetErrorDescription(int err_code)
|
||||
{
|
||||
return mAlert.GetErrorDescription(err_code);
|
||||
}
|
||||
|
||||
//
|
||||
// Retrieve Specified Error Code Description ...
|
||||
string GetTradeServerReturnCodeDescription(int return_code)
|
||||
{
|
||||
return mAlert.GetTradeServerReturnCodeDescription(return_code);
|
||||
}
|
||||
|
||||
//
|
||||
// Protected ...
|
||||
protected:
|
||||
//
|
||||
// Alert ...
|
||||
XSCAlert *mAlert;
|
||||
|
||||
//
|
||||
// Private ...
|
||||
private:
|
||||
};
|
||||
|
||||
//
|
||||
Reference in New Issue
Block a user