mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-02-10 18:05:16 +08:00
rename class to CMailMessage
This commit is contained in:
@ -107,7 +107,7 @@ HEADERS += \
|
||||
$$PWD/src/ctabundockevent.h \
|
||||
$$PWD/src/ccefeventsgate.h \
|
||||
$$PWD/src/ceditortools.h \
|
||||
$$PWD/src/cemlhandler.h \
|
||||
$$PWD/src/cmailmessage.h \
|
||||
$$PWD/src/cwindowsqueue.h \
|
||||
$$PWD/src/ceventdriver.h \
|
||||
$$PWD/src/cappeventfilter.h \
|
||||
@ -149,7 +149,7 @@ SOURCES += \
|
||||
$$PWD/src/ctabundockevent.cpp \
|
||||
$$PWD/src/ccefeventsgate.cpp \
|
||||
$$PWD/src/ceditortools.cpp \
|
||||
$$PWD/src/cemlhandler.cpp \
|
||||
$$PWD/src/cmailmessage.cpp \
|
||||
$$PWD/src/ceventdriver.cpp \
|
||||
$$PWD/src/cappeventfilter.cpp \
|
||||
$$PWD/src/iconfactory.cpp \
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "cemlhandler.h"
|
||||
#include "cmailmessage.h"
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
@ -83,12 +83,12 @@ static bool writeFile(const std::string &filePath, const std::string &data)
|
||||
return false;
|
||||
}
|
||||
|
||||
class CEmlHandler::CEmlHandlerPrivate
|
||||
class CMailMessage::CMailMessagePrivate
|
||||
{
|
||||
public:
|
||||
CEmlHandlerPrivate()
|
||||
CMailMessagePrivate()
|
||||
{}
|
||||
~CEmlHandlerPrivate()
|
||||
~CMailMessagePrivate()
|
||||
{
|
||||
while (!eml_paths.empty()) {
|
||||
std::remove(eml_paths.top().c_str());
|
||||
@ -99,22 +99,22 @@ public:
|
||||
std::stack<std::string> eml_paths;
|
||||
};
|
||||
|
||||
CEmlHandler::CEmlHandler() :
|
||||
pimpl(new CEmlHandlerPrivate)
|
||||
CMailMessage::CMailMessage() :
|
||||
pimpl(new CMailMessagePrivate)
|
||||
{}
|
||||
|
||||
CEmlHandler::~CEmlHandler()
|
||||
CMailMessage::~CMailMessage()
|
||||
{
|
||||
delete pimpl, pimpl = nullptr;
|
||||
}
|
||||
|
||||
CEmlHandler &CEmlHandler::instance()
|
||||
CMailMessage &CMailMessage::instance()
|
||||
{
|
||||
static CEmlHandler inst;
|
||||
static CMailMessage inst;
|
||||
return inst;
|
||||
}
|
||||
|
||||
void CEmlHandler::openEML(const std::string &from, const std::string &to, const std::string &subject, const std::string &msg)
|
||||
void CMailMessage::openEML(const std::string &from, const std::string &to, const std::string &subject, const std::string &msg)
|
||||
{
|
||||
std::ostringstream data;
|
||||
data << "From: " << from << "\n"
|
||||
@ -145,7 +145,7 @@ void CEmlHandler::openEML(const std::string &from, const std::string &to, const
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
bool CEmlHandler::sendMapiMail(std::string to, std::string name, std::string subject, std::string msg)
|
||||
bool CMailMessage::sendMapiMail(std::string to, std::string name, std::string subject, std::string msg)
|
||||
{
|
||||
if (HMODULE lib = LoadLibrary(L"mapi32.dll")) {
|
||||
ULONG (WINAPI *_MAPISendMail)(LHANDLE, ULONG_PTR, MapiMessage*, FLAGS, ULONG);
|
||||
@ -30,18 +30,18 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CEMLHANDLER_H
|
||||
#define CEMLHANDLER_H
|
||||
#ifndef CMAILMESSAGE_H
|
||||
#define CMAILMESSAGE_H
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
class CEmlHandler
|
||||
class CMailMessage
|
||||
{
|
||||
public:
|
||||
CEmlHandler(const CEmlHandler&) = delete;
|
||||
CEmlHandler& operator=(const CEmlHandler&) = delete;
|
||||
static CEmlHandler& instance();
|
||||
CMailMessage(const CMailMessage&) = delete;
|
||||
CMailMessage& operator=(const CMailMessage&) = delete;
|
||||
static CMailMessage& instance();
|
||||
|
||||
void openEML(const std::string &from, const std::string &to, const std::string &subject, const std::string &msg);
|
||||
#ifdef _WIN32
|
||||
@ -49,11 +49,11 @@ public:
|
||||
#endif
|
||||
|
||||
private:
|
||||
CEmlHandler();
|
||||
~CEmlHandler();
|
||||
CMailMessage();
|
||||
~CMailMessage();
|
||||
|
||||
class CEmlHandlerPrivate;
|
||||
CEmlHandlerPrivate *pimpl = nullptr;
|
||||
class CMailMessagePrivate;
|
||||
CMailMessagePrivate *pimpl = nullptr;
|
||||
};
|
||||
|
||||
#endif // CEMLHANDLER_H
|
||||
#endif // CMAILMESSAGE_H
|
||||
Reference in New Issue
Block a user