Browse Source

first UI

COM-121
Volker Birk 2 years ago
parent
commit
d88176d92e
6 changed files with 23 additions and 0 deletions
  1. +6
    -0
      pEpCOMServerAdapter.cpp
  2. BIN
      pEpCOMServerAdapter.rc
  3. +5
    -0
      pEpCOMServerAdapter.vcxproj
  4. +11
    -0
      pEpCOMServerAdapter.vcxproj.filters
  5. BIN
      resource.h
  6. +1
    -0
      stdafx.h

+ 6
- 0
pEpCOMServerAdapter.cpp View File

@ -8,6 +8,7 @@
#include "GateKeeper.h"
#include "pEpCOMServerAdapter.h"
#include "LocalJSONAdapter.h"
#include "CMainWindow.h"
using namespace ATL;
using namespace std;
@ -21,6 +22,7 @@ void CpEpCOMServerAdapterModule::gatekeeper(CpEpCOMServerAdapterModule * self)
CpEpCOMServerAdapterModule _AtlModule;
LocalJSONAdapter* ljs = nullptr;
pEp::PassphraseCache cache;
CMainWindow mainWindow;
extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/,
LPTSTR lpCmdLine, int nShowCmd)
@ -35,11 +37,15 @@ extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/
ljs = &LocalJSONAdapter::createInstance();
ljs->startup(pEp::CallbackDispatcher::messageToSend);
pEp::callback_dispatcher.add(JsonAdapter::messageToSend, JsonAdapter::notifyHandshake);
auto mw = mainWindow.Create(HWND_MESSAGE);
assert(mw);
}
auto rv = _AtlModule.WinMain(nShowCmd);
if (ljs) {
BOOL r = true;
mainWindow.OnDestroy(0, 0, 0, r);
pEp::callback_dispatcher.remove(JsonAdapter::messageToSend);
ljs->shutdown_now();
}


BIN
pEpCOMServerAdapter.rc View File


+ 5
- 0
pEpCOMServerAdapter.vcxproj View File

@ -135,6 +135,7 @@ xcopy /y "..\Dependencies\zlib\zlib1.dll" "$(OutDir)"
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CMainWindow.cpp" />
<ClCompile Include="CpEpEngine.cpp" />
<ClCompile Include="GateKeeper.cpp" />
<ClCompile Include="LocalJSONAdapter.cpp" />
@ -164,6 +165,7 @@ xcopy /y "..\Dependencies\zlib\zlib1.dll" "$(OutDir)"
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\pEpJSONServerAdapter\server\adapter-library.hh" />
<ClInclude Include="CMainWindow.h" />
<ClInclude Include="CpEpEngine.h" />
<ClInclude Include="GateKeeper.h" />
<ClInclude Include="LocalJSONAdapter.h" />
@ -206,6 +208,9 @@ xcopy /y "..\Dependencies\zlib\zlib1.dll" "$(OutDir)"
<Library Include="..\Debug\libpEpWebserver.lib" />
<Library Include="..\Debug\pEpJSONServerAdapterLibrary.lib" />
</ItemGroup>
<ItemGroup>
<Image Include="logo.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\boost.1.72.0.0\build\boost.targets" Condition="Exists('..\packages\boost.1.72.0.0\build\boost.targets')" />


+ 11
- 0
pEpCOMServerAdapter.vcxproj.filters View File

@ -46,6 +46,9 @@
<ClCompile Include="LocalJSONAdapter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="CMainWindow.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
@ -84,6 +87,9 @@
<ClInclude Include="..\pEpJSONServerAdapter\server\adapter-library.hh">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CMainWindow.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="pEpCOMServerAdapter.rc">
@ -117,4 +123,9 @@
<Library Include="..\Debug\libpEpWebserver.lib" />
<Library Include="..\Debug\libpEpAdapter.lib" />
</ItemGroup>
<ItemGroup>
<Image Include="logo.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>

BIN
resource.h View File


+ 1
- 0
stdafx.h View File

@ -25,6 +25,7 @@
#include <atlcom.h>
#include <atlctl.h>
#include <atlsafe.h>
#include <atlwin.h>
#include <comutil.h>
#include <comdef.h>


Loading…
Cancel
Save