Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions UI/mapiui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,6 @@

namespace ui::mapiui
{
void initCallbacks()
{
mapi::GetCopyDetails = [](auto _1, auto _2, auto _3, auto _4, auto _5) -> mapi::CopyDetails {
return GetCopyDetails(_1, _2, _3, _4, _5);
};
error::displayError = [](auto _1) { displayError(_1); };
mapi::mapiui::getMAPIProgress = [](auto _1, auto _2) -> LPMAPIPROGRESS { return ui::GetMAPIProgress(_1, _2); };
output::outputToDbgView = [](auto _1) { OutputToDbgView(_1); };
mapi::store::promptServerName = []() { return PromptServerName(); };
mapi::onNotifyCallback = [](auto _1, auto _2, auto _3, auto _4) { mapi::mapiui::OnNotify(_1, _2, _3, _4); };
output::initStubCallbacks();
}

// Takes a tag array (and optional MAPIProp) and displays UI prompting to build an exclusion array
// Must be freed with MAPIFreeBuffer
LPSPropTagArray GetExcludedTags(_In_opt_ LPSPropTagArray lpTagArray, _In_opt_ LPMAPIPROP lpProp, bool bIsAB)
Expand Down Expand Up @@ -555,4 +542,17 @@ namespace ui::mapiui

return std::wstring{};
};

void initCallbacks()
{
mapi::GetCopyDetails = [](auto _1, auto _2, auto _3, auto _4, auto _5) -> mapi::CopyDetails {
return GetCopyDetails(_1, _2, _3, _4, _5);
};
error::displayError = [](auto _1) { displayError(_1); };
mapi::mapiui::getMAPIProgress = [](auto _1, auto _2) -> LPMAPIPROGRESS { return ui::GetMAPIProgress(_1, _2); };
output::outputToDbgView = [](auto _1) { OutputToDbgView(_1); };
mapi::store::promptServerName = []() { return PromptServerName(); };
mapi::onNotifyCallback = [](auto _1, auto _2, auto _3, auto _4) { mapi::mapiui::OnNotify(_1, _2, _3, _4); };
output::initStubCallbacks();
}
} // namespace ui::mapiui
5 changes: 4 additions & 1 deletion UnitTest/tests/smartViewTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
namespace SmartViewTest
{
#define TEST(PARSERTYPE, NAME, NUM) \
TEST_METHOD(PARSERTYPE##_##NUM) { test(parserType::PARSERTYPE, IDR_SV##NAME##NUM##IN, IDR_SV##NAME##NUM##OUT); }
TEST_METHOD(PARSERTYPE##_##NUM) \
{ \
test(parserType::PARSERTYPE, IDR_SV##NAME##NUM##IN, IDR_SV##NAME##NUM##OUT); \
}

TEST_CLASS(SmartViewTest)
{
Expand Down