FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
TestSDLWebview.cpp
1#include <iostream>
2#include <fstream>
3#include <memory>
4
5#include <winpr/config.h>
6#include <winpr/winpr.h>
7
8#include <sdl_webview.hpp>
9
10int TestSDLWebview(WINPR_ATTR_UNUSED int argc, WINPR_ATTR_UNUSED char* argv[])
11{
12#if 0
13 RDP_CLIENT_ENTRY_POINTS entry = {};
14 entry.Version = RDP_CLIENT_INTERFACE_VERSION;
15 entry.Size = sizeof(RDP_CLIENT_ENTRY_POINTS_V1);
16 entry.ContextSize = sizeof(rdpContext);
17
18 std::shared_ptr<rdpContext> context(freerdp_client_context_new(&entry),
19 [](rdpContext* ptr) { freerdp_client_context_free(ptr); });
20
21 char* token = nullptr;
22 if (!sdl_webview_get_access_token(context->instance, ACCESS_TOKEN_TYPE_AAD, &token, 2, "scope",
23 "foobar"))
24 {
25 std::cerr << "test failed!" << std::endl;
26 return -1;
27 }
28#endif
29 return 0;
30}