Skip to content

Commit

Permalink
Remove MMatchDBMgr
Browse files Browse the repository at this point in the history
  • Loading branch information
Asunaya committed Aug 5, 2016
1 parent e068fc1 commit d21e5a6
Show file tree
Hide file tree
Showing 21 changed files with 80 additions and 3,637 deletions.
2 changes: 0 additions & 2 deletions CSCommon/CSCommon.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@
<ClInclude Include="Include\MMatchObjCache.h" />
<ClInclude Include="Include\MMatchObject.h" />
<ClInclude Include="Include\MMatchDBFilter.h" />
<ClInclude Include="Include\MMatchDBMgr.h" />
<ClInclude Include="Include\MMatchAdmin.h" />
<ClInclude Include="Include\MMatchChannel.h" />
<ClInclude Include="Include\MMatchChatRoom.h" />
Expand Down Expand Up @@ -454,7 +453,6 @@
<ClCompile Include="Source\MMatchObjCache.cpp" />
<ClCompile Include="Source\MMatchObject.cpp" />
<ClCompile Include="Source\MMatchDBFilter.cpp" />
<ClCompile Include="Source\MMatchDBMgr.cpp" />
<ClCompile Include="Source\MMatchAdmin.cpp" />
<ClCompile Include="Source\MMatchChannel.cpp" />
<ClCompile Include="Source\MMatchChatRoom.cpp" />
Expand Down
6 changes: 0 additions & 6 deletions CSCommon/CSCommon.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,6 @@
<ClInclude Include="Include\MMatchDBFilter.h">
<Filter>MatchServer\DB</Filter>
</ClInclude>
<ClInclude Include="Include\MMatchDBMgr.h">
<Filter>MatchServer\DB</Filter>
</ClInclude>
<ClInclude Include="Include\MMatchAdmin.h">
<Filter>MatchServer\Server</Filter>
</ClInclude>
Expand Down Expand Up @@ -689,9 +686,6 @@
<ClCompile Include="Source\MMatchDBFilter.cpp">
<Filter>MatchServer\DB</Filter>
</ClCompile>
<ClCompile Include="Source\MMatchDBMgr.cpp">
<Filter>MatchServer\DB</Filter>
</ClCompile>
<ClCompile Include="Source\MMatchAdmin.cpp">
<Filter>MatchServer\Server</Filter>
</ClCompile>
Expand Down
10 changes: 9 additions & 1 deletion CSCommon/Include/IDatabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ enum class CharMakingType
Delete,
};

enum class ExpelResult
{
OK,
NoSuchMember,
TooLowGrade,
DBError,
};

struct MDB_ClanInfo
{
int nCLID;
Expand Down Expand Up @@ -188,7 +196,7 @@ class IDatabase
virtual bool AddClanMember(int nCLID, int nJoinerCID, int nClanGrade, bool* boutRet) = 0;
virtual bool RemoveClanMember(int nCLID, int nLeaverCID) = 0;
virtual bool UpdateClanGrade(int nCLID, int nMemberCID, int nClanGrade) = 0;
virtual bool ExpelClanMember(int nCLID, int nAdminGrade, char* szMember, int* noutRet) = 0;
virtual ExpelResult ExpelClanMember(int nCLID, int nAdminGrade, const char* szMember) = 0;
virtual bool GetClanInfo(int nCLID, MDB_ClanInfo* poutClanInfo) = 0;
virtual bool UpdateCharClanContPoint(int nCID, int nCLID, int nAddedContPoint) = 0;

Expand Down
6 changes: 3 additions & 3 deletions CSCommon/Include/MAsyncDBJob.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,17 +312,17 @@ class MAsyncDBJob_ExpelClanMember : public MAsyncJob {
char m_szTarMember[256];

protected: // Output Result
int m_nDBResult;
ExpelResult DBResult;
public:
MAsyncDBJob_ExpelClanMember() : MAsyncJob(MASYNCJOB_EXPELCLANMEMBER), m_nDBResult(0)
MAsyncDBJob_ExpelClanMember() : MAsyncJob(MASYNCJOB_EXPELCLANMEMBER), DBResult(ExpelResult::OK)
{

}
virtual ~MAsyncDBJob_ExpelClanMember() {}
bool Input(const MUID& uidAdmin, int nCLID, int nClanGrade, const char* szTarMember);
virtual void Run(void* pContext);

int GetDBResult() { return m_nDBResult; }
auto GetDBResult() { return DBResult; }
const MUID& GetAdminUID() { return m_uidAdmin; }
const char* GetTarMember() { return m_szTarMember; }
};
Expand Down
5 changes: 2 additions & 3 deletions CSCommon/Include/MAsyncProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class MAsyncJobList final : private std::deque<MAsyncJob*> {

#define MAX_THREADPOOL_COUNT 10

class MAsyncProxy {
class MAsyncProxy final {
protected:
HANDLE m_hEventShutdown;
HANDLE m_hEventFetchJob;
Expand All @@ -106,7 +106,6 @@ class MAsyncProxy {

public:
MAsyncProxy();
virtual ~MAsyncProxy();
bool Create(int nThreadCount);
void Destroy();

Expand All @@ -118,7 +117,7 @@ class MAsyncProxy {
void PostJob(T&& fn)
{
std::lock_guard<std::mutex> lock(GenericJobMutex);
GenericJobs.push_back(std::forward<T>(fn));
GenericJobs.emplace_back(std::forward<T>(fn));
}
MAsyncJob* GetJobResult() {
MAsyncJob* pJob = NULL;
Expand Down
288 changes: 0 additions & 288 deletions CSCommon/Include/MMatchDBMgr.h

This file was deleted.

Loading

0 comments on commit d21e5a6

Please sign in to comment.