├── .gitattributes ├── .gitignore ├── CONTRIBUTING.md ├── Doxyfile ├── LICENSE.md ├── README.md ├── Tests ├── MixerTests.vcxproj ├── MixerTests.vcxproj.filters ├── Tests.cpp ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── builds ├── Interactivity.UWP.Cpp │ ├── Interactivity.UWP.Cpp.sln │ ├── Interactivity.UWP.Cpp.vcxproj │ ├── Interactivity.UWP.Cpp.vcxproj.filters │ └── pch.cpp ├── Interactivity.Win32.Cpp │ ├── Interactivity.Win32.Cpp.sln │ ├── Interactivity.Win32.Cpp.vcxproj │ ├── Interactivity.Win32.Cpp.vcxproj.filters │ └── pch.cpp ├── Interactivity.Xbox.Cpp │ ├── Build.Durango.Cpp.props │ ├── Interactivity.Xbox.Cpp.sln │ ├── Interactivity.Xbox.Cpp.vcxproj │ ├── Interactivity.Xbox.Cpp.vcxproj.filters │ └── pch.cpp └── interactivity.sln ├── docs ├── html │ ├── annotated.html │ ├── bc_s.png │ ├── bdwn.png │ ├── classes.html │ ├── closed.png │ ├── dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html │ ├── doc.png │ ├── doxygen.css │ ├── doxygen.png │ ├── dynsections.js │ ├── files.html │ ├── folderclosed.png │ ├── folderopen.png │ ├── group___interactivity.html │ ├── hierarchy.html │ ├── index.html │ ├── interactivity_8h_source.html │ ├── jquery.js │ ├── menu.js │ ├── menudata.js │ ├── modules.html │ ├── nav_f.png │ ├── nav_g.png │ ├── nav_h.png │ ├── open.png │ ├── search │ │ ├── all_0.html │ │ ├── all_0.js │ │ ├── all_1.html │ │ ├── all_1.js │ │ ├── all_2.html │ │ ├── all_2.js │ │ ├── all_3.html │ │ ├── all_3.js │ │ ├── all_4.html │ │ ├── all_4.js │ │ ├── classes_0.html │ │ ├── classes_0.js │ │ ├── classes_1.html │ │ ├── classes_1.js │ │ ├── classes_2.html │ │ ├── classes_2.js │ │ ├── close.png │ │ ├── functions_0.html │ │ ├── functions_0.js │ │ ├── groups_0.html │ │ ├── groups_0.js │ │ ├── mag_sel.png │ │ ├── nomatches.html │ │ ├── pages_0.html │ │ ├── pages_0.js │ │ ├── search.css │ │ ├── search.js │ │ ├── search_l.png │ │ ├── search_m.png │ │ ├── search_r.png │ │ ├── searchdata.js │ │ ├── typedefs_0.html │ │ ├── typedefs_0.js │ │ ├── typedefs_1.html │ │ └── typedefs_1.js │ ├── splitbar.png │ ├── structinteractive__control-members.html │ ├── structinteractive__control.html │ ├── structinteractive__control.png │ ├── structinteractive__group-members.html │ ├── structinteractive__group.html │ ├── structinteractive__group.png │ ├── structinteractive__input-members.html │ ├── structinteractive__input.html │ ├── structinteractive__input_1_1button_data-members.html │ ├── structinteractive__input_1_1button_data.html │ ├── structinteractive__input_1_1coordinate_data-members.html │ ├── structinteractive__input_1_1coordinate_data.html │ ├── structinteractive__object-members.html │ ├── structinteractive__object.html │ ├── structinteractive__object.png │ ├── structinteractive__participant-members.html │ ├── structinteractive__participant.html │ ├── structinteractive__participant.png │ ├── structinteractive__scene-members.html │ ├── structinteractive__scene.html │ ├── structinteractive__scene.png │ ├── structinteractive__user-members.html │ ├── structinteractive__user.html │ ├── sync_off.png │ ├── sync_on.png │ ├── tab_a.png │ ├── tab_b.png │ ├── tab_h.png │ ├── tab_s.png │ └── tabs.css └── index.html ├── samples ├── InteractiveSample │ ├── InteractiveSample.cpp │ ├── InteractiveSample.sln │ ├── InteractiveSample.vcxproj │ ├── InteractiveSample.vcxproj.filters │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── InteractiveSampleUWP │ └── InteractiveSampleUWP │ │ ├── App.xaml │ │ ├── App.xaml.cpp │ │ ├── App.xaml.h │ │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.png │ │ └── Wide310x150Logo.scale-200.png │ │ ├── InteractiveSampleUWP.sln │ │ ├── InteractiveSampleUWP.vcxproj │ │ ├── InteractiveSampleUWP.vcxproj.filters │ │ ├── InteractiveSampleUWP_TemporaryKey.pfx │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cpp │ │ ├── MainPage.xaml.h │ │ ├── Package.appxmanifest │ │ ├── pch.cpp │ │ └── pch.h ├── InteractiveScreenControlSample │ ├── InteractiveSample.vcxproj │ ├── InteractiveSample.vcxproj.filters │ ├── InteractiveScreenControlSample.cpp │ ├── InteractiveScreenControlSample.sln │ ├── InteractiveScreenControlSample.vcxproj │ ├── InteractiveScreenControlSample.vcxproj.filters │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── InteractiveXboxSample │ ├── Game.cpp │ ├── Game.h │ ├── InteractiveXboxSample.sln │ ├── InteractiveXboxSample.vcxproj │ ├── InteractiveXboxSample.vcxproj.filters │ ├── Logo.png │ ├── Main.cpp │ ├── Package.appxmanifest │ ├── SmallLogo.png │ ├── SplashScreen.png │ ├── StepTimer.h │ ├── StoreLogo.png │ ├── WideLogo.png │ ├── pch.cpp │ └── pch.h └── source ├── interactivity.cpp ├── interactivity.h └── internal ├── common.cpp ├── common.h ├── debugging.h ├── http_client.cpp ├── http_client.h ├── interactive_auth.cpp ├── interactive_control.cpp ├── interactive_event.cpp ├── interactive_event.h ├── interactive_group.cpp ├── interactive_participant.cpp ├── interactive_scene.cpp ├── interactive_session.cpp ├── interactive_session.h ├── interactive_session_internal.cpp ├── interactive_types.h ├── json.h ├── rapidjson ├── allocators.h ├── document.h ├── encodedstream.h ├── encodings.h ├── error │ ├── en.h │ └── error.h ├── filereadstream.h ├── filewritestream.h ├── fwd.h ├── internal │ ├── biginteger.h │ ├── diyfp.h │ ├── dtoa.h │ ├── ieee754.h │ ├── itoa.h │ ├── meta.h │ ├── pow10.h │ ├── regex.h │ ├── stack.h │ ├── strfunc.h │ ├── strtod.h │ └── swap.h ├── istreamwrapper.h ├── memorybuffer.h ├── memorystream.h ├── msinttypes │ ├── inttypes.h │ └── stdint.h ├── ostreamwrapper.h ├── pointer.h ├── prettywriter.h ├── rapidjson.h ├── reader.h ├── schema.h ├── stream.h ├── stringbuffer.h └── writer.h ├── websocket.h ├── win_dll.cpp ├── win_dll.h ├── win_http_api.cpp ├── win_http_api.h ├── win_http_client.cpp ├── win_http_client.h ├── win_websocket.cpp ├── winapp_http_client.cpp ├── winapp_http_client.h └── winapp_websocket.cpp /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | *.cpp crlf diff 6 | 7 | ############################################################################### 8 | # Set default behavior for command prompt diff. 9 | # 10 | # This is need for earlier builds of msysgit that does not have it on by 11 | # default for csharp files. 12 | # Note: This is only used by command line 13 | ############################################################################### 14 | #*.cs diff=csharp 15 | 16 | ############################################################################### 17 | # Set the merge driver for project and solution files 18 | # 19 | # Merging from the command prompt will add diff markers to the files if there 20 | # are conflicts (Merging from VS is not affected by the settings below, in VS 21 | # the diff markers are never inserted). Diff markers may cause the following 22 | # file extensions to fail to load in VS. An alternative would be to treat 23 | # these files as binary and thus will always conflict and require user 24 | # intervention with every merge. To do so, just uncomment the entries below 25 | ############################################################################### 26 | #*.sln merge=binary 27 | #*.csproj merge=binary 28 | #*.vbproj merge=binary 29 | #*.vcxproj merge=binary 30 | #*.vcproj merge=binary 31 | #*.dbproj merge=binary 32 | #*.fsproj merge=binary 33 | #*.lsproj merge=binary 34 | #*.wixproj merge=binary 35 | #*.modelproj merge=binary 36 | #*.sqlproj merge=binary 37 | #*.wwaproj merge=binary 38 | 39 | ############################################################################### 40 | # behavior for image files 41 | # 42 | # image files are treated as binary by default. 43 | ############################################################################### 44 | #*.jpg binary 45 | #*.png binary 46 | #*.gif binary 47 | 48 | ############################################################################### 49 | # diff behavior for common document formats 50 | # 51 | # Convert binary document formats to text before diffing them. This feature 52 | # is only available from the command line. Turn it on by uncommenting the 53 | # entries below. 54 | ############################################################################### 55 | #*.doc diff=astextplain 56 | #*.DOC diff=astextplain 57 | #*.docx diff=astextplain 58 | #*.DOCX diff=astextplain 59 | #*.dot diff=astextplain 60 | #*.DOT diff=astextplain 61 | #*.pdf diff=astextplain 62 | #*.PDF diff=astextplain 63 | #*.rtf diff=astextplain 64 | #*.RTF diff=astextplain 65 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gitconfig 2 | .git-credentials 3 | 4 | # Ignore OpenSSL and Boost build files for iOS 5 | 6 | .gitk 7 | .config/git/gitk 8 | 9 | **/.vs/ 10 | 11 | Casablanca*/Build_iOS/OpenSSL-for-iPhone/ 12 | Casablanca*/Build_iOS/boostoniphone/ 13 | Casablanca*/Build_iOS/openssl/ 14 | Casablanca*/Build_iOS/boost.framework/ 15 | Casablanca*/Build_iOS/build.ios/ 16 | Casablanca*/Build_iOS/ios-cmake/ 17 | 18 | #nuget packages 19 | External/Packages/* 20 | Tools/Packages/* 21 | **/*.nupkg 22 | 23 | # Xcode 24 | 25 | xcuserdata 26 | 27 | # Mac 28 | 29 | .DS_Store 30 | 31 | # VS temp files 32 | **/*.sln.ide/ 33 | **/*.opensdf 34 | **/*.sdf 35 | **/*.suo 36 | **/*.opendb 37 | **/*.VC.db 38 | **/*.user 39 | **/ipch/ 40 | **/Generated Files/ 41 | **/AppPackages/* 42 | **/*.orig 43 | **/pingme.txt 44 | **/*.cache 45 | **/dlldata.c 46 | **/*_i.c 47 | **/*_p.c 48 | **/*.metaproj 49 | **/*.metaproj.tmp 50 | **/*.opendb 51 | **/*.coveragexml 52 | **/*.targets 53 | 54 | **/Durango/ 55 | **/XboxOne.x64/ 56 | Samples/**/bin/ 57 | Samples/**/Debug/ 58 | Samples/**/Release/ 59 | Samples/**/Profile/ 60 | Samples/**/Lib/ 61 | Samples/**/.workspace/ 62 | Source/**/bin/ 63 | Source/**/gen/ 64 | Source/**/Debug/ 65 | Source/**/Release/ 66 | Archive/**/Debug/ 67 | Archive/**/Release/ 68 | Archive/**/Durango/ 69 | Archive/**/Lib/ 70 | Archive/**/*.winmd 71 | Build/**/Debug/ 72 | Build/**/Release/ 73 | External/**/lib/ 74 | External/**/bin/ 75 | External/**/Debug/ 76 | External/**/Release/ 77 | tests/**/bin/ 78 | tests/**/Debug/ 79 | tests/**/Release/ 80 | Tools/**/bin/ 81 | Tools/**/obj/ 82 | **/*.classpath 83 | 84 | **/local.properties 85 | 86 | **/.workspace/ 87 | 88 | #Doxygen temp files 89 | Docs/xblsdk_cpp/ 90 | Docs/xblsdk_winrt/ 91 | Docs/External/ 92 | Docs/xim_cpp/ 93 | 94 | # Unit Test 95 | FakesAssemblies/ 96 | TestResults/ 97 | 98 | # Build objects 99 | 100 | Casablanca/Intermediate/ 101 | Obj/ 102 | Binaries/ 103 | Win32/ 104 | Debug/ 105 | Release/ 106 | ARM/ 107 | 108 | # Allow files in our /Build folder 109 | !/Build 110 | !/Casablanca 111 | 112 | !TAEF/** 113 | 114 | **/.vs/ 115 | 116 | # Dev environment 117 | 118 | Utilities/initEnvironment.cmd -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | There are many different ways in which you can contribute! Please submit issues, questions, bug reports, feature requests, bug fixes, improvements, and new features. 4 | 5 | ### Report bugs and request features 6 | 7 | Issues and feature requests are submitted through the project's [issue tracker](../issues) section on GitHub. Please use the following guidelines when you submit issues and feature requests: 8 | 9 | * Make sure the issue is not already reported by searching through the list of issues 10 | * Provide a detailed description of the issue including the following information: 11 | * Which feature the issue appears in 12 | * Under what circumstances the issue appears 13 | * What is the desired behavior 14 | * What is breaking 15 | * What is the impact (things like loss or corruption of data, compromising security, disruption of service etc.) 16 | * Any code that will be helpful to reproduce the issue 17 | 18 | ### Create bug fixes and features 19 | 20 | Please submit any changes as a Pull Request against the development branch. Make sure to write a detailed message describing the changes in the Pull Request. This will help us quickly determine what changes (if any) need to be made for it to be ready for integration. 21 | 22 | _Note: Please keep in mind that not all requests will be approved. Requests are reviewed by the team on a regular basis and will be updated with the status at each review. If your request is accepted you will receive information about the next steps and when the request will be integrated in the development branch. If your request is rejected you will receive information about the reasons why it was rejected._ 23 | 24 | ### Contribution guidelines 25 | 26 | Before you start working on bug fixes and features it is good idea to discuss those broadly with the community. You can use the [issue tracker](../issues) for this purpose. Before submitting your changes make sure you followed the guidelines below: 27 | 28 | * You have properly documented any new functionality 29 | * For any new functionality you have written complete unit tests 30 | * You have run all unit tests and they pass 31 | * In order to speed up the process of accepting your contributions, you should try to make your checkins as small as possible, avoid any unnecessary deltas and the need to rebase. -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Microsoft Corporation 4 | 5 | All rights reserved. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NOTE: This repo is no longer being maintained by Microsoft. 2 | You can find more information here: https://dev.mixer.com/blog/mixplaysdkchanges 3 | 4 | -------------- 5 | 6 | ## Mixer Interactivity C++ SDK 7 | 8 | The C++ Interactivity SDK supports client-side development with Mixer Interactivity. 9 | If you have not read through our [Interactive Reference Documentation](https://dev.mixer.com/reference/interactive/) now is a great time to do that. 10 | 11 | ## Documentation 12 | 13 | Checkout the Project's [Wiki](https://github.com/mixer/interactive-cpp/wiki) for documentation, including a [Getting Started](https://github.com/mixer/interactive-cpp/wiki/Getting-started) guide. 14 | 15 | ## Quick Start 16 | 17 | Clone the `interactive-cpp` repository. 18 | 19 | ``` 20 | $ git clone https://github.com/mixer/interactive-cpp.git interactive-cpp 21 | ``` 22 | 23 | Copy the `source` directory into your C++ game project (you will likely want to rename it). Add `interactivity.cpp` to your compilation list and include `interactivity.h` to get started. 24 | 25 | See the [InteractiveSample](https://github.com/mixer/interactive-cpp/tree/master/samples/InteractiveSample) for an example of how you might handle authorization and connect to an interactive session. 26 | 27 | ### Authorization 28 | If you don't plan on handling authorization yourself you can use the provided authorization helper functions. To do so you will need an OAuth client ID which you can obtain here: https://mixer.com/lab/oauth 29 | 30 | ## Design choices 31 | This source code was designed to be easily consumed by any game project. Some of major design decisions include: 32 | * A single header and [unity build](https://en.wikipedia.org/wiki/Single_Compilation_Unit) style cpp file. 33 | * An extern "C" interface. 34 | * No dependencies exposed in the header, all usage of STL and other libraries are quarantined from your game. 35 | * Callbacks on the caller's thread for easy memory management and managed language interop. 36 | * All interactive functions assume UTF-8 strings for input and output parameters. 37 | 38 | ## Release Notes 39 | 40 | The `interactive-cpp` repository is currently in a pre-release state. Please refer 41 | to the [release notes](https://github.com/mixer/interactive-cpp/releases) for more information. 42 | 43 | ## Contribute Back! 44 | 45 | Is there a feature missing that you'd like to see, or have you found a bug that you 46 | have a fix for? Do you have an idea or just interest in helping out in building the 47 | library? Let us know and we'd love to work with you. For a good starting point on where 48 | we are headed and feature ideas, take a look at our [requested features and bugs](https://github.com/mixer/interactive-cpp/issues) or [backlog](https://github.com/mixer/interactive-cpp/blob/master/backlog.md). 49 | 50 | Big or small we'd like to take your contributions to help improve the Mixer Interactivity 51 | API for everyone. 52 | 53 | ## Legacy SDK 54 | 55 | If you are looking for the previous version of the SDK it is preserved [here](https://github.com/mixer/interactive-cpp/tree/legacy). 56 | 57 | ## Having Trouble? 58 | 59 | We'd love to get your review score, whether good or bad, but even more than that, we want 60 | to fix your problem. If you submit your issue as a Review, we won't be able to respond to 61 | your problem and ask any follow-up questions that may be necessary. The most efficient way 62 | to do that is to open an issue in our [issue tracker](https://github.com/mixer/interactive-cpp/issues). 63 | 64 | ### Quick Links 65 | 66 | * [Mixer](https://mixer.com/) 67 | * [Developer Site](https://dev.mixer.com/) 68 | * [Issue Tracker](https://github.com/mixer/interactive-cpp/issues) 69 | 70 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 71 | 72 | -------------------------------------------------------------------------------- /Tests/MixerTests.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | -------------------------------------------------------------------------------- /Tests/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // MixerTests.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /Tests/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | // Headers for CppUnitTest 11 | #include "CppUnitTest.h" 12 | 13 | // TODO: reference additional headers your program requires here 14 | -------------------------------------------------------------------------------- /Tests/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /builds/Interactivity.UWP.Cpp/Interactivity.UWP.Cpp.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interactivity.UWP.Cpp", "Interactivity.UWP.Cpp.vcxproj", "{8F96710E-5169-4917-8874-7DE248F4D243}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {8F96710E-5169-4917-8874-7DE248F4D243}.Debug|x64.ActiveCfg = Debug|x64 17 | {8F96710E-5169-4917-8874-7DE248F4D243}.Debug|x64.Build.0 = Debug|x64 18 | {8F96710E-5169-4917-8874-7DE248F4D243}.Debug|x86.ActiveCfg = Debug|Win32 19 | {8F96710E-5169-4917-8874-7DE248F4D243}.Debug|x86.Build.0 = Debug|Win32 20 | {8F96710E-5169-4917-8874-7DE248F4D243}.Release|x64.ActiveCfg = Release|x64 21 | {8F96710E-5169-4917-8874-7DE248F4D243}.Release|x64.Build.0 = Release|x64 22 | {8F96710E-5169-4917-8874-7DE248F4D243}.Release|x86.ActiveCfg = Release|Win32 23 | {8F96710E-5169-4917-8874-7DE248F4D243}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {00ED3061-AD03-4F0B-BF12-E37E7067EF9D} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /builds/Interactivity.UWP.Cpp/Interactivity.UWP.Cpp.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {023c344a-2474-4519-92eb-e96f85f33c56} 6 | 7 | 8 | {89ced404-e730-4d9d-8523-dc7167e784d8} 9 | 10 | 11 | 12 | 13 | C++ Source 14 | 15 | 16 | C++ Source 17 | 18 | 19 | C++ Source 20 | 21 | 22 | C++ Source 23 | 24 | 25 | C++ Source 26 | 27 | 28 | C++ Source 29 | 30 | 31 | C++ Source 32 | 33 | 34 | C++ Source 35 | 36 | 37 | C++ Source 38 | 39 | 40 | C++ Source 41 | 42 | 43 | C++ Source 44 | 45 | 46 | C++ Source 47 | 48 | 49 | 50 | 51 | Includes 52 | 53 | 54 | Includes 55 | 56 | 57 | Includes 58 | 59 | 60 | Includes 61 | 62 | 63 | Includes 64 | 65 | 66 | Includes 67 | 68 | 69 | Includes 70 | 71 | 72 | -------------------------------------------------------------------------------- /builds/Interactivity.UWP.Cpp/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | 3 | #ifdef ANDROID 4 | template< typename T > 5 | std::string std::to_string(const T& item) { 6 | 7 | std::stringstream ss; 8 | ss << item; 9 | return ss.str(); 10 | 11 | } 12 | 13 | #endif -------------------------------------------------------------------------------- /builds/Interactivity.Win32.Cpp/Interactivity.Win32.Cpp.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interactivity.Win32.Cpp", "Interactivity.Win32.Cpp.vcxproj", "{441F8169-F31E-4653-941E-25AC223CBAFB}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|ARM = Debug|ARM 11 | Debug|x64 = Debug|x64 12 | Debug|x86 = Debug|x86 13 | Release|ARM = Release|ARM 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Debug|ARM.ActiveCfg = Debug|Win32 19 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Debug|x64.ActiveCfg = Debug|x64 20 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Debug|x64.Build.0 = Debug|x64 21 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Debug|x86.ActiveCfg = Debug|Win32 22 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Debug|x86.Build.0 = Debug|Win32 23 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Release|ARM.ActiveCfg = Release|Win32 24 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Release|x64.ActiveCfg = Release|x64 25 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Release|x64.Build.0 = Release|x64 26 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Release|x86.ActiveCfg = Release|Win32 27 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Release|x86.Build.0 = Release|Win32 28 | EndGlobalSection 29 | GlobalSection(SolutionProperties) = preSolution 30 | HideSolutionNode = FALSE 31 | EndGlobalSection 32 | GlobalSection(ExtensibilityGlobals) = postSolution 33 | SolutionGuid = {B9B80CFD-EE01-4E7D-BF3A-97EB4AE34A0B} 34 | EndGlobalSection 35 | EndGlobal 36 | -------------------------------------------------------------------------------- /builds/Interactivity.Win32.Cpp/Interactivity.Win32.Cpp.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4aede272-2b83-4079-a328-4440e1bc132e} 6 | 7 | 8 | {5b6a7a42-d94a-492e-92c7-b6f5adbae85b} 9 | 10 | 11 | 12 | 13 | C++ Source 14 | 15 | 16 | C++ Source 17 | 18 | 19 | C++ Source 20 | 21 | 22 | C++ Source 23 | 24 | 25 | C++ Source 26 | 27 | 28 | C++ Source 29 | 30 | 31 | C++ Source 32 | 33 | 34 | C++ Source 35 | 36 | 37 | C++ Source 38 | 39 | 40 | C++ Source 41 | 42 | 43 | C++ Source 44 | 45 | 46 | C++ Source 47 | 48 | 49 | C++ Source 50 | 51 | 52 | 53 | 54 | Includes 55 | 56 | 57 | Includes 58 | 59 | 60 | Includes 61 | 62 | 63 | Includes 64 | 65 | 66 | Includes 67 | 68 | 69 | Includes 70 | 71 | 72 | Includes 73 | 74 | 75 | Includes 76 | 77 | 78 | Includes 79 | 80 | 81 | Includes 82 | 83 | 84 | -------------------------------------------------------------------------------- /builds/Interactivity.Win32.Cpp/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" -------------------------------------------------------------------------------- /builds/Interactivity.Xbox.Cpp/Build.Durango.Cpp.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath) 6 | $(Console_SdkLibPath) 7 | $(Console_SdkLibPath);$(Console_SdkWindowsMetadataPath) 8 | $(Console_SdkIncludeRoot) 9 | $(Console_SdkRoot)bin;$(VCInstallDir)bin\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(MSBuildToolsPath32);$(FxCopDir);$(PATH); 10 | 11 | 12 | 13 | 14 | ixmlhttprequest2.lib;combase.lib;kernelx.lib;uuid.lib; 15 | 16 | 17 | $(Console_SdkPackagesRoot);$(Console_SdkWindowsMetadataPath);%(AdditionalUsingDirectories) 18 | 19 | 20 | 21 | 22 | 23 | msxml6.lib;runtimeobject.lib;mincore.lib;mincore_legacy.lib;mincore_obsolete.lib;user32.lib;uuid.lib; 24 | 25 | 26 | $(Console_SdkPackagesRoot);$(Console_SdkWindowsMetadataPath);%(AdditionalUsingDirectories) 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /builds/Interactivity.Xbox.Cpp/Interactivity.Xbox.Cpp.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interactivity.Xbox.Cpp", "Interactivity.Xbox.Cpp.vcxproj", "{8A112040-CDA1-4490-B518-62DFCC451FA7}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Durango = Debug|Durango 11 | Release|Durango = Release|Durango 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {8A112040-CDA1-4490-B518-62DFCC451FA7}.Debug|Durango.ActiveCfg = Debug|Durango 15 | {8A112040-CDA1-4490-B518-62DFCC451FA7}.Debug|Durango.Build.0 = Debug|Durango 16 | {8A112040-CDA1-4490-B518-62DFCC451FA7}.Release|Durango.ActiveCfg = Release|Durango 17 | {8A112040-CDA1-4490-B518-62DFCC451FA7}.Release|Durango.Build.0 = Release|Durango 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {5D4AC624-81AB-4D88-BBF4-24E6A7530AF5} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /builds/Interactivity.Xbox.Cpp/Interactivity.Xbox.Cpp.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4aede272-2b83-4079-a328-4440e1bc132e} 6 | 7 | 8 | {5b6a7a42-d94a-492e-92c7-b6f5adbae85b} 9 | 10 | 11 | 12 | 13 | C++ Source 14 | 15 | 16 | C++ Source 17 | 18 | 19 | C++ Source 20 | 21 | 22 | C++ Source 23 | 24 | 25 | C++ Source 26 | 27 | 28 | C++ Source 29 | 30 | 31 | C++ Source 32 | 33 | 34 | C++ Source 35 | 36 | 37 | C++ Source 38 | 39 | 40 | C++ Source 41 | 42 | 43 | C++ Source 44 | 45 | 46 | 47 | 48 | Includes 49 | 50 | 51 | Includes 52 | 53 | 54 | Includes 55 | 56 | 57 | Includes 58 | 59 | 60 | Includes 61 | 62 | 63 | -------------------------------------------------------------------------------- /builds/Interactivity.Xbox.Cpp/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" -------------------------------------------------------------------------------- /builds/interactivity.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27004.2002 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interactivity.Win32.Cpp", "Interactivity.Win32.Cpp\Interactivity.Win32.Cpp.vcxproj", "{441F8169-F31E-4653-941E-25AC223CBAFB}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interactivity.UWP.Cpp", "Interactivity.UWP.Cpp\Interactivity.UWP.Cpp.vcxproj", "{8F96710E-5169-4917-8874-7DE248F4D243}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interactivity.Xbox.Cpp", "Interactivity.Xbox.Cpp\Interactivity.Xbox.Cpp.vcxproj", "{8A112040-CDA1-4490-B518-62DFCC451FA7}" 11 | EndProject 12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MixerTests", "..\Tests\MixerTests.vcxproj", "{F5237EC6-1360-47FB-A9F7-A49104E0CCE0}" 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Durango = Debug|Durango 17 | Debug|x64 = Debug|x64 18 | Debug|x86 = Debug|x86 19 | Release|Durango = Release|Durango 20 | Release|x64 = Release|x64 21 | Release|x86 = Release|x86 22 | EndGlobalSection 23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 24 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Debug|Durango.ActiveCfg = Debug|Win32 25 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Debug|x64.ActiveCfg = Debug|x64 26 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Debug|x64.Build.0 = Debug|x64 27 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Debug|x86.ActiveCfg = Debug|Win32 28 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Debug|x86.Build.0 = Debug|Win32 29 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Release|Durango.ActiveCfg = Release|Win32 30 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Release|x64.ActiveCfg = Release|x64 31 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Release|x64.Build.0 = Release|x64 32 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Release|x86.ActiveCfg = Release|Win32 33 | {441F8169-F31E-4653-941E-25AC223CBAFB}.Release|x86.Build.0 = Release|Win32 34 | {8F96710E-5169-4917-8874-7DE248F4D243}.Debug|Durango.ActiveCfg = Debug|Win32 35 | {8F96710E-5169-4917-8874-7DE248F4D243}.Debug|x64.ActiveCfg = Debug|x64 36 | {8F96710E-5169-4917-8874-7DE248F4D243}.Debug|x64.Build.0 = Debug|x64 37 | {8F96710E-5169-4917-8874-7DE248F4D243}.Debug|x86.ActiveCfg = Debug|Win32 38 | {8F96710E-5169-4917-8874-7DE248F4D243}.Debug|x86.Build.0 = Debug|Win32 39 | {8F96710E-5169-4917-8874-7DE248F4D243}.Release|Durango.ActiveCfg = Release|Win32 40 | {8F96710E-5169-4917-8874-7DE248F4D243}.Release|x64.ActiveCfg = Release|x64 41 | {8F96710E-5169-4917-8874-7DE248F4D243}.Release|x64.Build.0 = Release|x64 42 | {8F96710E-5169-4917-8874-7DE248F4D243}.Release|x86.ActiveCfg = Release|Win32 43 | {8F96710E-5169-4917-8874-7DE248F4D243}.Release|x86.Build.0 = Release|Win32 44 | {8A112040-CDA1-4490-B518-62DFCC451FA7}.Debug|Durango.ActiveCfg = Debug|Durango 45 | {8A112040-CDA1-4490-B518-62DFCC451FA7}.Debug|Durango.Build.0 = Debug|Durango 46 | {8A112040-CDA1-4490-B518-62DFCC451FA7}.Debug|x64.ActiveCfg = Debug|Durango 47 | {8A112040-CDA1-4490-B518-62DFCC451FA7}.Debug|x86.ActiveCfg = Debug|Durango 48 | {8A112040-CDA1-4490-B518-62DFCC451FA7}.Release|Durango.ActiveCfg = Release|Durango 49 | {8A112040-CDA1-4490-B518-62DFCC451FA7}.Release|Durango.Build.0 = Release|Durango 50 | {8A112040-CDA1-4490-B518-62DFCC451FA7}.Release|x64.ActiveCfg = Release|Durango 51 | {8A112040-CDA1-4490-B518-62DFCC451FA7}.Release|x86.ActiveCfg = Release|Durango 52 | {F5237EC6-1360-47FB-A9F7-A49104E0CCE0}.Debug|Durango.ActiveCfg = Debug|Win32 53 | {F5237EC6-1360-47FB-A9F7-A49104E0CCE0}.Debug|x64.ActiveCfg = Debug|x64 54 | {F5237EC6-1360-47FB-A9F7-A49104E0CCE0}.Debug|x64.Build.0 = Debug|x64 55 | {F5237EC6-1360-47FB-A9F7-A49104E0CCE0}.Debug|x86.ActiveCfg = Debug|Win32 56 | {F5237EC6-1360-47FB-A9F7-A49104E0CCE0}.Debug|x86.Build.0 = Debug|Win32 57 | {F5237EC6-1360-47FB-A9F7-A49104E0CCE0}.Release|Durango.ActiveCfg = Release|Win32 58 | {F5237EC6-1360-47FB-A9F7-A49104E0CCE0}.Release|x64.ActiveCfg = Release|x64 59 | {F5237EC6-1360-47FB-A9F7-A49104E0CCE0}.Release|x64.Build.0 = Release|x64 60 | {F5237EC6-1360-47FB-A9F7-A49104E0CCE0}.Release|x86.ActiveCfg = Release|Win32 61 | {F5237EC6-1360-47FB-A9F7-A49104E0CCE0}.Release|x86.Build.0 = Release|Win32 62 | EndGlobalSection 63 | GlobalSection(SolutionProperties) = preSolution 64 | HideSolutionNode = FALSE 65 | EndGlobalSection 66 | GlobalSection(ExtensibilityGlobals) = postSolution 67 | SolutionGuid = {639AFDD7-F0DC-474D-B385-AC4CA7B5C813} 68 | EndGlobalSection 69 | EndGlobal 70 | -------------------------------------------------------------------------------- /docs/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/bc_s.png -------------------------------------------------------------------------------- /docs/html/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/bdwn.png -------------------------------------------------------------------------------- /docs/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/closed.png -------------------------------------------------------------------------------- /docs/html/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Mixer Interactive C++ SDK: source Directory Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
Mixer Interactive C++ SDK 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 47 | 48 | 49 |
53 |
54 | 55 | 56 |
57 | 60 |
61 | 62 | 66 |
67 |
68 |
69 |
source Directory Reference
70 |
71 |
72 |
73 | 74 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /docs/html/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/doc.png -------------------------------------------------------------------------------- /docs/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/doxygen.png -------------------------------------------------------------------------------- /docs/html/dynsections.js: -------------------------------------------------------------------------------- 1 | /* 2 | @licstart The following is the entire license notice for the 3 | JavaScript code in this file. 4 | 5 | Copyright (C) 1997-2017 by Dimitri van Heesch 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License along 18 | with this program; if not, write to the Free Software Foundation, Inc., 19 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | 21 | @licend The above is the entire license notice 22 | for the JavaScript code in this file 23 | */ 24 | function toggleVisibility(linkObj) 25 | { 26 | var base = $(linkObj).attr('id'); 27 | var summary = $('#'+base+'-summary'); 28 | var content = $('#'+base+'-content'); 29 | var trigger = $('#'+base+'-trigger'); 30 | var src=$(trigger).attr('src'); 31 | if (content.is(':visible')===true) { 32 | content.hide(); 33 | summary.show(); 34 | $(linkObj).addClass('closed').removeClass('opened'); 35 | $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); 36 | } else { 37 | content.show(); 38 | summary.hide(); 39 | $(linkObj).removeClass('closed').addClass('opened'); 40 | $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); 41 | } 42 | return false; 43 | } 44 | 45 | function updateStripes() 46 | { 47 | $('table.directory tr'). 48 | removeClass('even').filter(':visible:even').addClass('even'); 49 | } 50 | 51 | function toggleLevel(level) 52 | { 53 | $('table.directory tr').each(function() { 54 | var l = this.id.split('_').length-1; 55 | var i = $('#img'+this.id.substring(3)); 56 | var a = $('#arr'+this.id.substring(3)); 57 | if (l 2 | 3 | 4 | 5 | 6 | 7 | 8 | Mixer Interactive C++ SDK: File List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
Mixer Interactive C++ SDK 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 47 | 48 |
49 | 50 |
54 |
55 | 56 | 57 |
58 | 61 |
62 | 63 |
64 |
65 |
File List
66 |
67 |
68 |
Here is a list of all documented files with brief descriptions:
69 |
[detail level 12]
70 | 71 | 72 |
  source
 interactivity.h
73 |
74 |
75 | 76 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /docs/html/folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/folderclosed.png -------------------------------------------------------------------------------- /docs/html/folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/folderopen.png -------------------------------------------------------------------------------- /docs/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Mixer Interactive C++ SDK: Mixer Interactive C++ SDK Documentation 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
Mixer Interactive C++ SDK 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 47 | 48 |
49 | 50 |
54 |
55 | 56 | 57 |
58 | 61 |
62 | 63 |
64 |
65 |
Mixer Interactive C++ SDK Documentation
66 |
67 |
68 |

This is the API documentation for the Mixer C++ SDK. For a detailed walkthrough of specific features and usage visit https://github.com/mixer/interactive-cpp/wiki.

69 |

API Documentation

70 |
71 | 72 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /docs/html/menu.js: -------------------------------------------------------------------------------- 1 | /* 2 | @licstart The following is the entire license notice for the 3 | JavaScript code in this file. 4 | 5 | Copyright (C) 1997-2017 by Dimitri van Heesch 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License along 18 | with this program; if not, write to the Free Software Foundation, Inc., 19 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | 21 | @licend The above is the entire license notice 22 | for the JavaScript code in this file 23 | */ 24 | function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { 25 | function makeTree(data,relPath) { 26 | var result=''; 27 | if ('children' in data) { 28 | result+=''; 35 | } 36 | return result; 37 | } 38 | 39 | $('#main-nav').append(makeTree(menudata,relPath)); 40 | $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); 41 | if (searchEnabled) { 42 | if (serverSide) { 43 | $('#main-menu').append('
  • '); 44 | } else { 45 | $('#main-menu').append('
  • '); 46 | } 47 | } 48 | $('#main-menu').smartmenus(); 49 | } 50 | /* @license-end */ 51 | -------------------------------------------------------------------------------- /docs/html/menudata.js: -------------------------------------------------------------------------------- 1 | /* 2 | @ @licstart The following is the entire license notice for the 3 | JavaScript code in this file. 4 | 5 | Copyright (C) 1997-2017 by Dimitri van Heesch 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License along 18 | with this program; if not, write to the Free Software Foundation, Inc., 19 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | 21 | @licend The above is the entire license notice 22 | for the JavaScript code in this file 23 | */ 24 | var menudata={children:[ 25 | {text:"Main Page",url:"index.html"}, 26 | {text:"Modules",url:"modules.html"}, 27 | {text:"Classes",url:"annotated.html",children:[ 28 | {text:"Class List",url:"annotated.html"}, 29 | {text:"Class Index",url:"classes.html"}, 30 | {text:"Class Hierarchy",url:"hierarchy.html"}]}, 31 | {text:"Files",url:"files.html",children:[ 32 | {text:"File List",url:"files.html"}]}]} 33 | -------------------------------------------------------------------------------- /docs/html/modules.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Mixer Interactive C++ SDK: Modules 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 | 21 | 22 | 23 | 27 | 28 | 29 |
    24 |
    Mixer Interactive C++ SDK 25 |
    26 |
    30 |
    31 | 32 | 33 | 38 | 39 | 40 | 47 | 48 |
    49 | 50 |
    54 |
    55 | 56 | 57 |
    58 | 61 |
    62 | 63 |
    64 |
    65 |
    Modules
    66 |
    67 |
    68 |
    Here is a list of all modules:
    69 | 70 | 71 |
     Mixer Interactive C++ SDK
    72 |
    73 |
    74 | 75 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/nav_f.png -------------------------------------------------------------------------------- /docs/html/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/nav_g.png -------------------------------------------------------------------------------- /docs/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/nav_h.png -------------------------------------------------------------------------------- /docs/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/open.png -------------------------------------------------------------------------------- /docs/html/search/all_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/all_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['buttondata',['buttonData',['../structinteractive__input_1_1button_data.html',1,'interactive_input']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/html/search/all_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/all_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['coordinatedata',['coordinateData',['../structinteractive__input_1_1coordinate_data.html',1,'interactive_input']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/html/search/all_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/all_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/all_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['mixer_20interactive_20c_2b_2b_20sdk_20documentation',['Mixer Interactive C++ SDK Documentation',['../index.html',1,'']]], 4 | ['mixer_20interactive_20c_2b_2b_20sdk',['Mixer Interactive C++ SDK',['../group___interactivity.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/html/search/all_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/all_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['on_5fcontrol_5fchanged',['on_control_changed',['../group___interactivity.html#ga56f8460953adbe027556162a201bcdc4',1,'interactivity.h']]], 4 | ['on_5fdebug_5fmsg',['on_debug_msg',['../group___interactivity.html#gac182f6e9e39863cd1671a69aa1ead684',1,'interactivity.h']]], 5 | ['on_5ferror',['on_error',['../group___interactivity.html#gabb1eefe2ce4247a4562fe1f231a35144',1,'interactivity.h']]], 6 | ['on_5fgroup_5fenumerate',['on_group_enumerate',['../group___interactivity.html#ga75f02012d9f7c6674467619408f59897',1,'interactivity.h']]], 7 | ['on_5finput',['on_input',['../group___interactivity.html#gabc1d56c93e90e83489bc9200a467a9b6',1,'interactivity.h']]], 8 | ['on_5finteractive_5fuser',['on_interactive_user',['../group___interactivity.html#ga1aae1a3072eec7520be6e7693acd7f4f',1,'interactivity.h']]], 9 | ['on_5fparticipants_5fchanged',['on_participants_changed',['../group___interactivity.html#ga37e53b2d79a8ef8dbb6adae640e53779',1,'interactivity.h']]], 10 | ['on_5fscene_5fenumerate',['on_scene_enumerate',['../group___interactivity.html#gac3d16e9945637c47b8166788a793d03e',1,'interactivity.h']]], 11 | ['on_5fstate_5fchanged',['on_state_changed',['../group___interactivity.html#ga2decafcde365ca3bc6907760ef4fcc5f',1,'interactivity.h']]], 12 | ['on_5ftransaction_5fcomplete',['on_transaction_complete',['../group___interactivity.html#gadd027ab4911a031b88ecd8603ed7cbd3',1,'interactivity.h']]], 13 | ['on_5funhandled_5fmethod',['on_unhandled_method',['../group___interactivity.html#ga1f1661f615bd28112daad64f95103a6a',1,'interactivity.h']]] 14 | ]; 15 | -------------------------------------------------------------------------------- /docs/html/search/classes_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/classes_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['buttondata',['buttonData',['../structinteractive__input_1_1button_data.html',1,'interactive_input']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/html/search/classes_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/classes_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['coordinatedata',['coordinateData',['../structinteractive__input_1_1coordinate_data.html',1,'interactive_input']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/html/search/classes_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/classes_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['interactive_5fcontrol',['interactive_control',['../structinteractive__control.html',1,'']]], 4 | ['interactive_5fgroup',['interactive_group',['../structinteractive__group.html',1,'']]], 5 | ['interactive_5finput',['interactive_input',['../structinteractive__input.html',1,'']]], 6 | ['interactive_5fobject',['interactive_object',['../structinteractive__object.html',1,'']]], 7 | ['interactive_5fparticipant',['interactive_participant',['../structinteractive__participant.html',1,'']]], 8 | ['interactive_5fscene',['interactive_scene',['../structinteractive__scene.html',1,'']]], 9 | ['interactive_5fuser',['interactive_user',['../structinteractive__user.html',1,'']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /docs/html/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/search/close.png -------------------------------------------------------------------------------- /docs/html/search/functions_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/groups_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/groups_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['mixer_20interactive_20c_2b_2b_20sdk',['Mixer Interactive C++ SDK',['../group___interactivity.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/html/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/search/mag_sel.png -------------------------------------------------------------------------------- /docs/html/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
    9 |
    No Matches
    10 |
    11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/html/search/pages_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/pages_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['mixer_20interactive_20c_2b_2b_20sdk_20documentation',['Mixer Interactive C++ SDK Documentation',['../index.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/html/search/search_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/search/search_l.png -------------------------------------------------------------------------------- /docs/html/search/search_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/search/search_m.png -------------------------------------------------------------------------------- /docs/html/search/search_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/search/search_r.png -------------------------------------------------------------------------------- /docs/html/search/searchdata.js: -------------------------------------------------------------------------------- 1 | var indexSectionsWithContent = 2 | { 3 | 0: "bcimo", 4 | 1: "bci", 5 | 2: "i", 6 | 3: "io", 7 | 4: "m", 8 | 5: "m" 9 | }; 10 | 11 | var indexSectionNames = 12 | { 13 | 0: "all", 14 | 1: "classes", 15 | 2: "functions", 16 | 3: "typedefs", 17 | 4: "groups", 18 | 5: "pages" 19 | }; 20 | 21 | var indexSectionLabels = 22 | { 23 | 0: "All", 24 | 1: "Classes", 25 | 2: "Functions", 26 | 3: "Typedefs", 27 | 4: "Modules", 28 | 5: "Pages" 29 | }; 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/typedefs_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/typedefs_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['interactive_5fsession',['interactive_session',['../group___interactivity.html#ga6d8819d38b8dc8994a2299cf22a65a31',1,'interactivity.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/html/search/typedefs_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 18 |
    Searching...
    19 |
    No Matches
    20 | 28 |
    29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/html/search/typedefs_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['on_5fcontrol_5fchanged',['on_control_changed',['../group___interactivity.html#ga56f8460953adbe027556162a201bcdc4',1,'interactivity.h']]], 4 | ['on_5fdebug_5fmsg',['on_debug_msg',['../group___interactivity.html#gac182f6e9e39863cd1671a69aa1ead684',1,'interactivity.h']]], 5 | ['on_5ferror',['on_error',['../group___interactivity.html#gabb1eefe2ce4247a4562fe1f231a35144',1,'interactivity.h']]], 6 | ['on_5fgroup_5fenumerate',['on_group_enumerate',['../group___interactivity.html#ga75f02012d9f7c6674467619408f59897',1,'interactivity.h']]], 7 | ['on_5finput',['on_input',['../group___interactivity.html#gabc1d56c93e90e83489bc9200a467a9b6',1,'interactivity.h']]], 8 | ['on_5finteractive_5fuser',['on_interactive_user',['../group___interactivity.html#ga1aae1a3072eec7520be6e7693acd7f4f',1,'interactivity.h']]], 9 | ['on_5fparticipants_5fchanged',['on_participants_changed',['../group___interactivity.html#ga37e53b2d79a8ef8dbb6adae640e53779',1,'interactivity.h']]], 10 | ['on_5fscene_5fenumerate',['on_scene_enumerate',['../group___interactivity.html#gac3d16e9945637c47b8166788a793d03e',1,'interactivity.h']]], 11 | ['on_5fstate_5fchanged',['on_state_changed',['../group___interactivity.html#ga2decafcde365ca3bc6907760ef4fcc5f',1,'interactivity.h']]], 12 | ['on_5ftransaction_5fcomplete',['on_transaction_complete',['../group___interactivity.html#gadd027ab4911a031b88ecd8603ed7cbd3',1,'interactivity.h']]], 13 | ['on_5funhandled_5fmethod',['on_unhandled_method',['../group___interactivity.html#ga1f1661f615bd28112daad64f95103a6a',1,'interactivity.h']]] 14 | ]; 15 | -------------------------------------------------------------------------------- /docs/html/splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/splitbar.png -------------------------------------------------------------------------------- /docs/html/structinteractive__control-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Mixer Interactive C++ SDK: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 | 21 | 22 | 23 | 27 | 28 | 29 |
    24 |
    Mixer Interactive C++ SDK 25 |
    26 |
    30 |
    31 | 32 | 33 | 38 | 39 | 40 | 47 | 48 | 49 |
    53 |
    54 | 55 | 56 |
    57 | 60 |
    61 | 62 |
    63 |
    64 |
    65 |
    interactive_control Member List
    66 |
    67 |
    68 | 69 |

    This is the complete list of members for interactive_control, including all inherited members.

    70 | 71 | 72 | 73 | 74 | 75 |
    id (defined in interactive_object)interactive_object
    idLength (defined in interactive_object)interactive_object
    kind (defined in interactive_control)interactive_control
    kindLength (defined in interactive_control)interactive_control
    76 | 77 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /docs/html/structinteractive__control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/structinteractive__control.png -------------------------------------------------------------------------------- /docs/html/structinteractive__group-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Mixer Interactive C++ SDK: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 | 21 | 22 | 23 | 27 | 28 | 29 |
    24 |
    Mixer Interactive C++ SDK 25 |
    26 |
    30 |
    31 | 32 | 33 | 38 | 39 | 40 | 47 | 48 | 49 |
    53 |
    54 | 55 | 56 |
    57 | 60 |
    61 | 62 |
    63 |
    64 |
    65 |
    interactive_group Member List
    66 |
    67 |
    68 | 69 |

    This is the complete list of members for interactive_group, including all inherited members.

    70 | 71 | 72 | 73 | 74 | 75 |
    id (defined in interactive_object)interactive_object
    idLength (defined in interactive_object)interactive_object
    sceneId (defined in interactive_group)interactive_group
    sceneIdLength (defined in interactive_group)interactive_group
    76 | 77 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /docs/html/structinteractive__group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/structinteractive__group.png -------------------------------------------------------------------------------- /docs/html/structinteractive__input_1_1button_data-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Mixer Interactive C++ SDK: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 | 21 | 22 | 23 | 27 | 28 | 29 |
    24 |
    Mixer Interactive C++ SDK 25 |
    26 |
    30 |
    31 | 32 | 33 | 38 | 39 | 40 | 47 | 48 | 49 |
    53 |
    54 | 55 | 56 |
    57 | 60 |
    61 | 62 | 66 |
    67 |
    68 |
    69 |
    interactive_input::buttonData Member List
    70 |
    71 |
    72 | 73 |

    This is the complete list of members for interactive_input::buttonData, including all inherited members.

    74 | 75 | 76 |
    action (defined in interactive_input::buttonData)interactive_input::buttonData
    77 | 78 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /docs/html/structinteractive__input_1_1button_data.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Mixer Interactive C++ SDK: interactive_input::buttonData Struct Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 | 21 | 22 | 23 | 27 | 28 | 29 |
    24 |
    Mixer Interactive C++ SDK 25 |
    26 |
    30 |
    31 | 32 | 33 | 38 | 39 | 40 | 47 | 48 | 49 |
    53 |
    54 | 55 | 56 |
    57 | 60 |
    61 | 62 | 66 |
    67 |
    68 | 71 |
    72 |
    interactive_input::buttonData Struct Reference
    73 |
    74 |
    75 | 76 | 78 | 80 | 81 |

    77 | Public Attributes

    79 | interactive_button_action action
     
    82 |
    The documentation for this struct was generated from the following file: 85 |
    86 | 87 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /docs/html/structinteractive__input_1_1coordinate_data-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Mixer Interactive C++ SDK: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 | 21 | 22 | 23 | 27 | 28 | 29 |
    24 |
    Mixer Interactive C++ SDK 25 |
    26 |
    30 |
    31 | 32 | 33 | 38 | 39 | 40 | 47 | 48 | 49 |
    53 |
    54 | 55 | 56 |
    57 | 60 |
    61 | 62 | 66 |
    67 |
    68 |
    69 |
    interactive_input::coordinateData Member List
    70 |
    71 |
    72 | 73 |

    This is the complete list of members for interactive_input::coordinateData, including all inherited members.

    74 | 75 | 76 | 77 |
    x (defined in interactive_input::coordinateData)interactive_input::coordinateData
    y (defined in interactive_input::coordinateData)interactive_input::coordinateData
    78 | 79 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /docs/html/structinteractive__object-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Mixer Interactive C++ SDK: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 | 21 | 22 | 23 | 27 | 28 | 29 |
    24 |
    Mixer Interactive C++ SDK 25 |
    26 |
    30 |
    31 | 32 | 33 | 38 | 39 | 40 | 47 | 48 | 49 |
    53 |
    54 | 55 | 56 |
    57 | 60 |
    61 | 62 |
    63 |
    64 |
    65 |
    interactive_object Member List
    66 |
    67 |
    68 | 69 |

    This is the complete list of members for interactive_object, including all inherited members.

    70 | 71 | 72 | 73 |
    id (defined in interactive_object)interactive_object
    idLength (defined in interactive_object)interactive_object
    74 | 75 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/html/structinteractive__object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/structinteractive__object.png -------------------------------------------------------------------------------- /docs/html/structinteractive__participant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/structinteractive__participant.png -------------------------------------------------------------------------------- /docs/html/structinteractive__scene-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Mixer Interactive C++ SDK: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 | 21 | 22 | 23 | 27 | 28 | 29 |
    24 |
    Mixer Interactive C++ SDK 25 |
    26 |
    30 |
    31 | 32 | 33 | 38 | 39 | 40 | 47 | 48 | 49 |
    53 |
    54 | 55 | 56 |
    57 | 60 |
    61 | 62 |
    63 |
    64 |
    65 |
    interactive_scene Member List
    66 |
    67 |
    68 | 69 |

    This is the complete list of members for interactive_scene, including all inherited members.

    70 | 71 | 72 | 73 |
    id (defined in interactive_object)interactive_object
    idLength (defined in interactive_object)interactive_object
    74 | 75 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/html/structinteractive__scene.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/structinteractive__scene.png -------------------------------------------------------------------------------- /docs/html/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/sync_off.png -------------------------------------------------------------------------------- /docs/html/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/sync_on.png -------------------------------------------------------------------------------- /docs/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/tab_a.png -------------------------------------------------------------------------------- /docs/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/tab_b.png -------------------------------------------------------------------------------- /docs/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/tab_h.png -------------------------------------------------------------------------------- /docs/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/docs/html/tab_s.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Page Redirection 7 | 8 | 9 | If you are not redirected automatically, 10 | follow the link to the documentation 11 | 12 | -------------------------------------------------------------------------------- /samples/InteractiveSample/InteractiveSample.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2027 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InteractiveSample", "InteractiveSample.vcxproj", "{C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Debug|x64.ActiveCfg = Debug|x64 17 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Debug|x64.Build.0 = Debug|x64 18 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Debug|x86.ActiveCfg = Debug|Win32 19 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Debug|x86.Build.0 = Debug|Win32 20 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Release|x64.ActiveCfg = Release|x64 21 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Release|x64.Build.0 = Release|x64 22 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Release|x86.ActiveCfg = Release|Win32 23 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {5E3E1863-FD46-4254-AAC5-F8407D8E6BBC} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /samples/InteractiveSample/InteractiveSample.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | -------------------------------------------------------------------------------- /samples/InteractiveSample/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveSample/stdafx.cpp -------------------------------------------------------------------------------- /samples/InteractiveSample/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveSample/stdafx.h -------------------------------------------------------------------------------- /samples/InteractiveSample/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveSample/targetver.h -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/App.xaml.h: -------------------------------------------------------------------------------- 1 | // 2 | // App.xaml.h 3 | // Declaration of the App class. 4 | // 5 | 6 | #pragma once 7 | 8 | #include "App.g.h" 9 | 10 | #include 11 | 12 | namespace InteractiveSampleUWP 13 | { 14 | /// 15 | /// Provides application-specific behavior to supplement the default Application class. 16 | /// 17 | ref class App sealed 18 | { 19 | protected: 20 | virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override; 21 | 22 | internal: 23 | App(); 24 | 25 | private: 26 | void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e); 27 | void OnNavigationFailed(Platform::Object ^sender, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs ^e); 28 | bool m_appIsRunning; 29 | std::unique_ptr m_interactiveThread; 30 | std::map m_controlsByTransaction; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/StoreLogo.png -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveSampleUWP/InteractiveSampleUWP/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/InteractiveSampleUWP.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27004.2002 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InteractiveSampleUWP", "InteractiveSampleUWP.vcxproj", "{AA40D149-671E-4481-83B1-0BC61E6E7310}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|ARM = Debug|ARM 11 | Debug|x64 = Debug|x64 12 | Debug|x86 = Debug|x86 13 | Release|ARM = Release|ARM 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Debug|ARM.ActiveCfg = Debug|ARM 19 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Debug|ARM.Build.0 = Debug|ARM 20 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Debug|ARM.Deploy.0 = Debug|ARM 21 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Debug|x64.ActiveCfg = Debug|x64 22 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Debug|x64.Build.0 = Debug|x64 23 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Debug|x64.Deploy.0 = Debug|x64 24 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Debug|x86.ActiveCfg = Debug|Win32 25 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Debug|x86.Build.0 = Debug|Win32 26 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Debug|x86.Deploy.0 = Debug|Win32 27 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Release|ARM.ActiveCfg = Release|ARM 28 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Release|ARM.Build.0 = Release|ARM 29 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Release|ARM.Deploy.0 = Release|ARM 30 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Release|x64.ActiveCfg = Release|x64 31 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Release|x64.Build.0 = Release|x64 32 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Release|x64.Deploy.0 = Release|x64 33 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Release|x86.ActiveCfg = Release|Win32 34 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Release|x86.Build.0 = Release|Win32 35 | {AA40D149-671E-4481-83B1-0BC61E6E7310}.Release|x86.Deploy.0 = Release|Win32 36 | EndGlobalSection 37 | GlobalSection(SolutionProperties) = preSolution 38 | HideSolutionNode = FALSE 39 | EndGlobalSection 40 | GlobalSection(ExtensibilityGlobals) = postSolution 41 | SolutionGuid = {B6B96259-D865-4841-96A3-5A7EB59ED8B4} 42 | EndGlobalSection 43 | EndGlobal 44 | -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/InteractiveSampleUWP.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | aa40d149-671e-4481-83b1-0bc61e6e7310 6 | 7 | 8 | 186967d5-a6b0-4882-a117-4151af5208ac 9 | bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | Assets 29 | 30 | 31 | Assets 32 | 33 | 34 | Assets 35 | 36 | 37 | Assets 38 | 39 | 40 | Assets 41 | 42 | 43 | Assets 44 | 45 | 46 | Assets 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/InteractiveSampleUWP_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveSampleUWP/InteractiveSampleUWP/InteractiveSampleUWP_TemporaryKey.pfx -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/MainPage.xaml.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // MainPage.xaml.cpp 3 | // Implementation of the MainPage class. 4 | // 5 | 6 | #include "pch.h" 7 | #include "MainPage.xaml.h" 8 | 9 | using namespace InteractiveSampleUWP; 10 | 11 | using namespace Platform; 12 | using namespace Windows::Foundation; 13 | using namespace Windows::Foundation::Collections; 14 | using namespace Windows::UI::Xaml; 15 | using namespace Windows::UI::Xaml::Controls; 16 | using namespace Windows::UI::Xaml::Controls::Primitives; 17 | using namespace Windows::UI::Xaml::Data; 18 | using namespace Windows::UI::Xaml::Input; 19 | using namespace Windows::UI::Xaml::Media; 20 | using namespace Windows::UI::Xaml::Navigation; 21 | 22 | // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 23 | 24 | MainPage::MainPage() 25 | { 26 | InitializeComponent(); 27 | } 28 | -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/MainPage.xaml.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainPage.xaml.h 3 | // Declaration of the MainPage class. 4 | // 5 | 6 | #pragma once 7 | 8 | #include "MainPage.g.h" 9 | 10 | namespace InteractiveSampleUWP 11 | { 12 | /// 13 | /// An empty page that can be used on its own or navigated to within a Frame. 14 | /// 15 | public ref class MainPage sealed 16 | { 17 | public: 18 | MainPage(); 19 | 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | InteractiveSampleUWP 18 | jsnider 19 | Assets\StoreLogo.png 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/pch.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // pch.cpp 3 | // Include the standard header and generate the precompiled header. 4 | // 5 | 6 | #include "pch.h" 7 | -------------------------------------------------------------------------------- /samples/InteractiveSampleUWP/InteractiveSampleUWP/pch.h: -------------------------------------------------------------------------------- 1 | // 2 | // pch.h 3 | // Header for standard system include files. 4 | // 5 | 6 | #pragma once 7 | 8 | #include 9 | #include 10 | 11 | #include "App.xaml.h" 12 | -------------------------------------------------------------------------------- /samples/InteractiveScreenControlSample/InteractiveSample.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | -------------------------------------------------------------------------------- /samples/InteractiveScreenControlSample/InteractiveScreenControlSample.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InteractiveScreenControlSample", "InteractiveSample.vcxproj", "{C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Debug|x64.ActiveCfg = Debug|x64 17 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Debug|x64.Build.0 = Debug|x64 18 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Debug|x86.ActiveCfg = Debug|Win32 19 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Debug|x86.Build.0 = Debug|Win32 20 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Release|x64.ActiveCfg = Release|x64 21 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Release|x64.Build.0 = Release|x64 22 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Release|x86.ActiveCfg = Release|Win32 23 | {C5D30411-CECD-48B1-9B9C-3C86A1ACD2FA}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {5E3E1863-FD46-4254-AAC5-F8407D8E6BBC} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /samples/InteractiveScreenControlSample/InteractiveScreenControlSample.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | -------------------------------------------------------------------------------- /samples/InteractiveScreenControlSample/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveScreenControlSample/stdafx.cpp -------------------------------------------------------------------------------- /samples/InteractiveScreenControlSample/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveScreenControlSample/stdafx.h -------------------------------------------------------------------------------- /samples/InteractiveScreenControlSample/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveScreenControlSample/targetver.h -------------------------------------------------------------------------------- /samples/InteractiveXboxSample/Game.h: -------------------------------------------------------------------------------- 1 | // 2 | // Game.h 3 | // 4 | 5 | #pragma once 6 | 7 | #include "StepTimer.h" 8 | #include "../../source/interactivity.h" 9 | 10 | #include 11 | #include 12 | 13 | // A basic game implementation that creates a D3D11 device and 14 | // provides a game loop. 15 | class Game 16 | { 17 | public: 18 | 19 | Game(); 20 | 21 | // Initialization and management 22 | void Initialize(IUnknown* window); 23 | 24 | // Basic game loop 25 | void Tick(); 26 | 27 | // Messages 28 | void OnSuspending(); 29 | void OnResuming(); 30 | 31 | private: 32 | 33 | void Update(DX::StepTimer const& timer); 34 | void Render(); 35 | 36 | void Clear(); 37 | void Present(); 38 | 39 | void CreateDevice(); 40 | void CreateResources(); 41 | 42 | // Application state 43 | IUnknown* m_window; 44 | int m_outputWidth; 45 | int m_outputHeight; 46 | 47 | // Direct3D Objects 48 | D3D_FEATURE_LEVEL m_featureLevel; 49 | Microsoft::WRL::ComPtr m_d3dDevice; 50 | Microsoft::WRL::ComPtr m_d3dContext; 51 | 52 | // Rendering resources 53 | Microsoft::WRL::ComPtr m_swapChain; 54 | Microsoft::WRL::ComPtr m_renderTargetView; 55 | Microsoft::WRL::ComPtr m_depthStencilView; 56 | 57 | // Game state 58 | uint64_t m_frame; 59 | DX::StepTimer m_timer; 60 | 61 | // Mixer interactive session 62 | public: 63 | interactive_session m_interactiveSession; 64 | std::map m_controlsById; 65 | }; 66 | 67 | // PIX event colors 68 | const DWORD EVT_COLOR_FRAME = PIX_COLOR_INDEX(1); 69 | const DWORD EVT_COLOR_UPDATE = PIX_COLOR_INDEX(2); 70 | const DWORD EVT_COLOR_RENDER = PIX_COLOR_INDEX(3); 71 | -------------------------------------------------------------------------------- /samples/InteractiveXboxSample/InteractiveXboxSample.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InteractiveXboxSample", "InteractiveXboxSample.vcxproj", "{E9755159-F6BB-4BB0-BDF2-0895D2FE575F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Durango = Debug|Durango 11 | Profile|Durango = Profile|Durango 12 | Release|Durango = Release|Durango 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {E9755159-F6BB-4BB0-BDF2-0895D2FE575F}.Debug|Durango.ActiveCfg = Debug|Durango 16 | {E9755159-F6BB-4BB0-BDF2-0895D2FE575F}.Debug|Durango.Build.0 = Debug|Durango 17 | {E9755159-F6BB-4BB0-BDF2-0895D2FE575F}.Debug|Durango.Deploy.0 = Debug|Durango 18 | {E9755159-F6BB-4BB0-BDF2-0895D2FE575F}.Profile|Durango.ActiveCfg = Profile|Durango 19 | {E9755159-F6BB-4BB0-BDF2-0895D2FE575F}.Profile|Durango.Build.0 = Profile|Durango 20 | {E9755159-F6BB-4BB0-BDF2-0895D2FE575F}.Profile|Durango.Deploy.0 = Profile|Durango 21 | {E9755159-F6BB-4BB0-BDF2-0895D2FE575F}.Release|Durango.ActiveCfg = Release|Durango 22 | {E9755159-F6BB-4BB0-BDF2-0895D2FE575F}.Release|Durango.Build.0 = Release|Durango 23 | {E9755159-F6BB-4BB0-BDF2-0895D2FE575F}.Release|Durango.Deploy.0 = Release|Durango 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {F249CBE5-1A45-44BC-B58D-42F812159147} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /samples/InteractiveXboxSample/InteractiveXboxSample.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | f7c7280b-1060-4008-b11b-79f5449266a2 6 | 7 | 8 | 4dfb77ca-e8cd-475d-bffa-326056ab8ef7 9 | bmp;dds;fbx;gif;jpg;jpeg;tga;tiff;tif;png 10 | 11 | 12 | 13 | 14 | 15 | 16 | Common 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | Assets 31 | 32 | 33 | Assets 34 | 35 | 36 | Assets 37 | 38 | 39 | Assets 40 | 41 | 42 | Assets 43 | 44 | 45 | -------------------------------------------------------------------------------- /samples/InteractiveXboxSample/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveXboxSample/Logo.png -------------------------------------------------------------------------------- /samples/InteractiveXboxSample/Main.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Main.cpp 3 | // 4 | 5 | #include "pch.h" 6 | #include "Game.h" 7 | 8 | #include 9 | 10 | using namespace concurrency; 11 | using namespace Windows::ApplicationModel; 12 | using namespace Windows::ApplicationModel::Core; 13 | using namespace Windows::ApplicationModel::Activation; 14 | using namespace Windows::UI::Core; 15 | using namespace Windows::Foundation; 16 | using namespace DirectX; 17 | 18 | ref class ViewProvider sealed : public IFrameworkView 19 | { 20 | public: 21 | ViewProvider() : 22 | m_exit(false) 23 | { 24 | } 25 | 26 | // IFrameworkView methods 27 | virtual void Initialize(CoreApplicationView^ applicationView) 28 | { 29 | applicationView->Activated += 30 | ref new TypedEventHandler(this, &ViewProvider::OnActivated); 31 | 32 | CoreApplication::Suspending += 33 | ref new EventHandler(this, &ViewProvider::OnSuspending); 34 | 35 | CoreApplication::Resuming += 36 | ref new EventHandler(this, &ViewProvider::OnResuming); 37 | 38 | CoreApplication::DisableKinectGpuReservation = true; 39 | 40 | m_game = std::make_unique(); 41 | } 42 | 43 | virtual void Uninitialize() 44 | { 45 | m_game.reset(); 46 | } 47 | 48 | virtual void SetWindow(CoreWindow^ window) 49 | { 50 | window->Closed += 51 | ref new TypedEventHandler(this, &ViewProvider::OnWindowClosed); 52 | 53 | m_game->Initialize(reinterpret_cast(window)); 54 | } 55 | 56 | virtual void Load(Platform::String^ entryPoint) 57 | { 58 | } 59 | 60 | virtual void Run() 61 | { 62 | while (!m_exit) 63 | { 64 | m_game->Tick(); 65 | 66 | CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessAllIfPresent); 67 | } 68 | } 69 | 70 | protected: 71 | // Event handlers 72 | void OnActivated(CoreApplicationView^ applicationView, IActivatedEventArgs^ args) 73 | { 74 | CoreWindow::GetForCurrentThread()->Activate(); 75 | } 76 | 77 | void OnSuspending(Platform::Object^ sender, SuspendingEventArgs^ args) 78 | { 79 | auto deferral = args->SuspendingOperation->GetDeferral(); 80 | 81 | create_task([this, deferral]() 82 | { 83 | m_game->OnSuspending(); 84 | 85 | deferral->Complete(); 86 | }); 87 | } 88 | 89 | void OnResuming(Platform::Object^ sender, Platform::Object^ args) 90 | { 91 | m_game->OnResuming(); 92 | } 93 | 94 | void OnWindowClosed(CoreWindow^ sender, CoreWindowEventArgs^ args) 95 | { 96 | m_exit = true; 97 | } 98 | 99 | private: 100 | bool m_exit; 101 | std::unique_ptr m_game; 102 | }; 103 | 104 | ref class ViewProviderFactory : IFrameworkViewSource 105 | { 106 | public: 107 | virtual IFrameworkView^ CreateView() 108 | { 109 | return ref new ViewProvider(); 110 | } 111 | }; 112 | 113 | 114 | // Entry point 115 | [Platform::MTAThread] 116 | int __cdecl main(Platform::Array^ /*argv*/) 117 | { 118 | auto viewProviderFactory = ref new ViewProviderFactory(); 119 | CoreApplication::Run(viewProviderFactory); 120 | return 0; 121 | } 122 | -------------------------------------------------------------------------------- /samples/InteractiveXboxSample/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 11 | InteractiveXboxSample 12 | PublisherDisplayName 13 | StoreLogo.png 14 | InteractiveXboxSample 15 | 16 | 17 | 18 | 6.2 19 | 6.2 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | variable 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /samples/InteractiveXboxSample/SmallLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveXboxSample/SmallLogo.png -------------------------------------------------------------------------------- /samples/InteractiveXboxSample/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveXboxSample/SplashScreen.png -------------------------------------------------------------------------------- /samples/InteractiveXboxSample/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveXboxSample/StoreLogo.png -------------------------------------------------------------------------------- /samples/InteractiveXboxSample/WideLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mixer/interactive-cpp/141ad976e8d05927325158b305b900edc55b5d1d/samples/InteractiveXboxSample/WideLogo.png -------------------------------------------------------------------------------- /samples/InteractiveXboxSample/pch.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // pch.cpp 3 | // Include the standard header and generate the precompiled header. 4 | // 5 | 6 | #include "pch.h" 7 | -------------------------------------------------------------------------------- /samples/InteractiveXboxSample/pch.h: -------------------------------------------------------------------------------- 1 | // 2 | // pch.h 3 | // Header for standard system include files. 4 | // 5 | 6 | #pragma once 7 | 8 | // Use the C++ standard templated min/max 9 | #define NOMINMAX 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | 20 | #include 21 | 22 | namespace DX 23 | { 24 | inline void ThrowIfFailed(HRESULT hr) 25 | { 26 | if (FAILED(hr)) 27 | { 28 | // Set a breakpoint on this line to catch DirectX API errors 29 | throw Platform::Exception::CreateException(hr); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /source/interactivity.cpp: -------------------------------------------------------------------------------- 1 | #include "internal/common.cpp" 2 | #include "internal/http_client.cpp" 3 | #include "internal/interactive_auth.cpp" 4 | #include "internal/interactive_control.cpp" 5 | #include "internal/interactive_event.cpp" 6 | #include "internal/interactive_group.cpp" 7 | #include "internal/interactive_participant.cpp" 8 | #include "internal/interactive_scene.cpp" 9 | #include "internal/interactive_session.cpp" 10 | #include "internal/interactive_session_internal.cpp" 11 | #if _DURANGO || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP 12 | #include "internal/winapp_http_client.cpp" 13 | #include "internal/winapp_websocket.cpp" 14 | #elif _WIN32 15 | #include "internal/win_dll.cpp" 16 | #include "internal/win_http_api.cpp" 17 | #include "internal/win_http_client.cpp" 18 | #include "internal/win_websocket.cpp" 19 | #endif -------------------------------------------------------------------------------- /source/internal/common.cpp: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "json.h" 3 | #include "debugging.h" 4 | 5 | #include "rapidjson\stringbuffer.h" 6 | #include "rapidjson\writer.h" 7 | 8 | #include 9 | 10 | namespace mixer_internal 11 | { 12 | 13 | // String conversion functions 14 | std::wstring utf8_to_wstring(const std::string& str) 15 | { 16 | std::wstring_convert> conv; 17 | return conv.from_bytes(str); 18 | } 19 | 20 | std::string wstring_to_utf8(const std::wstring& wstr) 21 | { 22 | std::wstring_convert> conv; 23 | return conv.to_bytes(wstr); 24 | } 25 | 26 | // JSON 27 | 28 | std::string jsonStringify(rapidjson::Value& value) 29 | { 30 | rapidjson::StringBuffer buffer; 31 | rapidjson::Writer writer(buffer); 32 | value.Accept(writer); 33 | return std::string(buffer.GetString(), buffer.GetSize()); 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /source/internal/common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #define RETURN_IF_FAILED(x) do { int __err_c = x; if(0 != __err_c) return __err_c; } while(0) 7 | 8 | namespace mixer_internal 9 | { 10 | 11 | // String conversion functions 12 | std::wstring utf8_to_wstring(const std::string& str); 13 | std::string wstring_to_utf8(const std::wstring& wstr); 14 | 15 | #if _DURANGO || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP 16 | #elif _WIN32 17 | // WinHttp common 18 | 19 | struct hinternet_deleter 20 | { 21 | void operator()(void* internet); 22 | }; 23 | 24 | typedef std::unique_ptr hinternet_ptr; 25 | 26 | #endif 27 | 28 | } -------------------------------------------------------------------------------- /source/internal/debugging.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "interactivity.h" 3 | 4 | namespace mixer_internal 5 | { 6 | 7 | static on_debug_msg g_dbgInteractiveCallback = nullptr; 8 | static interactive_debug_level g_dbgInteractiveLevel = interactive_debug_none; 9 | 10 | #define _DEBUG_IF_LEVEL(x, y) do { if (y <= g_dbgInteractiveLevel && nullptr != g_dbgInteractiveCallback) { g_dbgInteractiveCallback(y, std::string(x).c_str(), std::string(x).length()); } } while (0) 11 | #define DEBUG_ERROR(x) _DEBUG_IF_LEVEL(x, interactive_debug_error) 12 | #define DEBUG_WARNING(x) _DEBUG_IF_LEVEL(x, interactive_debug_warning) 13 | #define DEBUG_INFO(x) _DEBUG_IF_LEVEL(x, interactive_debug_info) 14 | #define DEBUG_TRACE(x) _DEBUG_IF_LEVEL(x, interactive_debug_trace) 15 | 16 | } -------------------------------------------------------------------------------- /source/internal/http_client.cpp: -------------------------------------------------------------------------------- 1 | #include "http_client.h" 2 | 3 | #if _DURANGO || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP 4 | #include "winapp_http_client.h" 5 | #elif _WIN32 6 | #include "win_http_client.h" 7 | #endif 8 | namespace mixer_internal 9 | { 10 | std::unique_ptr 11 | http_factory::make_http_client() 12 | { 13 | #if _DURANGO || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP 14 | return std::make_unique(); 15 | #elif _WIN32 16 | return std::make_unique(); 17 | #else 18 | #error "Missing http implementation for this platform." 19 | #endif 20 | } 21 | } -------------------------------------------------------------------------------- /source/internal/http_client.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace mixer_internal 8 | { 9 | 10 | typedef std::map http_headers; 11 | 12 | struct http_response 13 | { 14 | unsigned int statusCode; 15 | std::string body; 16 | }; 17 | 18 | class http_client 19 | { 20 | public: 21 | virtual ~http_client() = 0 {}; 22 | 23 | // Make an http request with optional headers 24 | virtual int make_request(const std::string& uri, const std::string& requestType, const http_headers* headers, const std::string& body, _Out_ http_response& response, unsigned long timeoutMs = 5000) const = 0; 25 | }; 26 | 27 | class http_factory 28 | { 29 | public: 30 | static std::unique_ptr make_http_client(); 31 | }; 32 | 33 | } -------------------------------------------------------------------------------- /source/internal/interactive_event.cpp: -------------------------------------------------------------------------------- 1 | #include "interactive_event.h" 2 | 3 | namespace mixer_internal 4 | { 5 | 6 | bool compare_event_priority::operator()(const std::shared_ptr left, const std::shared_ptr right) 7 | { 8 | return left->type > right->type; 9 | } 10 | 11 | interactive_event_internal::interactive_event_internal(interactive_event_type type) : type(type) {} 12 | 13 | rpc_method_event::rpc_method_event(std::shared_ptr&& methodJson) : interactive_event_internal(interactive_event_type_rpc_method), methodJson(methodJson) {} 14 | 15 | rpc_reply_event::rpc_reply_event(const unsigned int id, std::shared_ptr&& replyJson, const method_handler replyHandler) : interactive_event_internal(interactive_event_type_rpc_reply), id(id), replyJson(replyJson), replyHandler(replyHandler) {} 16 | 17 | http_request_event::http_request_event(const uint32_t packetId, const std::string& uri, const std::string& verb, const http_headers* headers, const std::string* body) : 18 | interactive_event_internal(interactive_event_type_http_request), packetId(packetId), uri(uri), verb(verb), headers(nullptr == headers ? http_headers() : *headers), body(nullptr == body ? std::string() : *body) 19 | { 20 | } 21 | 22 | http_response_event::http_response_event(http_response&& response, const http_response_handler handler) : interactive_event_internal(interactive_event_type_http_response), response(response), responseHandler(handler) {} 23 | 24 | error_event::error_event(const interactive_error error) : interactive_event_internal(interactive_event_type_error), error(error) {} 25 | 26 | state_change_event::state_change_event(interactive_state currentState) : interactive_event_internal(interactive_event_type_state_change), currentState(currentState) {} 27 | 28 | } -------------------------------------------------------------------------------- /source/internal/interactive_event.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "common.h" 3 | #include "rapidjson\document.h" 4 | #include "http_client.h" 5 | #include "interactive_types.h" 6 | 7 | namespace mixer_internal 8 | { 9 | 10 | // Interactive event types in priority order. 11 | enum interactive_event_type 12 | { 13 | interactive_event_type_error, 14 | interactive_event_type_state_change, 15 | interactive_event_type_http_response, 16 | interactive_event_type_http_request, 17 | interactive_event_type_rpc_reply, 18 | interactive_event_type_rpc_method, 19 | }; 20 | 21 | struct interactive_event_internal 22 | { 23 | const interactive_event_type type; 24 | interactive_event_internal(const interactive_event_type type); 25 | }; 26 | 27 | struct compare_event_priority 28 | { 29 | bool operator()(const std::shared_ptr left, const std::shared_ptr right); 30 | }; 31 | 32 | struct rpc_method_event : interactive_event_internal 33 | { 34 | const std::shared_ptr methodJson; 35 | rpc_method_event(std::shared_ptr&& methodJson); 36 | }; 37 | 38 | struct rpc_reply_event : interactive_event_internal 39 | { 40 | const unsigned int id; 41 | const std::shared_ptr replyJson; 42 | const method_handler replyHandler; 43 | rpc_reply_event(const unsigned int id, std::shared_ptr&& replyJson, const method_handler handler); 44 | }; 45 | 46 | struct http_request_event : interactive_event_internal 47 | { 48 | const uint32_t packetId; 49 | const std::string uri; 50 | const std::string verb; 51 | const std::map headers; 52 | const std::string body; 53 | http_request_event(const uint32_t packetId, const std::string& uri, const std::string& verb, const http_headers* headers, const std::string* body); 54 | }; 55 | 56 | struct http_response_event : interactive_event_internal 57 | { 58 | const http_response response; 59 | const http_response_handler responseHandler; 60 | http_response_event(http_response&&, const http_response_handler); 61 | }; 62 | 63 | typedef std::pair interactive_error; 64 | 65 | struct error_event : interactive_event_internal 66 | { 67 | const interactive_error error; 68 | error_event(const interactive_error error); 69 | }; 70 | 71 | struct state_change_event : interactive_event_internal 72 | { 73 | const interactive_state currentState; 74 | state_change_event(interactive_state currentState); 75 | }; 76 | 77 | } -------------------------------------------------------------------------------- /source/internal/interactive_types.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "rapidjson\document.h" 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace mixer_internal 10 | { 11 | 12 | struct interactive_session_internal; 13 | struct interactive_event_internal; 14 | 15 | struct interactive_object_internal 16 | { 17 | const std::string id; 18 | interactive_object_internal(std::string id); 19 | }; 20 | 21 | struct interactive_control_pointer 22 | { 23 | const std::string sceneId; 24 | const std::string cachePointer; 25 | interactive_control_pointer(std::string sceneId, std::string cachePointer); 26 | }; 27 | 28 | struct interactive_control_internal : public interactive_object_internal 29 | { 30 | const std::string kind; 31 | interactive_control_internal(std::string id, std::string kind); 32 | }; 33 | 34 | struct interactive_group_internal : public interactive_object_internal 35 | { 36 | const std::string scene; 37 | interactive_group_internal(std::string id, std::string scene); 38 | }; 39 | 40 | struct compare_event_priority; 41 | typedef std::priority_queue, std::vector>, compare_event_priority> interactive_event_queue; 42 | 43 | typedef std::map scenes_by_id; 44 | typedef std::map scenes_by_group; 45 | typedef std::map controls_by_id; 46 | typedef std::map> participants_by_id; 47 | typedef std::function method_handler; 48 | typedef std::map method_handlers_by_method; 49 | typedef std::map> reply_handlers_by_id; 50 | typedef std::function http_response_handler; 51 | 52 | } -------------------------------------------------------------------------------- /source/internal/json.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef RAPIDJSON_HAS_STDSTRING 4 | #define RAPIDJSON_HAS_STDSTRING 1 5 | #elif RAPIDJSON_HAS_STDSTRING == 0 6 | #error "Mixer interactivity requires std::string for json parsing." 7 | #endif 8 | #include "rapidjson\document.h" 9 | 10 | namespace mixer_internal 11 | { 12 | 13 | std::string jsonStringify(rapidjson::Value& doc); 14 | 15 | } -------------------------------------------------------------------------------- /source/internal/rapidjson/error/en.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_ERROR_EN_H_ 16 | #define RAPIDJSON_ERROR_EN_H_ 17 | 18 | #include "error.h" 19 | 20 | #ifdef __clang__ 21 | RAPIDJSON_DIAG_PUSH 22 | RAPIDJSON_DIAG_OFF(switch-enum) 23 | RAPIDJSON_DIAG_OFF(covered-switch-default) 24 | #endif 25 | 26 | RAPIDJSON_NAMESPACE_BEGIN 27 | 28 | //! Maps error code of parsing into error message. 29 | /*! 30 | \ingroup RAPIDJSON_ERRORS 31 | \param parseErrorCode Error code obtained in parsing. 32 | \return the error message. 33 | \note User can make a copy of this function for localization. 34 | Using switch-case is safer for future modification of error codes. 35 | */ 36 | inline const RAPIDJSON_ERROR_CHARTYPE* GetParseError_En(ParseErrorCode parseErrorCode) { 37 | switch (parseErrorCode) { 38 | case kParseErrorNone: return RAPIDJSON_ERROR_STRING("No error."); 39 | 40 | case kParseErrorDocumentEmpty: return RAPIDJSON_ERROR_STRING("The document is empty."); 41 | case kParseErrorDocumentRootNotSingular: return RAPIDJSON_ERROR_STRING("The document root must not be followed by other values."); 42 | 43 | case kParseErrorValueInvalid: return RAPIDJSON_ERROR_STRING("Invalid value."); 44 | 45 | case kParseErrorObjectMissName: return RAPIDJSON_ERROR_STRING("Missing a name for object member."); 46 | case kParseErrorObjectMissColon: return RAPIDJSON_ERROR_STRING("Missing a colon after a name of object member."); 47 | case kParseErrorObjectMissCommaOrCurlyBracket: return RAPIDJSON_ERROR_STRING("Missing a comma or '}' after an object member."); 48 | 49 | case kParseErrorArrayMissCommaOrSquareBracket: return RAPIDJSON_ERROR_STRING("Missing a comma or ']' after an array element."); 50 | 51 | case kParseErrorStringUnicodeEscapeInvalidHex: return RAPIDJSON_ERROR_STRING("Incorrect hex digit after \\u escape in string."); 52 | case kParseErrorStringUnicodeSurrogateInvalid: return RAPIDJSON_ERROR_STRING("The surrogate pair in string is invalid."); 53 | case kParseErrorStringEscapeInvalid: return RAPIDJSON_ERROR_STRING("Invalid escape character in string."); 54 | case kParseErrorStringMissQuotationMark: return RAPIDJSON_ERROR_STRING("Missing a closing quotation mark in string."); 55 | case kParseErrorStringInvalidEncoding: return RAPIDJSON_ERROR_STRING("Invalid encoding in string."); 56 | 57 | case kParseErrorNumberTooBig: return RAPIDJSON_ERROR_STRING("Number too big to be stored in double."); 58 | case kParseErrorNumberMissFraction: return RAPIDJSON_ERROR_STRING("Miss fraction part in number."); 59 | case kParseErrorNumberMissExponent: return RAPIDJSON_ERROR_STRING("Miss exponent in number."); 60 | 61 | case kParseErrorTermination: return RAPIDJSON_ERROR_STRING("Terminate parsing due to Handler error."); 62 | case kParseErrorUnspecificSyntaxError: return RAPIDJSON_ERROR_STRING("Unspecific syntax error."); 63 | 64 | default: return RAPIDJSON_ERROR_STRING("Unknown error."); 65 | } 66 | } 67 | 68 | RAPIDJSON_NAMESPACE_END 69 | 70 | #ifdef __clang__ 71 | RAPIDJSON_DIAG_POP 72 | #endif 73 | 74 | #endif // RAPIDJSON_ERROR_EN_H_ 75 | -------------------------------------------------------------------------------- /source/internal/rapidjson/filereadstream.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_FILEREADSTREAM_H_ 16 | #define RAPIDJSON_FILEREADSTREAM_H_ 17 | 18 | #include "stream.h" 19 | #include 20 | 21 | #ifdef __clang__ 22 | RAPIDJSON_DIAG_PUSH 23 | RAPIDJSON_DIAG_OFF(padded) 24 | RAPIDJSON_DIAG_OFF(unreachable-code) 25 | RAPIDJSON_DIAG_OFF(missing-noreturn) 26 | #endif 27 | 28 | RAPIDJSON_NAMESPACE_BEGIN 29 | 30 | //! File byte stream for input using fread(). 31 | /*! 32 | \note implements Stream concept 33 | */ 34 | class FileReadStream { 35 | public: 36 | typedef char Ch; //!< Character type (byte). 37 | 38 | //! Constructor. 39 | /*! 40 | \param fp File pointer opened for read. 41 | \param buffer user-supplied buffer. 42 | \param bufferSize size of buffer in bytes. Must >=4 bytes. 43 | */ 44 | FileReadStream(std::FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), bufferSize_(bufferSize), bufferLast_(0), current_(buffer_), readCount_(0), count_(0), eof_(false) { 45 | RAPIDJSON_ASSERT(fp_ != 0); 46 | RAPIDJSON_ASSERT(bufferSize >= 4); 47 | Read(); 48 | } 49 | 50 | Ch Peek() const { return *current_; } 51 | Ch Take() { Ch c = *current_; Read(); return c; } 52 | size_t Tell() const { return count_ + static_cast(current_ - buffer_); } 53 | 54 | // Not implemented 55 | void Put(Ch) { RAPIDJSON_ASSERT(false); } 56 | void Flush() { RAPIDJSON_ASSERT(false); } 57 | Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } 58 | size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } 59 | 60 | // For encoding detection only. 61 | const Ch* Peek4() const { 62 | return (current_ + 4 <= bufferLast_) ? current_ : 0; 63 | } 64 | 65 | private: 66 | void Read() { 67 | if (current_ < bufferLast_) 68 | ++current_; 69 | else if (!eof_) { 70 | count_ += readCount_; 71 | readCount_ = fread(buffer_, 1, bufferSize_, fp_); 72 | bufferLast_ = buffer_ + readCount_ - 1; 73 | current_ = buffer_; 74 | 75 | if (readCount_ < bufferSize_) { 76 | buffer_[readCount_] = '\0'; 77 | ++bufferLast_; 78 | eof_ = true; 79 | } 80 | } 81 | } 82 | 83 | std::FILE* fp_; 84 | Ch *buffer_; 85 | size_t bufferSize_; 86 | Ch *bufferLast_; 87 | Ch *current_; 88 | size_t readCount_; 89 | size_t count_; //!< Number of characters read 90 | bool eof_; 91 | }; 92 | 93 | RAPIDJSON_NAMESPACE_END 94 | 95 | #ifdef __clang__ 96 | RAPIDJSON_DIAG_POP 97 | #endif 98 | 99 | #endif // RAPIDJSON_FILESTREAM_H_ 100 | -------------------------------------------------------------------------------- /source/internal/rapidjson/filewritestream.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_FILEWRITESTREAM_H_ 16 | #define RAPIDJSON_FILEWRITESTREAM_H_ 17 | 18 | #include "stream.h" 19 | #include 20 | 21 | #ifdef __clang__ 22 | RAPIDJSON_DIAG_PUSH 23 | RAPIDJSON_DIAG_OFF(unreachable-code) 24 | #endif 25 | 26 | RAPIDJSON_NAMESPACE_BEGIN 27 | 28 | //! Wrapper of C file stream for input using fread(). 29 | /*! 30 | \note implements Stream concept 31 | */ 32 | class FileWriteStream { 33 | public: 34 | typedef char Ch; //!< Character type. Only support char. 35 | 36 | FileWriteStream(std::FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), bufferEnd_(buffer + bufferSize), current_(buffer_) { 37 | RAPIDJSON_ASSERT(fp_ != 0); 38 | } 39 | 40 | void Put(char c) { 41 | if (current_ >= bufferEnd_) 42 | Flush(); 43 | 44 | *current_++ = c; 45 | } 46 | 47 | void PutN(char c, size_t n) { 48 | size_t avail = static_cast(bufferEnd_ - current_); 49 | while (n > avail) { 50 | std::memset(current_, c, avail); 51 | current_ += avail; 52 | Flush(); 53 | n -= avail; 54 | avail = static_cast(bufferEnd_ - current_); 55 | } 56 | 57 | if (n > 0) { 58 | std::memset(current_, c, n); 59 | current_ += n; 60 | } 61 | } 62 | 63 | void Flush() { 64 | if (current_ != buffer_) { 65 | size_t result = fwrite(buffer_, 1, static_cast(current_ - buffer_), fp_); 66 | if (result < static_cast(current_ - buffer_)) { 67 | // failure deliberately ignored at this time 68 | // added to avoid warn_unused_result build errors 69 | } 70 | current_ = buffer_; 71 | } 72 | } 73 | 74 | // Not implemented 75 | char Peek() const { RAPIDJSON_ASSERT(false); return 0; } 76 | char Take() { RAPIDJSON_ASSERT(false); return 0; } 77 | size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; } 78 | char* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } 79 | size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; } 80 | 81 | private: 82 | // Prohibit copy constructor & assignment operator. 83 | FileWriteStream(const FileWriteStream&); 84 | FileWriteStream& operator=(const FileWriteStream&); 85 | 86 | std::FILE* fp_; 87 | char *buffer_; 88 | char *bufferEnd_; 89 | char *current_; 90 | }; 91 | 92 | //! Implement specialized version of PutN() with memset() for better performance. 93 | template<> 94 | inline void PutN(FileWriteStream& stream, char c, size_t n) { 95 | stream.PutN(c, n); 96 | } 97 | 98 | RAPIDJSON_NAMESPACE_END 99 | 100 | #ifdef __clang__ 101 | RAPIDJSON_DIAG_POP 102 | #endif 103 | 104 | #endif // RAPIDJSON_FILESTREAM_H_ 105 | -------------------------------------------------------------------------------- /source/internal/rapidjson/internal/ieee754.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_IEEE754_ 16 | #define RAPIDJSON_IEEE754_ 17 | 18 | #include "../rapidjson.h" 19 | 20 | RAPIDJSON_NAMESPACE_BEGIN 21 | namespace internal { 22 | 23 | class Double { 24 | public: 25 | Double() {} 26 | Double(double d) : d_(d) {} 27 | Double(uint64_t u) : u_(u) {} 28 | 29 | double Value() const { return d_; } 30 | uint64_t Uint64Value() const { return u_; } 31 | 32 | double NextPositiveDouble() const { 33 | RAPIDJSON_ASSERT(!Sign()); 34 | return Double(u_ + 1).Value(); 35 | } 36 | 37 | bool Sign() const { return (u_ & kSignMask) != 0; } 38 | uint64_t Significand() const { return u_ & kSignificandMask; } 39 | int Exponent() const { return static_cast(((u_ & kExponentMask) >> kSignificandSize) - kExponentBias); } 40 | 41 | bool IsNan() const { return (u_ & kExponentMask) == kExponentMask && Significand() != 0; } 42 | bool IsInf() const { return (u_ & kExponentMask) == kExponentMask && Significand() == 0; } 43 | bool IsNanOrInf() const { return (u_ & kExponentMask) == kExponentMask; } 44 | bool IsNormal() const { return (u_ & kExponentMask) != 0 || Significand() == 0; } 45 | bool IsZero() const { return (u_ & (kExponentMask | kSignificandMask)) == 0; } 46 | 47 | uint64_t IntegerSignificand() const { return IsNormal() ? Significand() | kHiddenBit : Significand(); } 48 | int IntegerExponent() const { return (IsNormal() ? Exponent() : kDenormalExponent) - kSignificandSize; } 49 | uint64_t ToBias() const { return (u_ & kSignMask) ? ~u_ + 1 : u_ | kSignMask; } 50 | 51 | static unsigned EffectiveSignificandSize(int order) { 52 | if (order >= -1021) 53 | return 53; 54 | else if (order <= -1074) 55 | return 0; 56 | else 57 | return static_cast(order) + 1074; 58 | } 59 | 60 | private: 61 | static const int kSignificandSize = 52; 62 | static const int kExponentBias = 0x3FF; 63 | static const int kDenormalExponent = 1 - kExponentBias; 64 | static const uint64_t kSignMask = RAPIDJSON_UINT64_C2(0x80000000, 0x00000000); 65 | static const uint64_t kExponentMask = RAPIDJSON_UINT64_C2(0x7FF00000, 0x00000000); 66 | static const uint64_t kSignificandMask = RAPIDJSON_UINT64_C2(0x000FFFFF, 0xFFFFFFFF); 67 | static const uint64_t kHiddenBit = RAPIDJSON_UINT64_C2(0x00100000, 0x00000000); 68 | 69 | union { 70 | double d_; 71 | uint64_t u_; 72 | }; 73 | }; 74 | 75 | } // namespace internal 76 | RAPIDJSON_NAMESPACE_END 77 | 78 | #endif // RAPIDJSON_IEEE754_ 79 | -------------------------------------------------------------------------------- /source/internal/rapidjson/internal/pow10.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_POW10_ 16 | #define RAPIDJSON_POW10_ 17 | 18 | #include "../rapidjson.h" 19 | 20 | RAPIDJSON_NAMESPACE_BEGIN 21 | namespace internal { 22 | 23 | //! Computes integer powers of 10 in double (10.0^n). 24 | /*! This function uses lookup table for fast and accurate results. 25 | \param n non-negative exponent. Must <= 308. 26 | \return 10.0^n 27 | */ 28 | inline double Pow10(int n) { 29 | static const double e[] = { // 1e-0...1e308: 309 * 8 bytes = 2472 bytes 30 | 1e+0, 31 | 1e+1, 1e+2, 1e+3, 1e+4, 1e+5, 1e+6, 1e+7, 1e+8, 1e+9, 1e+10, 1e+11, 1e+12, 1e+13, 1e+14, 1e+15, 1e+16, 1e+17, 1e+18, 1e+19, 1e+20, 32 | 1e+21, 1e+22, 1e+23, 1e+24, 1e+25, 1e+26, 1e+27, 1e+28, 1e+29, 1e+30, 1e+31, 1e+32, 1e+33, 1e+34, 1e+35, 1e+36, 1e+37, 1e+38, 1e+39, 1e+40, 33 | 1e+41, 1e+42, 1e+43, 1e+44, 1e+45, 1e+46, 1e+47, 1e+48, 1e+49, 1e+50, 1e+51, 1e+52, 1e+53, 1e+54, 1e+55, 1e+56, 1e+57, 1e+58, 1e+59, 1e+60, 34 | 1e+61, 1e+62, 1e+63, 1e+64, 1e+65, 1e+66, 1e+67, 1e+68, 1e+69, 1e+70, 1e+71, 1e+72, 1e+73, 1e+74, 1e+75, 1e+76, 1e+77, 1e+78, 1e+79, 1e+80, 35 | 1e+81, 1e+82, 1e+83, 1e+84, 1e+85, 1e+86, 1e+87, 1e+88, 1e+89, 1e+90, 1e+91, 1e+92, 1e+93, 1e+94, 1e+95, 1e+96, 1e+97, 1e+98, 1e+99, 1e+100, 36 | 1e+101,1e+102,1e+103,1e+104,1e+105,1e+106,1e+107,1e+108,1e+109,1e+110,1e+111,1e+112,1e+113,1e+114,1e+115,1e+116,1e+117,1e+118,1e+119,1e+120, 37 | 1e+121,1e+122,1e+123,1e+124,1e+125,1e+126,1e+127,1e+128,1e+129,1e+130,1e+131,1e+132,1e+133,1e+134,1e+135,1e+136,1e+137,1e+138,1e+139,1e+140, 38 | 1e+141,1e+142,1e+143,1e+144,1e+145,1e+146,1e+147,1e+148,1e+149,1e+150,1e+151,1e+152,1e+153,1e+154,1e+155,1e+156,1e+157,1e+158,1e+159,1e+160, 39 | 1e+161,1e+162,1e+163,1e+164,1e+165,1e+166,1e+167,1e+168,1e+169,1e+170,1e+171,1e+172,1e+173,1e+174,1e+175,1e+176,1e+177,1e+178,1e+179,1e+180, 40 | 1e+181,1e+182,1e+183,1e+184,1e+185,1e+186,1e+187,1e+188,1e+189,1e+190,1e+191,1e+192,1e+193,1e+194,1e+195,1e+196,1e+197,1e+198,1e+199,1e+200, 41 | 1e+201,1e+202,1e+203,1e+204,1e+205,1e+206,1e+207,1e+208,1e+209,1e+210,1e+211,1e+212,1e+213,1e+214,1e+215,1e+216,1e+217,1e+218,1e+219,1e+220, 42 | 1e+221,1e+222,1e+223,1e+224,1e+225,1e+226,1e+227,1e+228,1e+229,1e+230,1e+231,1e+232,1e+233,1e+234,1e+235,1e+236,1e+237,1e+238,1e+239,1e+240, 43 | 1e+241,1e+242,1e+243,1e+244,1e+245,1e+246,1e+247,1e+248,1e+249,1e+250,1e+251,1e+252,1e+253,1e+254,1e+255,1e+256,1e+257,1e+258,1e+259,1e+260, 44 | 1e+261,1e+262,1e+263,1e+264,1e+265,1e+266,1e+267,1e+268,1e+269,1e+270,1e+271,1e+272,1e+273,1e+274,1e+275,1e+276,1e+277,1e+278,1e+279,1e+280, 45 | 1e+281,1e+282,1e+283,1e+284,1e+285,1e+286,1e+287,1e+288,1e+289,1e+290,1e+291,1e+292,1e+293,1e+294,1e+295,1e+296,1e+297,1e+298,1e+299,1e+300, 46 | 1e+301,1e+302,1e+303,1e+304,1e+305,1e+306,1e+307,1e+308 47 | }; 48 | RAPIDJSON_ASSERT(n >= 0 && n <= 308); 49 | return e[n]; 50 | } 51 | 52 | } // namespace internal 53 | RAPIDJSON_NAMESPACE_END 54 | 55 | #endif // RAPIDJSON_POW10_ 56 | -------------------------------------------------------------------------------- /source/internal/rapidjson/internal/strfunc.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_INTERNAL_STRFUNC_H_ 16 | #define RAPIDJSON_INTERNAL_STRFUNC_H_ 17 | 18 | #include "../stream.h" 19 | 20 | RAPIDJSON_NAMESPACE_BEGIN 21 | namespace internal { 22 | 23 | //! Custom strlen() which works on different character types. 24 | /*! \tparam Ch Character type (e.g. char, wchar_t, short) 25 | \param s Null-terminated input string. 26 | \return Number of characters in the string. 27 | \note This has the same semantics as strlen(), the return value is not number of Unicode codepoints. 28 | */ 29 | template 30 | inline SizeType StrLen(const Ch* s) { 31 | const Ch* p = s; 32 | while (*p) ++p; 33 | return SizeType(p - s); 34 | } 35 | 36 | //! Returns number of code points in a encoded string. 37 | template 38 | bool CountStringCodePoint(const typename Encoding::Ch* s, SizeType length, SizeType* outCount) { 39 | GenericStringStream is(s); 40 | const typename Encoding::Ch* end = s + length; 41 | SizeType count = 0; 42 | while (is.src_ < end) { 43 | unsigned codepoint; 44 | if (!Encoding::Decode(is, &codepoint)) 45 | return false; 46 | count++; 47 | } 48 | *outCount = count; 49 | return true; 50 | } 51 | 52 | } // namespace internal 53 | RAPIDJSON_NAMESPACE_END 54 | 55 | #endif // RAPIDJSON_INTERNAL_STRFUNC_H_ 56 | -------------------------------------------------------------------------------- /source/internal/rapidjson/internal/swap.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_INTERNAL_SWAP_H_ 16 | #define RAPIDJSON_INTERNAL_SWAP_H_ 17 | 18 | #include "../rapidjson.h" 19 | 20 | #if defined(__clang__) 21 | RAPIDJSON_DIAG_PUSH 22 | RAPIDJSON_DIAG_OFF(c++98-compat) 23 | #endif 24 | 25 | RAPIDJSON_NAMESPACE_BEGIN 26 | namespace internal { 27 | 28 | //! Custom swap() to avoid dependency on C++ header 29 | /*! \tparam T Type of the arguments to swap, should be instantiated with primitive C++ types only. 30 | \note This has the same semantics as std::swap(). 31 | */ 32 | template 33 | inline void Swap(T& a, T& b) RAPIDJSON_NOEXCEPT { 34 | T tmp = a; 35 | a = b; 36 | b = tmp; 37 | } 38 | 39 | } // namespace internal 40 | RAPIDJSON_NAMESPACE_END 41 | 42 | #if defined(__clang__) 43 | RAPIDJSON_DIAG_POP 44 | #endif 45 | 46 | #endif // RAPIDJSON_INTERNAL_SWAP_H_ 47 | -------------------------------------------------------------------------------- /source/internal/rapidjson/istreamwrapper.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_ISTREAMWRAPPER_H_ 16 | #define RAPIDJSON_ISTREAMWRAPPER_H_ 17 | 18 | #include "stream.h" 19 | #include 20 | 21 | #ifdef __clang__ 22 | RAPIDJSON_DIAG_PUSH 23 | RAPIDJSON_DIAG_OFF(padded) 24 | #endif 25 | 26 | #ifdef _MSC_VER 27 | RAPIDJSON_DIAG_PUSH 28 | RAPIDJSON_DIAG_OFF(4351) // new behavior: elements of array 'array' will be default initialized 29 | #endif 30 | 31 | RAPIDJSON_NAMESPACE_BEGIN 32 | 33 | //! Wrapper of \c std::basic_istream into RapidJSON's Stream concept. 34 | /*! 35 | The classes can be wrapped including but not limited to: 36 | 37 | - \c std::istringstream 38 | - \c std::stringstream 39 | - \c std::wistringstream 40 | - \c std::wstringstream 41 | - \c std::ifstream 42 | - \c std::fstream 43 | - \c std::wifstream 44 | - \c std::wfstream 45 | 46 | \tparam StreamType Class derived from \c std::basic_istream. 47 | */ 48 | 49 | template 50 | class BasicIStreamWrapper { 51 | public: 52 | typedef typename StreamType::char_type Ch; 53 | BasicIStreamWrapper(StreamType& stream) : stream_(stream), count_(), peekBuffer_() {} 54 | 55 | Ch Peek() const { 56 | typename StreamType::int_type c = stream_.peek(); 57 | return RAPIDJSON_LIKELY(c != StreamType::traits_type::eof()) ? static_cast(c) : '\0'; 58 | } 59 | 60 | Ch Take() { 61 | typename StreamType::int_type c = stream_.get(); 62 | if (RAPIDJSON_LIKELY(c != StreamType::traits_type::eof())) { 63 | count_++; 64 | return static_cast(c); 65 | } 66 | else 67 | return '\0'; 68 | } 69 | 70 | // tellg() may return -1 when failed. So we count by ourself. 71 | size_t Tell() const { return count_; } 72 | 73 | Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } 74 | void Put(Ch) { RAPIDJSON_ASSERT(false); } 75 | void Flush() { RAPIDJSON_ASSERT(false); } 76 | size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } 77 | 78 | // For encoding detection only. 79 | const Ch* Peek4() const { 80 | RAPIDJSON_ASSERT(sizeof(Ch) == 1); // Only usable for byte stream. 81 | int i; 82 | bool hasError = false; 83 | for (i = 0; i < 4; ++i) { 84 | typename StreamType::int_type c = stream_.get(); 85 | if (c == StreamType::traits_type::eof()) { 86 | hasError = true; 87 | stream_.clear(); 88 | break; 89 | } 90 | peekBuffer_[i] = static_cast(c); 91 | } 92 | for (--i; i >= 0; --i) 93 | stream_.putback(peekBuffer_[i]); 94 | return !hasError ? peekBuffer_ : 0; 95 | } 96 | 97 | private: 98 | BasicIStreamWrapper(const BasicIStreamWrapper&); 99 | BasicIStreamWrapper& operator=(const BasicIStreamWrapper&); 100 | 101 | StreamType& stream_; 102 | size_t count_; //!< Number of characters read. Note: 103 | mutable Ch peekBuffer_[4]; 104 | }; 105 | 106 | typedef BasicIStreamWrapper IStreamWrapper; 107 | typedef BasicIStreamWrapper WIStreamWrapper; 108 | 109 | #if defined(__clang__) || defined(_MSC_VER) 110 | RAPIDJSON_DIAG_POP 111 | #endif 112 | 113 | RAPIDJSON_NAMESPACE_END 114 | 115 | #endif // RAPIDJSON_ISTREAMWRAPPER_H_ 116 | -------------------------------------------------------------------------------- /source/internal/rapidjson/memorybuffer.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_MEMORYBUFFER_H_ 16 | #define RAPIDJSON_MEMORYBUFFER_H_ 17 | 18 | #include "stream.h" 19 | #include "internal/stack.h" 20 | 21 | RAPIDJSON_NAMESPACE_BEGIN 22 | 23 | //! Represents an in-memory output byte stream. 24 | /*! 25 | This class is mainly for being wrapped by EncodedOutputStream or AutoUTFOutputStream. 26 | 27 | It is similar to FileWriteBuffer but the destination is an in-memory buffer instead of a file. 28 | 29 | Differences between MemoryBuffer and StringBuffer: 30 | 1. StringBuffer has Encoding but MemoryBuffer is only a byte buffer. 31 | 2. StringBuffer::GetString() returns a null-terminated string. MemoryBuffer::GetBuffer() returns a buffer without terminator. 32 | 33 | \tparam Allocator type for allocating memory buffer. 34 | \note implements Stream concept 35 | */ 36 | template 37 | struct GenericMemoryBuffer { 38 | typedef char Ch; // byte 39 | 40 | GenericMemoryBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {} 41 | 42 | void Put(Ch c) { *stack_.template Push() = c; } 43 | void Flush() {} 44 | 45 | void Clear() { stack_.Clear(); } 46 | void ShrinkToFit() { stack_.ShrinkToFit(); } 47 | Ch* Push(size_t count) { return stack_.template Push(count); } 48 | void Pop(size_t count) { stack_.template Pop(count); } 49 | 50 | const Ch* GetBuffer() const { 51 | return stack_.template Bottom(); 52 | } 53 | 54 | size_t GetSize() const { return stack_.GetSize(); } 55 | 56 | static const size_t kDefaultCapacity = 256; 57 | mutable internal::Stack stack_; 58 | }; 59 | 60 | typedef GenericMemoryBuffer<> MemoryBuffer; 61 | 62 | //! Implement specialized version of PutN() with memset() for better performance. 63 | template<> 64 | inline void PutN(MemoryBuffer& memoryBuffer, char c, size_t n) { 65 | std::memset(memoryBuffer.stack_.Push(n), c, n * sizeof(c)); 66 | } 67 | 68 | RAPIDJSON_NAMESPACE_END 69 | 70 | #endif // RAPIDJSON_MEMORYBUFFER_H_ 71 | -------------------------------------------------------------------------------- /source/internal/rapidjson/memorystream.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_MEMORYSTREAM_H_ 16 | #define RAPIDJSON_MEMORYSTREAM_H_ 17 | 18 | #include "stream.h" 19 | 20 | #ifdef __clang__ 21 | RAPIDJSON_DIAG_PUSH 22 | RAPIDJSON_DIAG_OFF(unreachable-code) 23 | RAPIDJSON_DIAG_OFF(missing-noreturn) 24 | #endif 25 | 26 | RAPIDJSON_NAMESPACE_BEGIN 27 | 28 | //! Represents an in-memory input byte stream. 29 | /*! 30 | This class is mainly for being wrapped by EncodedInputStream or AutoUTFInputStream. 31 | 32 | It is similar to FileReadBuffer but the source is an in-memory buffer instead of a file. 33 | 34 | Differences between MemoryStream and StringStream: 35 | 1. StringStream has encoding but MemoryStream is a byte stream. 36 | 2. MemoryStream needs size of the source buffer and the buffer don't need to be null terminated. StringStream assume null-terminated string as source. 37 | 3. MemoryStream supports Peek4() for encoding detection. StringStream is specified with an encoding so it should not have Peek4(). 38 | \note implements Stream concept 39 | */ 40 | struct MemoryStream { 41 | typedef char Ch; // byte 42 | 43 | MemoryStream(const Ch *src, size_t size) : src_(src), begin_(src), end_(src + size), size_(size) {} 44 | 45 | Ch Peek() const { return RAPIDJSON_UNLIKELY(src_ == end_) ? '\0' : *src_; } 46 | Ch Take() { return RAPIDJSON_UNLIKELY(src_ == end_) ? '\0' : *src_++; } 47 | size_t Tell() const { return static_cast(src_ - begin_); } 48 | 49 | Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } 50 | void Put(Ch) { RAPIDJSON_ASSERT(false); } 51 | void Flush() { RAPIDJSON_ASSERT(false); } 52 | size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } 53 | 54 | // For encoding detection only. 55 | const Ch* Peek4() const { 56 | return Tell() + 4 <= size_ ? src_ : 0; 57 | } 58 | 59 | const Ch* src_; //!< Current read position. 60 | const Ch* begin_; //!< Original head of the string. 61 | const Ch* end_; //!< End of stream. 62 | size_t size_; //!< Size of the stream. 63 | }; 64 | 65 | RAPIDJSON_NAMESPACE_END 66 | 67 | #ifdef __clang__ 68 | RAPIDJSON_DIAG_POP 69 | #endif 70 | 71 | #endif // RAPIDJSON_MEMORYBUFFER_H_ 72 | -------------------------------------------------------------------------------- /source/internal/rapidjson/ostreamwrapper.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_OSTREAMWRAPPER_H_ 16 | #define RAPIDJSON_OSTREAMWRAPPER_H_ 17 | 18 | #include "stream.h" 19 | #include 20 | 21 | #ifdef __clang__ 22 | RAPIDJSON_DIAG_PUSH 23 | RAPIDJSON_DIAG_OFF(padded) 24 | #endif 25 | 26 | RAPIDJSON_NAMESPACE_BEGIN 27 | 28 | //! Wrapper of \c std::basic_ostream into RapidJSON's Stream concept. 29 | /*! 30 | The classes can be wrapped including but not limited to: 31 | 32 | - \c std::ostringstream 33 | - \c std::stringstream 34 | - \c std::wpstringstream 35 | - \c std::wstringstream 36 | - \c std::ifstream 37 | - \c std::fstream 38 | - \c std::wofstream 39 | - \c std::wfstream 40 | 41 | \tparam StreamType Class derived from \c std::basic_ostream. 42 | */ 43 | 44 | template 45 | class BasicOStreamWrapper { 46 | public: 47 | typedef typename StreamType::char_type Ch; 48 | BasicOStreamWrapper(StreamType& stream) : stream_(stream) {} 49 | 50 | void Put(Ch c) { 51 | stream_.put(c); 52 | } 53 | 54 | void Flush() { 55 | stream_.flush(); 56 | } 57 | 58 | // Not implemented 59 | char Peek() const { RAPIDJSON_ASSERT(false); return 0; } 60 | char Take() { RAPIDJSON_ASSERT(false); return 0; } 61 | size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; } 62 | char* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } 63 | size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; } 64 | 65 | private: 66 | BasicOStreamWrapper(const BasicOStreamWrapper&); 67 | BasicOStreamWrapper& operator=(const BasicOStreamWrapper&); 68 | 69 | StreamType& stream_; 70 | }; 71 | 72 | typedef BasicOStreamWrapper OStreamWrapper; 73 | typedef BasicOStreamWrapper WOStreamWrapper; 74 | 75 | #ifdef __clang__ 76 | RAPIDJSON_DIAG_POP 77 | #endif 78 | 79 | RAPIDJSON_NAMESPACE_END 80 | 81 | #endif // RAPIDJSON_OSTREAMWRAPPER_H_ 82 | -------------------------------------------------------------------------------- /source/internal/rapidjson/stringbuffer.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_STRINGBUFFER_H_ 16 | #define RAPIDJSON_STRINGBUFFER_H_ 17 | 18 | #include "stream.h" 19 | #include "internal/stack.h" 20 | 21 | #if RAPIDJSON_HAS_CXX11_RVALUE_REFS 22 | #include // std::move 23 | #endif 24 | 25 | #include "internal/stack.h" 26 | 27 | #if defined(__clang__) 28 | RAPIDJSON_DIAG_PUSH 29 | RAPIDJSON_DIAG_OFF(c++98-compat) 30 | #endif 31 | 32 | RAPIDJSON_NAMESPACE_BEGIN 33 | 34 | //! Represents an in-memory output stream. 35 | /*! 36 | \tparam Encoding Encoding of the stream. 37 | \tparam Allocator type for allocating memory buffer. 38 | \note implements Stream concept 39 | */ 40 | template 41 | class GenericStringBuffer { 42 | public: 43 | typedef typename Encoding::Ch Ch; 44 | 45 | GenericStringBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {} 46 | 47 | #if RAPIDJSON_HAS_CXX11_RVALUE_REFS 48 | GenericStringBuffer(GenericStringBuffer&& rhs) : stack_(std::move(rhs.stack_)) {} 49 | GenericStringBuffer& operator=(GenericStringBuffer&& rhs) { 50 | if (&rhs != this) 51 | stack_ = std::move(rhs.stack_); 52 | return *this; 53 | } 54 | #endif 55 | 56 | void Put(Ch c) { *stack_.template Push() = c; } 57 | void PutUnsafe(Ch c) { *stack_.template PushUnsafe() = c; } 58 | void Flush() {} 59 | 60 | void Clear() { stack_.Clear(); } 61 | void ShrinkToFit() { 62 | // Push and pop a null terminator. This is safe. 63 | *stack_.template Push() = '\0'; 64 | stack_.ShrinkToFit(); 65 | stack_.template Pop(1); 66 | } 67 | 68 | void Reserve(size_t count) { stack_.template Reserve(count); } 69 | Ch* Push(size_t count) { return stack_.template Push(count); } 70 | Ch* PushUnsafe(size_t count) { return stack_.template PushUnsafe(count); } 71 | void Pop(size_t count) { stack_.template Pop(count); } 72 | 73 | const Ch* GetString() const { 74 | // Push and pop a null terminator. This is safe. 75 | *stack_.template Push() = '\0'; 76 | stack_.template Pop(1); 77 | 78 | return stack_.template Bottom(); 79 | } 80 | 81 | size_t GetSize() const { return stack_.GetSize(); } 82 | 83 | static const size_t kDefaultCapacity = 256; 84 | mutable internal::Stack stack_; 85 | 86 | private: 87 | // Prohibit copy constructor & assignment operator. 88 | GenericStringBuffer(const GenericStringBuffer&); 89 | GenericStringBuffer& operator=(const GenericStringBuffer&); 90 | }; 91 | 92 | //! String buffer with UTF8 encoding 93 | typedef GenericStringBuffer > StringBuffer; 94 | 95 | template 96 | inline void PutReserve(GenericStringBuffer& stream, size_t count) { 97 | stream.Reserve(count); 98 | } 99 | 100 | template 101 | inline void PutUnsafe(GenericStringBuffer& stream, typename Encoding::Ch c) { 102 | stream.PutUnsafe(c); 103 | } 104 | 105 | //! Implement specialized version of PutN() with memset() for better performance. 106 | template<> 107 | inline void PutN(GenericStringBuffer >& stream, char c, size_t n) { 108 | std::memset(stream.stack_.Push(n), c, n * sizeof(c)); 109 | } 110 | 111 | RAPIDJSON_NAMESPACE_END 112 | 113 | #if defined(__clang__) 114 | RAPIDJSON_DIAG_POP 115 | #endif 116 | 117 | #endif // RAPIDJSON_STRINGBUFFER_H_ 118 | -------------------------------------------------------------------------------- /source/internal/websocket.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | namespace mixer_internal 6 | { 7 | 8 | class websocket; 9 | 10 | typedef std::function on_ws_connect; 11 | typedef std::function on_ws_message; 12 | typedef std::function on_ws_error; 13 | typedef std::function on_ws_close; 14 | 15 | class websocket 16 | { 17 | public: 18 | virtual ~websocket() = 0 {}; 19 | virtual int add_header(const std::string& key, const std::string& value) = 0; 20 | virtual int open(const std::string& uri, const on_ws_connect onConnect, const on_ws_message onMessage, const on_ws_error onError, const on_ws_close onClose) = 0; 21 | virtual int send(const std::string& message) = 0; 22 | virtual int read(std::string& message) = 0; 23 | virtual void close() = 0; 24 | }; 25 | 26 | class websocket_factory 27 | { 28 | public: 29 | static std::unique_ptr make_websocket(); 30 | }; 31 | 32 | } 33 | 34 | extern "C" { 35 | 36 | typedef void* websocket_handle; 37 | 38 | typedef void(*c_on_ws_connect)(const websocket_handle handle, const char* connectMessage, const size_t connectMessageSize); 39 | typedef void(*c_on_ws_message)(const websocket_handle handle, const char* message, const size_t messageSize); 40 | typedef void(*c_on_ws_error)(const websocket_handle handle, const unsigned short code, const char* message, const size_t messageSize); 41 | typedef void(*c_on_ws_close)(const websocket_handle handle, const unsigned short code, const char* reason, const size_t reasonSize); 42 | 43 | int create_websocket(websocket_handle* handlePtr); 44 | int add_header(websocket_handle, const char* key, const char* value); 45 | int open_websocket(websocket_handle, const char* uri, const c_on_ws_connect, const c_on_ws_message, const c_on_ws_error, const c_on_ws_close); 46 | int write_websocket(websocket_handle, const char* message); 47 | int read_websocket(websocket_handle, c_on_ws_message onMessage); 48 | int close_websocket(websocket_handle); 49 | 50 | }; -------------------------------------------------------------------------------- /source/internal/win_dll.cpp: -------------------------------------------------------------------------------- 1 | #include "win_dll.h" 2 | 3 | namespace mixer_internal 4 | { 5 | 6 | win_proc_ptr::win_proc_ptr(FARPROC ptr) : m_ptr(ptr) {}; 7 | 8 | template 9 | win_proc_ptr::operator T *() const 10 | { 11 | return reinterpret_cast(m_ptr); 12 | }; 13 | 14 | win_dll::win_dll(const char* filename) : m_hmod(LoadLibraryA(filename)) {}; 15 | win_dll::~win_dll() 16 | { 17 | FreeLibrary(m_hmod); 18 | }; 19 | 20 | win_proc_ptr win_dll::operator[](const char* processName) const 21 | { 22 | return win_proc_ptr(GetProcAddress(m_hmod, processName)); 23 | }; 24 | } -------------------------------------------------------------------------------- /source/internal/win_dll.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "windows.h" 4 | #include 5 | 6 | namespace mixer_internal 7 | { 8 | 9 | class win_proc_ptr 10 | { 11 | public: 12 | explicit win_proc_ptr(FARPROC ptr); 13 | template >> 14 | operator T *() const; 15 | 16 | private: 17 | FARPROC m_ptr; 18 | }; 19 | 20 | class win_dll 21 | { 22 | public: 23 | explicit win_dll(const char* filename); 24 | ~win_dll(); 25 | 26 | win_proc_ptr operator[](const char* processName) const; 27 | 28 | private: 29 | HMODULE m_hmod; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /source/internal/win_http_api.cpp: -------------------------------------------------------------------------------- 1 | #include "win_http_api.h" 2 | #include "win_dll.h" 3 | namespace mixer_internal 4 | { 5 | 6 | static win_dll winHttpDll{ "winhttp.dll" }; 7 | win_http_api::win_http_api() : 8 | win_http_open(winHttpDll["WinHttpOpen"]), 9 | win_http_close_handle(winHttpDll["WinHttpCloseHandle"]), 10 | win_http_connect(winHttpDll["WinHttpConnect"]), 11 | win_http_websocket_complete_upgrade(winHttpDll["WinHttpWebSocketCompleteUpgrade"]), 12 | win_http_set_timeouts(winHttpDll["WinHttpSetTimeouts"]), 13 | win_http_websocket_close(winHttpDll["WinHttpWebSocketClose"]), 14 | win_http_send_request(winHttpDll["WinHttpSendRequest"]), 15 | win_http_websocket_receive(winHttpDll["WinHttpWebSocketReceive"]), 16 | win_http_set_options(winHttpDll["WinHttpSetOption"]), 17 | win_http_open_request(winHttpDll["WinHttpOpenRequest"]), 18 | win_http_open_read_data(winHttpDll["WinHttpReadData"]), 19 | win_http_websocket_send(winHttpDll["WinHttpWebSocketSend"]), 20 | win_http_query_headers(winHttpDll["WinHttpQueryHeaders"]), 21 | win_http_add_request_headers(winHttpDll["WinHttpAddRequestHeaders"]), 22 | win_http_websocket_query_close_status(winHttpDll["WinHttpWebSocketQueryCloseStatus"]), 23 | win_http_receive_response(winHttpDll["WinHttpReceiveResponse"]), 24 | win_http_read_data(winHttpDll["WinHttpReadData"]) {}; 25 | } -------------------------------------------------------------------------------- /source/internal/win_http_api.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "win_dll.h" 4 | #include "winhttp.h" 5 | 6 | namespace mixer_internal 7 | { 8 | 9 | class win_http_api 10 | { 11 | public: 12 | win_http_api(); 13 | decltype(WinHttpOpen) *win_http_open; 14 | decltype(WinHttpCloseHandle) *win_http_close_handle; 15 | decltype(WinHttpConnect) *win_http_connect; 16 | decltype(WinHttpWebSocketCompleteUpgrade) *win_http_websocket_complete_upgrade; 17 | decltype(WinHttpSetTimeouts) *win_http_set_timeouts; 18 | decltype(WinHttpWebSocketClose) *win_http_websocket_close; 19 | decltype(WinHttpSendRequest) *win_http_send_request; 20 | decltype(WinHttpWebSocketReceive) *win_http_websocket_receive; 21 | decltype(WinHttpSetOption) *win_http_set_options; 22 | decltype(WinHttpOpenRequest) *win_http_open_request; 23 | decltype(WinHttpReadData) *win_http_open_read_data; 24 | decltype(WinHttpWebSocketSend) *win_http_websocket_send; 25 | decltype(WinHttpQueryHeaders) *win_http_query_headers; 26 | decltype(WinHttpAddRequestHeaders) *win_http_add_request_headers; 27 | decltype(WinHttpWebSocketQueryCloseStatus) *win_http_websocket_query_close_status; 28 | decltype(WinHttpReceiveResponse) *win_http_receive_response; 29 | decltype(WinHttpReadData) *win_http_read_data; 30 | }; 31 | } -------------------------------------------------------------------------------- /source/internal/win_http_client.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "http_client.h" 4 | #include 5 | #include 6 | 7 | namespace mixer_internal 8 | { 9 | 10 | class win_http_client : public http_client 11 | { 12 | public: 13 | win_http_client(); 14 | ~win_http_client(); 15 | 16 | int make_request(const std::string& uri, const std::string& requestType, const http_headers* headers, const std::string& body, _Out_ http_response& response, unsigned long timeoutMs = 5000) const; 17 | 18 | private: 19 | hinternet_ptr m_internet; 20 | mutable std::map m_sessionsByHostname; 21 | }; 22 | } -------------------------------------------------------------------------------- /source/internal/winapp_http_client.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "http_client.h" 4 | 5 | namespace mixer_internal 6 | { 7 | 8 | class winapp_http_client : public http_client 9 | { 10 | public: 11 | winapp_http_client(); 12 | ~winapp_http_client(); 13 | 14 | int make_request(const std::string& uri, const std::string& requestType, const http_headers* headers, const std::string& body, http_response& response, unsigned long timeoutMs = 5000) const; 15 | }; 16 | } --------------------------------------------------------------------------------