forked from firstblade/TTWinClient
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMessageModule_Impl.cpp
More file actions
65 lines (50 loc) · 1.62 KB
/
MessageModule_Impl.cpp
File metadata and controls
65 lines (50 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*******************************************************************************
* @file HistoryMsgModule_Impl.cpp 2014\8\3 11:14:33 $
* @author ¿ìµ¶<kuaidao@mogujie.com>
* @brief
******************************************************************************/
#include "stdafx.h"
#include "MessageModule_Impl.h"
#include "utility/CppSQLite3.h"
#include "utility/utilStrCodeAPI.h"
#include "Modules/IMiscModule.h"
#include "ReceiveMsgManage.h"
#include "SendMsgManage.h"
/******************************************************************************/
namespace module
{
IMessageModule* getMessageModule()
{
return (IMessageModule*)logic::GetLogic()->getModule(MODULE_ID_MESSAGE);
}
}
// -----------------------------------------------------------------------------
// HistoryMsgModule_Impl: Public, Constructor
MessageModule_Impl::MessageModule_Impl()
:m_pHistoryMSGDB(new CppSQLite3DB())
{
}
// -----------------------------------------------------------------------------
// HistoryMsgModule_Impl: Public, Destructor
MessageModule_Impl::~MessageModule_Impl()
{
delete m_pHistoryMSGDB;
}
void MessageModule_Impl::release()
{
delete this;
}
logic::LogicErrorCode MessageModule_Impl::onUnLoadModule()
{
_closeDB();
return logic::LOGIC_OK;
}
void MessageModule_Impl::removeMessageBySId(const std::string& sId)
{
ReceiveMsgManage::getInstance()->removeMessageBySId(sId);
}
BOOL MessageModule_Impl::pushMessageBySId(const std::string& sId, MessageEntity& msg)
{
return ReceiveMsgManage::getInstance()->pushMessageBySId(sId, msg);
}
/******************************************************************************/