├── docs
├── .nojekyll
├── favicon.ico
├── _media
│ ├── logo.png
│ └── android-tree.png
├── _sidebar.md
├── _coverpage.md
├── custom.css
├── create-application.md
└── README.md
├── examples
└── android
│ ├── app
│ ├── .gitignore
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ └── layout
│ │ │ │ │ ├── feed_item.xml
│ │ │ │ │ ├── api.xml
│ │ │ │ │ ├── streaming.xml
│ │ │ │ │ └── datachannel.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── github
│ │ │ │ │ └── helloiampau
│ │ │ │ │ └── app
│ │ │ │ │ ├── ServiceDelegate.java
│ │ │ │ │ ├── custom
│ │ │ │ │ ├── CustomPluginFactory.java
│ │ │ │ │ ├── CustomPlugin.java
│ │ │ │ │ └── CustomProtocol.java
│ │ │ │ │ └── MainActivity.java
│ │ │ └── AndroidManifest.xml
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── com
│ │ │ └── github
│ │ │ └── helloiampau
│ │ │ └── app
│ │ │ └── ApiTest.java
│ ├── proguard-rules.pro
│ └── build.gradle
│ ├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── settings.gradle
│ ├── .idea
│ ├── vcs.xml
│ ├── misc.xml
│ ├── runConfigurations.xml
│ ├── gradle.xml
│ └── codeStyles
│ │ └── Project.xml
│ ├── .gitignore
│ ├── build.gradle
│ └── gradle.properties
├── .gitignore
├── platforms
├── android
│ ├── janus-client
│ │ ├── .gitignore
│ │ ├── src
│ │ │ ├── test
│ │ │ │ ├── resources
│ │ │ │ │ └── org
│ │ │ │ │ │ └── powermock
│ │ │ │ │ │ └── extensions
│ │ │ │ │ │ └── configuration.properties
│ │ │ │ └── java
│ │ │ │ │ └── com
│ │ │ │ │ └── github
│ │ │ │ │ └── helloiampau
│ │ │ │ │ └── janusclientsdk
│ │ │ │ │ ├── JanusFactoryTest.java
│ │ │ │ │ └── JanusConfImplTest.java
│ │ │ └── main
│ │ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── mipmap-anydpi-v26
│ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── github
│ │ │ │ └── helloiampau
│ │ │ │ └── janusclientsdk
│ │ │ │ ├── JanusDelegate.java
│ │ │ │ ├── JanusConfImpl.java
│ │ │ │ ├── rtc
│ │ │ │ ├── MutableMediaBundle.java
│ │ │ │ └── MediaBundle.java
│ │ │ │ └── JanusFactory.java
│ │ ├── proguard-rules.pro
│ │ └── build.gradle
│ └── .gitignore
└── ios
│ ├── janus-client.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcuserdata
│ │ │ └── helloiampau.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ │ └── helloiampau.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
│ ├── janus-client
│ ├── janus_client.h
│ └── Info.plist
│ └── janus-clientTests
│ ├── Info.plist
│ └── janus_clientTests.m
├── test
├── main.cc
├── mocks
│ ├── async.h
│ ├── random.h
│ ├── http_factory.h
│ ├── janus_conf.h
│ ├── peer_factory.h
│ ├── transport_delegate.h
│ ├── transport_factory.h
│ ├── http.h
│ ├── transport.h
│ ├── plugin_command_delegate.h
│ ├── protocol_delegate.h
│ ├── platform.h
│ ├── plugin.h
│ ├── peer.h
│ ├── bundle.h
│ ├── protocol.h
│ └── matchers.h
├── random.test.cc
└── async.test.cc
├── generated
├── objcpp
│ ├── JanusCamera+Private.h
│ ├── JanusSdpType+Private.h
│ ├── JanusJanusError+Private.h
│ ├── JanusConstraints+Private.h
│ ├── JanusJanusPTypes+Private.h
│ ├── JanusJanusPlugins+Private.h
│ ├── JanusJanusCommands+Private.h
│ ├── JanusJanusPTypes+Private.mm
│ ├── JanusJanusPlugins+Private.mm
│ ├── JanusJanusCommands+Private.mm
│ ├── JanusSdpConstraints+Private.h
│ ├── JanusVideoConstraints+Private.h
│ ├── JanusJanusError+Private.mm
│ ├── JanusJsep+Private.h
│ ├── JanusJanus+Private.h
│ ├── JanusPeer+Private.h
│ ├── JanusBundle+Private.h
│ ├── JanusPlugin+Private.h
│ ├── JanusPlatform+Private.h
│ ├── JanusProtocol+Private.h
│ ├── JanusJanusData+Private.h
│ ├── JanusConstraints+Private.mm
│ ├── JanusJanusConf+Private.h
│ ├── JanusJanusEvent+Private.h
│ ├── JanusPeerFactory+Private.h
│ ├── JanusPluginFactory+Private.h
│ ├── JanusProtocolDelegate+Private.h
│ ├── JanusConstraintsBuilder+Private.h
│ ├── JanusVideoConstraints+Private.mm
│ ├── JanusSdpConstraints+Private.mm
│ └── JanusJsep+Private.mm
├── objc
│ ├── JanusCamera.h
│ ├── JanusSdpType.h
│ ├── JanusJanusConf.h
│ ├── JanusJsep.h
│ ├── JanusJanusEvent.h
│ ├── JanusPeerFactory.h
│ ├── JanusPluginFactory.h
│ ├── JanusJanusPTypes.h
│ ├── JanusJanusPlugins.h
│ ├── JanusJanusError.h
│ ├── JanusProtocolDelegate.h
│ ├── JanusPlatform.h
│ ├── JanusJanusData.h
│ ├── JanusJanusPTypes.mm
│ ├── JanusJanus.h
│ ├── JanusPlugin.h
│ ├── JanusConstraints.h
│ ├── JanusJanusPlugins.mm
│ ├── JanusJanusError.mm
│ ├── JanusPeer.h
│ ├── JanusConstraints.mm
│ ├── JanusVideoConstraints.h
│ ├── JanusBundle.h
│ ├── JanusProtocol.h
│ ├── JanusSdpConstraints.h
│ ├── JanusConstraintsBuilder.h
│ ├── JanusVideoConstraints.mm
│ ├── JanusJanusCommands.h
│ └── JanusSdpConstraints.mm
├── java
│ └── com
│ │ └── github
│ │ └── helloiampau
│ │ └── janus
│ │ └── generated
│ │ ├── Camera.java
│ │ ├── SdpType.java
│ │ ├── JanusPTypes.java
│ │ ├── JanusPlugins.java
│ │ ├── JanusError.java
│ │ ├── Constraints.java
│ │ ├── VideoConstraints.java
│ │ ├── PeerFactory.java
│ │ ├── JanusCommands.java
│ │ ├── PluginFactory.java
│ │ ├── Jsep.java
│ │ ├── SdpConstraints.java
│ │ └── JanusConf.java
├── cpp
│ └── janus
│ │ ├── janus_p_types.cpp
│ │ ├── janus_p_types.hpp
│ │ ├── janus_conf.hpp
│ │ ├── jsep.hpp
│ │ ├── janus_plugins.hpp
│ │ ├── janus_plugins.cpp
│ │ ├── peer_factory.hpp
│ │ ├── plugin_factory.hpp
│ │ ├── janus_error.hpp
│ │ ├── janus_event.hpp
│ │ ├── camera.hpp
│ │ ├── sdp_type.hpp
│ │ ├── constraints.hpp
│ │ ├── video_constraints.hpp
│ │ ├── platform.hpp
│ │ ├── protocol_delegate.hpp
│ │ ├── janus.hpp
│ │ ├── janus_data.hpp
│ │ ├── sdp_constraints.hpp
│ │ ├── plugin.hpp
│ │ ├── peer.hpp
│ │ ├── bundle.hpp
│ │ ├── janus_commands.hpp
│ │ ├── protocol.hpp
│ │ ├── constraints_builder.hpp
│ │ └── janus_commands.cpp
└── jni
│ ├── native_camera.hpp
│ ├── native_sdp_type.hpp
│ ├── native_janus_p_types.hpp
│ ├── native_janus_plugins.hpp
│ ├── native_janus_commands.hpp
│ ├── native_janus_p_types.cpp
│ ├── native_janus_plugins.cpp
│ ├── native_janus_commands.cpp
│ ├── native_jsep.hpp
│ ├── native_janus.hpp
│ ├── native_bundle.hpp
│ ├── native_janus_error.hpp
│ ├── native_platform.hpp
│ ├── native_janus_data.hpp
│ ├── native_janus_event.hpp
│ ├── native_constraints_builder.hpp
│ ├── native_constraints.hpp
│ ├── native_janus_error.cpp
│ ├── native_video_constraints.hpp
│ ├── native_sdp_constraints.hpp
│ ├── native_constraints.cpp
│ ├── native_video_constraints.cpp
│ └── native_jsep.cpp
├── Dockerfile
├── include
└── janus
│ ├── random.h
│ ├── janus_impl.h
│ ├── plugins
│ ├── janus_plugin.h
│ ├── janus_plugin_echotest.h
│ └── janus_plugin_streaming.h
│ ├── async.h
│ ├── platform_impl.h
│ ├── constraints_builder_impl.h
│ ├── http.h
│ ├── bundle_impl.h
│ └── janus_event_impl.h
├── src
├── random.cc
├── plugins
│ └── janus_plugin.cc
├── bundle_impl.cc
├── janus_impl.cc
└── async.cc
├── .travis.yml
└── docker-compose.yml
/docs/.nojekyll:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/android/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | third_party/
3 | build/
4 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/docs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/docs/favicon.ico
--------------------------------------------------------------------------------
/docs/_media/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/docs/_media/logo.png
--------------------------------------------------------------------------------
/docs/_media/android-tree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/docs/_media/android-tree.png
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | app
3 |
4 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/test/resources/org/powermock/extensions/configuration.properties:
--------------------------------------------------------------------------------
1 | mockito.mock-maker-class=mock-maker-inline
2 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Janus Client SDK
3 |
4 |
--------------------------------------------------------------------------------
/examples/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/examples/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/examples/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | include ':janus'
4 | project(':janus').projectDir = new File(settingsDir, '../../platforms/android/janus-client')
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/examples/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/examples/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/docs/_sidebar.md:
--------------------------------------------------------------------------------
1 | - [Getting Started](getting-started.md)
2 | - [Create your Real-Time Application](create-application.md)
3 | - [Messing Around with the Library](messing-around.md)
4 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/examples/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/examples/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/examples/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/examples/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/examples/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/examples/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/test/main.cc:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(int argc, char **argv) {
5 | ::testing::InitGoogleMock(&argc, argv);
6 | return RUN_ALL_TESTS();
7 | }
8 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/examples/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/examples/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/platforms/android/janus-client/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/platforms/android/janus-client/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/platforms/android/janus-client/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/platforms/android/janus-client/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/platforms/android/janus-client/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/generated/objcpp/JanusCamera+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "camera.hpp"
5 | #import "DJIMarshal+Private.h"
6 |
7 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusSdpType+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "sdp_type.hpp"
5 | #import "DJIMarshal+Private.h"
6 |
7 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/platforms/android/janus-client/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/platforms/android/janus-client/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/platforms/android/janus-client/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/platforms/android/janus-client/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/platforms/android/janus-client/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/docs/_coverpage.md:
--------------------------------------------------------------------------------
1 | 
2 | # Janus Client SDK
3 |
4 | > The [Janus Gateway](https://github.com/meetecho/janus-gateway) client SDK for native environments
5 |
6 | [Getting Started](#getting-started)
7 |
--------------------------------------------------------------------------------
/docs/custom.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Helvetica Neue;
3 | }
4 |
5 | :root {
6 | --cover-background-color: #0067B5;
7 | --cover-background-blend-mode: normal;
8 | --cover-heading-font-weight: 500;
9 | }
10 |
--------------------------------------------------------------------------------
/examples/android/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/test/mocks/async.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/async.h"
4 |
5 | namespace Janus {
6 |
7 | class AsyncMock : public Async {
8 | public:
9 | MOCK_METHOD1(submit, void(Task task));
10 | };
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/test/mocks/random.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/random.h"
4 |
5 | namespace Janus {
6 |
7 | class RandomMock : public Random {
8 | public:
9 | MOCK_METHOD0(generate, std::string());
10 | };
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/docs/create-application.md:
--------------------------------------------------------------------------------
1 | # Create your real-time application
2 |
3 | TBD
4 |
5 | ## Plugins
6 |
7 | TBD
8 |
9 | ### Echotest
10 |
11 | TBD
12 |
13 | ### Streaming
14 |
15 | TBD
16 |
17 | ### Videoroom
18 |
19 | TBD
20 |
21 |
--------------------------------------------------------------------------------
/platforms/ios/janus-client.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/test/mocks/http_factory.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/http.h"
4 |
5 | namespace Janus {
6 |
7 | class HttpFactoryMock : public HttpFactory {
8 | public:
9 | MOCK_METHOD1(create, std::shared_ptr(const std::string& baseUrl));
10 | };
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | from ubuntu:18.04
2 |
3 | run apt-get update && apt-get install -y build-essential cmake git inotify-tools valgrind python3-pip openjdk-8-jdk curl uuid-dev libtool autotools-dev golang doxygen python
4 | run pip3 install gdbgui
5 |
6 | env SHELL=/bin/bash
7 |
8 | cmd /bin/bash
9 |
--------------------------------------------------------------------------------
/examples/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 |
--------------------------------------------------------------------------------
/platforms/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 |
--------------------------------------------------------------------------------
/generated/objc/JanusCamera.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 |
6 | typedef NS_ENUM(NSInteger, JanusCamera)
7 | {
8 | JanusCameraFRONT,
9 | JanusCameraOTHER,
10 | };
11 |
--------------------------------------------------------------------------------
/test/mocks/janus_conf.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/janus_conf.hpp"
4 |
5 | namespace Janus {
6 |
7 | class JanusConfMock : public JanusConf {
8 | public:
9 | MOCK_METHOD0(url, std::string());
10 | MOCK_METHOD0(plugin, std::string());
11 | };
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/generated/objc/JanusSdpType.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 |
6 | typedef NS_ENUM(NSInteger, JanusSdpType)
7 | {
8 | JanusSdpTypeOFFER,
9 | JanusSdpTypeANSWER,
10 | };
11 |
--------------------------------------------------------------------------------
/platforms/ios/janus-client.xcodeproj/project.xcworkspace/xcuserdata/helloiampau.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meetecho/janus-mobile-sdk/HEAD/platforms/ios/janus-client.xcodeproj/project.xcworkspace/xcuserdata/helloiampau.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/examples/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Nov 02 07:45:51 CET 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
7 |
--------------------------------------------------------------------------------
/generated/java/com/github/helloiampau/janus/generated/Camera.java:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | package com.github.helloiampau.janus.generated;
5 |
6 | public enum Camera {
7 | FRONT,
8 | OTHER,
9 | ;
10 | }
11 |
--------------------------------------------------------------------------------
/generated/java/com/github/helloiampau/janus/generated/SdpType.java:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | package com.github.helloiampau.janus.generated;
5 |
6 | public enum SdpType {
7 | OFFER,
8 | ANSWER,
9 | ;
10 | }
11 |
--------------------------------------------------------------------------------
/generated/objc/JanusJanusConf.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 |
6 |
7 | @protocol JanusJanusConf
8 |
9 | - (nonnull NSString *)url;
10 |
11 | - (nonnull NSString *)plugin;
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/test/mocks/peer_factory.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/peer_factory.hpp"
4 |
5 | namespace Janus {
6 |
7 | class PeerFactoryMock : public PeerFactory {
8 | public:
9 | MOCK_METHOD2(create, std::shared_ptr(int64_t id, const std::shared_ptr& owner));
10 | };
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/test/mocks/transport_delegate.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/transport.h"
4 |
5 | namespace Janus {
6 |
7 | class TransportDelegateMock : public TransportDelegate {
8 | public:
9 | MOCK_METHOD2(onMessage, void(const nlohmann::json& message, const std::shared_ptr& context));
10 | };
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/generated/objc/JanusJsep.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusSdpType.h"
5 | #import
6 |
7 |
8 | @interface JanusJsep : NSObject
9 |
10 | - (JanusSdpType)type;
11 |
12 | - (nonnull NSString *)sdp;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/test/mocks/transport_factory.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/transport.h"
4 |
5 | namespace Janus {
6 |
7 | class TransportFactoryMock : public TransportFactory {
8 | public:
9 | MOCK_METHOD2(create, std::shared_ptr(const std::string& url, const std::shared_ptr& delegate));
10 | };
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/platforms/ios/janus-client.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/java/com/github/helloiampau/app/ServiceDelegate.java:
--------------------------------------------------------------------------------
1 | package com.github.helloiampau.app;
2 |
3 | import com.github.helloiampau.janus.generated.Bundle;
4 | import com.github.helloiampau.janus.generated.JanusEvent;
5 |
6 | public interface ServiceDelegate {
7 |
8 | public void onEvent(JanusEvent event, Bundle payload);
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/test/mocks/http.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/http.h"
4 |
5 | namespace Janus {
6 |
7 | class HttpMock : public Http {
8 | public:
9 | MOCK_METHOD1(get, std::shared_ptr(const std::string& path));
10 | MOCK_METHOD2(post, std::shared_ptr(const std::string& path, const std::string& body));
11 | };
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/test/java/com/github/helloiampau/janusclientsdk/JanusFactoryTest.java:
--------------------------------------------------------------------------------
1 | package com.github.helloiampau.janusclientsdk;
2 |
3 | public class JanusFactoryTest {
4 |
5 | /*
6 | We cannot test the factory here due to the native library loading procedure.
7 | BTW we already test this API as part of our instrumented tests.
8 | */
9 |
10 | }
--------------------------------------------------------------------------------
/generated/cpp/janus/janus_p_types.cpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "janus_p_types.hpp" // my header
5 |
6 | namespace Janus {
7 |
8 | std::string const JanusPTypes::PUBLISHER = {"publisher"};
9 |
10 | std::string const JanusPTypes::SUBSCRIBER = {"subscriber"};
11 |
12 | } // namespace Janus
13 |
--------------------------------------------------------------------------------
/examples/android/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/generated/objc/JanusJanusEvent.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 | @class JanusJanusData;
6 | @class JanusJsep;
7 |
8 |
9 | @interface JanusJanusEvent : NSObject
10 |
11 | - (int64_t)sender;
12 |
13 | - (nullable JanusJsep *)jsep;
14 |
15 | - (nullable JanusJanusData *)data;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/generated/cpp/janus/janus_p_types.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 |
9 | namespace Janus {
10 |
11 | struct JanusPTypes final {
12 |
13 | static std::string const PUBLISHER;
14 |
15 | static std::string const SUBSCRIBER;
16 | };
17 |
18 | } // namespace Janus
19 |
--------------------------------------------------------------------------------
/generated/objc/JanusPeerFactory.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 | @protocol JanusPeer;
6 | @protocol JanusProtocol;
7 |
8 |
9 | @protocol JanusPeerFactory
10 |
11 | - (nullable id)create:(int64_t)id
12 | owner:(nullable id)owner;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/generated/cpp/janus/janus_conf.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 |
8 | namespace Janus {
9 |
10 | class JanusConf {
11 | public:
12 | virtual ~JanusConf() {}
13 |
14 | virtual std::string url() = 0;
15 |
16 | virtual std::string plugin() = 0;
17 | };
18 |
19 | } // namespace Janus
20 |
--------------------------------------------------------------------------------
/generated/cpp/janus/jsep.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 |
8 | namespace Janus {
9 |
10 | enum class SdpType;
11 |
12 | class Jsep {
13 | public:
14 | virtual ~Jsep() {}
15 |
16 | virtual SdpType type() = 0;
17 |
18 | virtual std::string sdp() = 0;
19 | };
20 |
21 | } // namespace Janus
22 |
--------------------------------------------------------------------------------
/generated/objc/JanusPluginFactory.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 | @protocol JanusPlugin;
6 | @protocol JanusProtocol;
7 |
8 |
9 | @protocol JanusPluginFactory
10 |
11 | - (nullable id)create:(int64_t)handleId
12 | owner:(nullable id)owner;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/generated/objc/JanusJanusPTypes.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 |
6 | @interface JanusJanusPTypes : NSObject
7 | - (nonnull instancetype)init;
8 | + (nonnull instancetype)janusPTypes;
9 |
10 | @end
11 |
12 | extern NSString * __nonnull const JanusJanusPTypesPUBLISHER;
13 | extern NSString * __nonnull const JanusJanusPTypesSUBSCRIBER;
14 |
--------------------------------------------------------------------------------
/test/mocks/transport.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/transport.h"
4 |
5 | namespace Janus {
6 |
7 | class TransportMock : public Transport {
8 | public:
9 | MOCK_METHOD0(type, TransportType());
10 | MOCK_METHOD2(send, void(const nlohmann::json& message, const std::shared_ptr& context));
11 | MOCK_METHOD1(sessionId, void(const std::string& sessionId));
12 | MOCK_METHOD0(close, void());
13 | };
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/generated/cpp/janus/janus_plugins.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 |
9 | namespace Janus {
10 |
11 | struct JanusPlugins final {
12 |
13 | static std::string const ECHO_TEST;
14 |
15 | static std::string const STREAMING;
16 |
17 | static std::string const VIDEOROOM;
18 | };
19 |
20 | } // namespace Janus
21 |
--------------------------------------------------------------------------------
/test/mocks/plugin_command_delegate.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/janus_api.h"
4 |
5 | namespace Janus {
6 |
7 | class PluginCommandDelegateMock : public PluginCommandDelegate {
8 | public:
9 | MOCK_METHOD2(onCommandResult, void(const nlohmann::json& body, const std::shared_ptr& context));
10 | MOCK_METHOD2(onPluginEvent, void(const std::shared_ptr& event, const std::shared_ptr& context));
11 | };
12 |
13 | };
14 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/generated/cpp/janus/janus_plugins.cpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "janus_plugins.hpp" // my header
5 |
6 | namespace Janus {
7 |
8 | std::string const JanusPlugins::ECHO_TEST = {"janus.plugin.echotest"};
9 |
10 | std::string const JanusPlugins::STREAMING = {"janus.plugin.streaming"};
11 |
12 | std::string const JanusPlugins::VIDEOROOM = {"janus.plugin.videoroom"};
13 |
14 | } // namespace Janus
15 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/generated/cpp/janus/peer_factory.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 |
9 | namespace Janus {
10 |
11 | class Peer;
12 | class Protocol;
13 |
14 | class PeerFactory {
15 | public:
16 | virtual ~PeerFactory() {}
17 |
18 | virtual std::shared_ptr create(int64_t id, const std::shared_ptr & owner) = 0;
19 | };
20 |
21 | } // namespace Janus
22 |
--------------------------------------------------------------------------------
/platforms/ios/janus-client.xcodeproj/xcuserdata/helloiampau.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | janus-client.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/java/com/github/helloiampau/app/custom/CustomPluginFactory.java:
--------------------------------------------------------------------------------
1 | package com.github.helloiampau.app.custom;
2 |
3 | import com.github.helloiampau.janus.generated.Plugin;
4 | import com.github.helloiampau.janus.generated.PluginFactory;
5 | import com.github.helloiampau.janus.generated.Protocol;
6 |
7 | public class CustomPluginFactory extends PluginFactory {
8 |
9 | @Override
10 | public Plugin create(long handleId, Protocol owner) {
11 | return new CustomPlugin();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/generated/objc/JanusJanusPlugins.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 |
6 | @interface JanusJanusPlugins : NSObject
7 | - (nonnull instancetype)init;
8 | + (nonnull instancetype)janusPlugins;
9 |
10 | @end
11 |
12 | extern NSString * __nonnull const JanusJanusPluginsECHOTEST;
13 | extern NSString * __nonnull const JanusJanusPluginsSTREAMING;
14 | extern NSString * __nonnull const JanusJanusPluginsVIDEOROOM;
15 |
--------------------------------------------------------------------------------
/generated/cpp/janus/plugin_factory.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 |
9 | namespace Janus {
10 |
11 | class Plugin;
12 | class Protocol;
13 |
14 | class PluginFactory {
15 | public:
16 | virtual ~PluginFactory() {}
17 |
18 | virtual std::shared_ptr create(int64_t handleId, const std::shared_ptr & owner) = 0;
19 | };
20 |
21 | } // namespace Janus
22 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/res/layout/feed_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/include/janus/random.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * janus-client SDK
3 | *
4 | * random.h
5 | * Random utilities
6 | * This module defines a set of utility to generate random strings
7 | *
8 | * Copyright 2019 Pasquale Boemio
9 | */
10 |
11 | #pragma once
12 |
13 | #include
14 |
15 | namespace Janus {
16 |
17 | class Random {
18 | public:
19 | virtual std::string generate() = 0;
20 | };
21 |
22 | class RandomImpl : public Random {
23 | public:
24 | std::string generate();
25 | };
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/generated/cpp/janus/janus_error.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | namespace Janus {
11 |
12 | struct JanusError final {
13 | int64_t code;
14 | std::string message;
15 |
16 | JanusError(int64_t code_,
17 | std::string message_)
18 | : code(std::move(code_))
19 | , message(std::move(message_))
20 | {}
21 | };
22 |
23 | } // namespace Janus
24 |
--------------------------------------------------------------------------------
/generated/cpp/janus/janus_event.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 |
9 | namespace Janus {
10 |
11 | class JanusData;
12 | class Jsep;
13 |
14 | class JanusEvent {
15 | public:
16 | virtual ~JanusEvent() {}
17 |
18 | virtual int64_t sender() = 0;
19 |
20 | virtual std::shared_ptr jsep() = 0;
21 |
22 | virtual std::shared_ptr data() = 0;
23 | };
24 |
25 | } // namespace Janus
26 |
--------------------------------------------------------------------------------
/generated/cpp/janus/camera.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 |
8 | namespace Janus {
9 |
10 | enum class Camera : int {
11 | FRONT,
12 | OTHER,
13 | };
14 |
15 | } // namespace Janus
16 |
17 | namespace std {
18 |
19 | template <>
20 | struct hash<::Janus::Camera> {
21 | size_t operator()(::Janus::Camera type) const {
22 | return std::hash()(static_cast(type));
23 | }
24 | };
25 |
26 | } // namespace std
27 |
--------------------------------------------------------------------------------
/generated/cpp/janus/sdp_type.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 |
8 | namespace Janus {
9 |
10 | enum class SdpType : int {
11 | OFFER,
12 | ANSWER,
13 | };
14 |
15 | } // namespace Janus
16 |
17 | namespace std {
18 |
19 | template <>
20 | struct hash<::Janus::SdpType> {
21 | size_t operator()(::Janus::SdpType type) const {
22 | return std::hash()(static_cast(type));
23 | }
24 | };
25 |
26 | } // namespace std
27 |
--------------------------------------------------------------------------------
/generated/cpp/janus/constraints.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include "sdp_constraints.hpp"
7 | #include "video_constraints.hpp"
8 | #include
9 |
10 | namespace Janus {
11 |
12 | struct Constraints final {
13 | SdpConstraints sdp;
14 | VideoConstraints video;
15 |
16 | Constraints(SdpConstraints sdp_,
17 | VideoConstraints video_)
18 | : sdp(std::move(sdp_))
19 | , video(std::move(video_))
20 | {}
21 | };
22 |
23 | } // namespace Janus
24 |
--------------------------------------------------------------------------------
/test/mocks/protocol_delegate.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/protocol_delegate.hpp"
4 |
5 | namespace Janus {
6 |
7 | class ProtocolDelegateMock : public ProtocolDelegate {
8 | public:
9 | MOCK_METHOD0(onReady, void());
10 | MOCK_METHOD2(onError, void(const JanusError& error, const std::shared_ptr& context));
11 | MOCK_METHOD2(onEvent, void(const std::shared_ptr& event, const std::shared_ptr& context));
12 | MOCK_METHOD1(onHangup, void(const std::string& reason));
13 | MOCK_METHOD0(onClose, void());
14 | };
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/generated/java/com/github/helloiampau/janus/generated/JanusPTypes.java:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | package com.github.helloiampau.janus.generated;
5 |
6 | public final class JanusPTypes {
7 |
8 | public static final String PUBLISHER = "publisher";
9 |
10 | public static final String SUBSCRIBER = "subscriber";
11 |
12 |
13 | public JanusPTypes(
14 | ) {
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | return "JanusPTypes{" +
20 | "}";
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/random.cc:
--------------------------------------------------------------------------------
1 | #include "janus/random.h"
2 |
3 | #include
4 | #include
5 |
6 | namespace Janus {
7 |
8 | std::string RandomImpl::generate() {
9 | const char charset[] = "0123456789" "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
10 | const size_t size = sizeof(charset) - 1;
11 |
12 | auto randomChar = [&]() {
13 | return charset[ rand() % size ];
14 | };
15 |
16 | auto resultSize = 16;
17 | std::string result(resultSize, 0);
18 | std::generate_n(result.begin(), resultSize, randomChar);
19 |
20 | return result;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/generated/objc/JanusJanusError.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 |
6 | @interface JanusJanusError : NSObject
7 | - (nonnull instancetype)initWithCode:(int64_t)code
8 | message:(nonnull NSString *)message;
9 | + (nonnull instancetype)janusErrorWithCode:(int64_t)code
10 | message:(nonnull NSString *)message;
11 |
12 | @property (nonatomic, readonly) int64_t code;
13 |
14 | @property (nonatomic, readonly, nonnull) NSString * message;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/examples/android/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/platforms/ios/janus-client/janus_client.h:
--------------------------------------------------------------------------------
1 | //
2 | // janus_client.h
3 | // janus-client
4 | //
5 | // Created by Pasquale Boemio on 18/10/2019.
6 | // Copyright © 2019 Pasquale Boemio. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for janus_client.
12 | FOUNDATION_EXPORT double janus_clientVersionNumber;
13 |
14 | //! Project version string for janus_client.
15 | FOUNDATION_EXPORT const unsigned char janus_clientVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/java/com/github/helloiampau/janusclientsdk/JanusDelegate.java:
--------------------------------------------------------------------------------
1 | package com.github.helloiampau.janusclientsdk;
2 |
3 | import com.github.helloiampau.janus.generated.ProtocolDelegate;
4 | import com.github.helloiampau.janusclientsdk.rtc.MediaBundle;
5 |
6 | import org.webrtc.DataChannel;
7 |
8 | public abstract class JanusDelegate extends ProtocolDelegate {
9 |
10 | public abstract void onMediaChanged(MediaBundle media);
11 | public abstract void onDatachannelMessage(DataChannel.Buffer buffer);
12 | public abstract String onOffer(String sdp);
13 | public abstract String onAnswer(String sdp);
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/examples/android/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/generated/objc/JanusProtocolDelegate.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusJanusError.h"
5 | #import
6 | @class JanusBundle;
7 | @class JanusJanusEvent;
8 |
9 |
10 | @protocol JanusProtocolDelegate
11 |
12 | - (void)onReady;
13 |
14 | - (void)onClose;
15 |
16 | - (void)onError:(nonnull JanusJanusError *)error
17 | context:(nullable JanusBundle *)context;
18 |
19 | - (void)onEvent:(nullable JanusJanusEvent *)event
20 | context:(nullable JanusBundle *)context;
21 |
22 | - (void)onHangup:(nonnull NSString *)reason;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/test/random.test.cc:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include "janus/random.h"
5 |
6 | using testing::MatchesRegex;
7 |
8 | namespace Janus {
9 |
10 | class RandomImplTest : public testing::Test {};
11 |
12 | TEST_F(RandomImplTest, shouldGenerateA16CharsAlphanumericRandomString) {
13 | auto random = std::make_shared();
14 |
15 | std::string first = random->generate();
16 | std::string second = random->generate();
17 |
18 | EXPECT_NE(first, second);
19 | EXPECT_THAT(first, MatchesRegex("^[a-zA-Z0-9]{16}$"));
20 | EXPECT_THAT(second, MatchesRegex("^[a-zA-Z0-9]{16}$"));
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/test/mocks/platform.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/platform_impl.h"
4 |
5 | namespace Janus {
6 |
7 | class PlatformMock : public PlatformImpl {
8 | public:
9 | MOCK_METHOD1(protocol, void(const std::shared_ptr& protocol));
10 | MOCK_METHOD0(protocol, std::shared_ptr());
11 |
12 | MOCK_METHOD0(peerFactory, std::shared_ptr());
13 |
14 | MOCK_METHOD2(pluginFactory, void(const std::string& id, const std::shared_ptr& factory));
15 | MOCK_METHOD3(plugin, std::shared_ptr(const std::string& id, int64_t handleId, const std::shared_ptr& owner));
16 | };
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/java/com/github/helloiampau/janusclientsdk/JanusConfImpl.java:
--------------------------------------------------------------------------------
1 | package com.github.helloiampau.janusclientsdk;
2 |
3 | import com.github.helloiampau.janus.generated.JanusConf;
4 |
5 | public class JanusConfImpl extends JanusConf {
6 | private String _url;
7 |
8 | @Override
9 | public String url() {
10 | return this._url;
11 | }
12 |
13 | public void url(String url) {
14 | this._url = url;
15 | }
16 |
17 | private String _plugin;
18 |
19 | @Override
20 | public String plugin() {
21 | return this._plugin;
22 | }
23 |
24 | public void plugin(String plugin) {
25 | this._plugin = plugin;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/generated/objc/JanusPlatform.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 | @class JanusPlatform;
6 | @protocol JanusPeerFactory;
7 | @protocol JanusPluginFactory;
8 | @protocol JanusProtocol;
9 |
10 |
11 | @interface JanusPlatform : NSObject
12 |
13 | - (void)protocol:(nullable id)protocol;
14 |
15 | - (void)pluginFactory:(nonnull NSString *)id
16 | factory:(nullable id)factory;
17 |
18 | - (nullable id)peerFactory;
19 |
20 | + (nullable JanusPlatform *)create:(nullable id)factory;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/examples/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.3.2'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 |
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJanusError+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusJanusError.h"
5 | #include "janus_error.hpp"
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusJanusError;
10 |
11 | namespace djinni_generated {
12 |
13 | struct JanusError
14 | {
15 | using CppType = ::Janus::JanusError;
16 | using ObjcType = JanusJanusError*;
17 |
18 | using Boxed = JanusError;
19 |
20 | static CppType toCpp(ObjcType objc);
21 | static ObjcType fromCpp(const CppType& cpp);
22 | };
23 |
24 | } // namespace djinni_generated
25 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/test/java/com/github/helloiampau/janusclientsdk/JanusConfImplTest.java:
--------------------------------------------------------------------------------
1 | package com.github.helloiampau.janusclientsdk;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | public class JanusConfImplTest {
8 |
9 | @Test
10 | public void itShouldHandleTheUrlField() {
11 | JanusConfImpl conf = new JanusConfImpl();
12 | conf.url("yolo");
13 |
14 | assertEquals(conf.url(), "yolo");
15 | }
16 |
17 | @Test
18 | public void itShouldHandleThePluginField() {
19 | JanusConfImpl conf = new JanusConfImpl();
20 | conf.plugin("my yolo plugin");
21 |
22 | assertEquals(conf.plugin(), "my yolo plugin");
23 | }
24 |
25 | }
--------------------------------------------------------------------------------
/generated/objcpp/JanusConstraints+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusConstraints.h"
5 | #include "constraints.hpp"
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusConstraints;
10 |
11 | namespace djinni_generated {
12 |
13 | struct Constraints
14 | {
15 | using CppType = ::Janus::Constraints;
16 | using ObjcType = JanusConstraints*;
17 |
18 | using Boxed = Constraints;
19 |
20 | static CppType toCpp(ObjcType objc);
21 | static ObjcType fromCpp(const CppType& cpp);
22 | };
23 |
24 | } // namespace djinni_generated
25 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJanusPTypes+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusJanusPTypes.h"
5 | #include "janus_p_types.hpp"
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusJanusPTypes;
10 |
11 | namespace djinni_generated {
12 |
13 | struct JanusPTypes
14 | {
15 | using CppType = ::Janus::JanusPTypes;
16 | using ObjcType = JanusJanusPTypes*;
17 |
18 | using Boxed = JanusPTypes;
19 |
20 | static CppType toCpp(ObjcType objc);
21 | static ObjcType fromCpp(const CppType& cpp);
22 | };
23 |
24 | } // namespace djinni_generated
25 |
--------------------------------------------------------------------------------
/generated/java/com/github/helloiampau/janus/generated/JanusPlugins.java:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | package com.github.helloiampau.janus.generated;
5 |
6 | public final class JanusPlugins {
7 |
8 | public static final String ECHO_TEST = "janus.plugin.echotest";
9 |
10 | public static final String STREAMING = "janus.plugin.streaming";
11 |
12 | public static final String VIDEOROOM = "janus.plugin.videoroom";
13 |
14 |
15 | public JanusPlugins(
16 | ) {
17 | }
18 |
19 | @Override
20 | public String toString() {
21 | return "JanusPlugins{" +
22 | "}";
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJanusPlugins+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusJanusPlugins.h"
5 | #include "janus_plugins.hpp"
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusJanusPlugins;
10 |
11 | namespace djinni_generated {
12 |
13 | struct JanusPlugins
14 | {
15 | using CppType = ::Janus::JanusPlugins;
16 | using ObjcType = JanusJanusPlugins*;
17 |
18 | using Boxed = JanusPlugins;
19 |
20 | static CppType toCpp(ObjcType objc);
21 | static ObjcType fromCpp(const CppType& cpp);
22 | };
23 |
24 | } // namespace djinni_generated
25 |
--------------------------------------------------------------------------------
/test/mocks/plugin.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/plugin.hpp"
4 |
5 | namespace Janus {
6 |
7 | class PluginMock : public Plugin {
8 | public:
9 | MOCK_METHOD0(onClose, void());
10 | MOCK_METHOD1(onHangup, void(const std::string& reason));
11 | MOCK_METHOD2(onEvent, void(const std::shared_ptr& event, const std::shared_ptr& context));
12 | MOCK_METHOD2(command, void(const std::string& command, const std::shared_ptr& payload));
13 | MOCK_METHOD2(onOffer, void(const std::string& sdp, const std::shared_ptr& context));
14 | MOCK_METHOD2(onAnswer, void(const std::string& sdp, const std::shared_ptr& context));
15 | };
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJanusCommands+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusJanusCommands.h"
5 | #include "janus_commands.hpp"
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusJanusCommands;
10 |
11 | namespace djinni_generated {
12 |
13 | struct JanusCommands
14 | {
15 | using CppType = ::Janus::JanusCommands;
16 | using ObjcType = JanusJanusCommands*;
17 |
18 | using Boxed = JanusCommands;
19 |
20 | static CppType toCpp(ObjcType objc);
21 | static ObjcType fromCpp(const CppType& cpp);
22 | };
23 |
24 | } // namespace djinni_generated
25 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJanusPTypes+Private.mm:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusJanusPTypes+Private.h"
5 | #import "DJIMarshal+Private.h"
6 | #include
7 |
8 | namespace djinni_generated {
9 |
10 | auto JanusPTypes::toCpp(ObjcType obj) -> CppType
11 | {
12 | assert(obj);
13 | (void)obj; // Suppress warnings in relase builds for empty records
14 | return {};
15 | }
16 |
17 | auto JanusPTypes::fromCpp(const CppType& cpp) -> ObjcType
18 | {
19 | (void)cpp; // Suppress warnings in relase builds for empty records
20 | return [[JanusJanusPTypes alloc] init];
21 | }
22 |
23 | } // namespace djinni_generated
24 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJanusPlugins+Private.mm:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusJanusPlugins+Private.h"
5 | #import "DJIMarshal+Private.h"
6 | #include
7 |
8 | namespace djinni_generated {
9 |
10 | auto JanusPlugins::toCpp(ObjcType obj) -> CppType
11 | {
12 | assert(obj);
13 | (void)obj; // Suppress warnings in relase builds for empty records
14 | return {};
15 | }
16 |
17 | auto JanusPlugins::fromCpp(const CppType& cpp) -> ObjcType
18 | {
19 | (void)cpp; // Suppress warnings in relase builds for empty records
20 | return [[JanusJanusPlugins alloc] init];
21 | }
22 |
23 | } // namespace djinni_generated
24 |
--------------------------------------------------------------------------------
/generated/objc/JanusJanusData.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 | @class JanusJanusData;
6 |
7 |
8 | @interface JanusJanusData : NSObject
9 |
10 | - (nonnull NSString *)getString:(nonnull NSString *)key
11 | fallback:(nonnull NSString *)fallback;
12 |
13 | - (int64_t)getInt:(nonnull NSString *)key
14 | fallback:(int64_t)fallback;
15 |
16 | - (BOOL)getBool:(nonnull NSString *)key
17 | fallback:(BOOL)fallback;
18 |
19 | - (nullable JanusJanusData *)getObject:(nonnull NSString *)key;
20 |
21 | - (nonnull NSArray *)getList:(nonnull NSString *)key;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJanusCommands+Private.mm:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusJanusCommands+Private.h"
5 | #import "DJIMarshal+Private.h"
6 | #include
7 |
8 | namespace djinni_generated {
9 |
10 | auto JanusCommands::toCpp(ObjcType obj) -> CppType
11 | {
12 | assert(obj);
13 | (void)obj; // Suppress warnings in relase builds for empty records
14 | return {};
15 | }
16 |
17 | auto JanusCommands::fromCpp(const CppType& cpp) -> ObjcType
18 | {
19 | (void)cpp; // Suppress warnings in relase builds for empty records
20 | return [[JanusJanusCommands alloc] init];
21 | }
22 |
23 | } // namespace djinni_generated
24 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusSdpConstraints+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusSdpConstraints.h"
5 | #include "sdp_constraints.hpp"
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusSdpConstraints;
10 |
11 | namespace djinni_generated {
12 |
13 | struct SdpConstraints
14 | {
15 | using CppType = ::Janus::SdpConstraints;
16 | using ObjcType = JanusSdpConstraints*;
17 |
18 | using Boxed = SdpConstraints;
19 |
20 | static CppType toCpp(ObjcType objc);
21 | static ObjcType fromCpp(const CppType& cpp);
22 | };
23 |
24 | } // namespace djinni_generated
25 |
--------------------------------------------------------------------------------
/generated/objc/JanusJanusPTypes.mm:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusJanusPTypes.h"
5 |
6 |
7 | NSString * __nonnull const JanusJanusPTypesPUBLISHER = @"publisher";
8 |
9 | NSString * __nonnull const JanusJanusPTypesSUBSCRIBER = @"subscriber";
10 |
11 | @implementation JanusJanusPTypes
12 |
13 | - (nonnull instancetype)init
14 | {
15 | if (self = [super init]) {
16 | }
17 | return self;
18 | }
19 |
20 | + (nonnull instancetype)janusPTypes
21 | {
22 | return [[self alloc] init];
23 | }
24 |
25 | - (NSString *)description
26 | {
27 | return [NSString stringWithFormat:@"<%@ %p>", self.class, (void *)self];
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | This project has been abandoned.
2 |
3 |

4 |
Janus Client SDK
5 |
6 |
The Janus Gateway client SDK for native environments
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusVideoConstraints+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusVideoConstraints.h"
5 | #include "video_constraints.hpp"
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusVideoConstraints;
10 |
11 | namespace djinni_generated {
12 |
13 | struct VideoConstraints
14 | {
15 | using CppType = ::Janus::VideoConstraints;
16 | using ObjcType = JanusVideoConstraints*;
17 |
18 | using Boxed = VideoConstraints;
19 |
20 | static CppType toCpp(ObjcType objc);
21 | static ObjcType fromCpp(const CppType& cpp);
22 | };
23 |
24 | } // namespace djinni_generated
25 |
--------------------------------------------------------------------------------
/src/plugins/janus_plugin.cc:
--------------------------------------------------------------------------------
1 | #include "janus/plugins/janus_plugin.h"
2 |
3 | namespace Janus {
4 |
5 | JanusPlugin::JanusPlugin(int64_t handleId, const std::shared_ptr& delegate, const std::shared_ptr& peerFactory, const std::shared_ptr& owner) {
6 | this->_delegate = delegate;
7 | this->_peerFactory = peerFactory;
8 | this->_owner = owner;
9 | this->_handleId = handleId;
10 | }
11 |
12 | void JanusPlugin::onClose() {
13 | if(this->_peer == nullptr) {
14 | return;
15 | }
16 |
17 | this->onHangup("");
18 | }
19 |
20 | void JanusPlugin::onHangup(const std::string& reason) {
21 | this->_peer->close();
22 | this->_peer = nullptr;
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/generated/cpp/janus/video_constraints.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include "camera.hpp"
7 | #include
8 | #include
9 |
10 | namespace Janus {
11 |
12 | struct VideoConstraints final {
13 | int32_t width;
14 | int32_t height;
15 | int32_t fps;
16 | Camera camera;
17 |
18 | VideoConstraints(int32_t width_,
19 | int32_t height_,
20 | int32_t fps_,
21 | Camera camera_)
22 | : width(std::move(width_))
23 | , height(std::move(height_))
24 | , fps(std::move(fps_))
25 | , camera(std::move(camera_))
26 | {}
27 | };
28 |
29 | } // namespace Janus
30 |
--------------------------------------------------------------------------------
/test/mocks/peer.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/peer.hpp"
4 | #include "janus/constraints.hpp"
5 |
6 | namespace Janus {
7 |
8 | class PeerMock : public Peer {
9 | public:
10 | MOCK_METHOD0(close, void());
11 | MOCK_METHOD2(createOffer, void(const Constraints & constraints, const std::shared_ptr& context));
12 | MOCK_METHOD2(createAnswer, void(const Constraints & constraints, const std::shared_ptr& context));
13 | MOCK_METHOD2(setLocalDescription, void(SdpType type, const std::string & sdp));
14 | MOCK_METHOD2(setRemoteDescription, void(SdpType type, const std::string & sdp));
15 | MOCK_METHOD3(addIceCandidate, void(const std::string & mid, int32_t index, const std::string & sdp));
16 | };
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/generated/objc/JanusJanus.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 | @class JanusBundle;
6 | @class JanusJanus;
7 | @class JanusPlatform;
8 | @protocol JanusJanusConf;
9 | @protocol JanusProtocolDelegate;
10 |
11 |
12 | @interface JanusJanus : NSObject
13 |
14 | - (void)init;
15 |
16 | - (void)close;
17 |
18 | - (void)hangup;
19 |
20 | - (void)dispatch:(nonnull NSString *)command
21 | payload:(nullable JanusBundle *)payload;
22 |
23 | + (nullable JanusJanus *)create:(nullable id)conf
24 | platform:(nullable JanusPlatform *)platform
25 | delegate:(nullable id)delegate;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/generated/objc/JanusPlugin.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 | @class JanusBundle;
6 | @class JanusJanusEvent;
7 |
8 |
9 | @protocol JanusPlugin
10 |
11 | - (void)onEvent:(nullable JanusJanusEvent *)event
12 | context:(nullable JanusBundle *)context;
13 |
14 | - (void)onHangup:(nonnull NSString *)reason;
15 |
16 | - (void)onClose;
17 |
18 | - (void)command:(nonnull NSString *)command
19 | payload:(nullable JanusBundle *)payload;
20 |
21 | - (void)onOffer:(nonnull NSString *)sdp
22 | context:(nullable JanusBundle *)context;
23 |
24 | - (void)onAnswer:(nonnull NSString *)sdp
25 | context:(nullable JanusBundle *)context;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJanusError+Private.mm:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusJanusError+Private.h"
5 | #import "DJIMarshal+Private.h"
6 | #include
7 |
8 | namespace djinni_generated {
9 |
10 | auto JanusError::toCpp(ObjcType obj) -> CppType
11 | {
12 | assert(obj);
13 | return {::djinni::I64::toCpp(obj.code),
14 | ::djinni::String::toCpp(obj.message)};
15 | }
16 |
17 | auto JanusError::fromCpp(const CppType& cpp) -> ObjcType
18 | {
19 | return [[JanusJanusError alloc] initWithCode:(::djinni::I64::fromCpp(cpp.code))
20 | message:(::djinni::String::fromCpp(cpp.message))];
21 | }
22 |
23 | } // namespace djinni_generated
24 |
--------------------------------------------------------------------------------
/generated/cpp/janus/platform.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 |
9 | namespace Janus {
10 |
11 | class PeerFactory;
12 | class PluginFactory;
13 | class Protocol;
14 |
15 | class Platform {
16 | public:
17 | virtual ~Platform() {}
18 |
19 | virtual void protocol(const std::shared_ptr & protocol) = 0;
20 |
21 | virtual void pluginFactory(const std::string & id, const std::shared_ptr & factory) = 0;
22 |
23 | virtual std::shared_ptr peerFactory() = 0;
24 |
25 | static std::shared_ptr create(const std::shared_ptr & factory);
26 | };
27 |
28 | } // namespace Janus
29 |
--------------------------------------------------------------------------------
/generated/objc/JanusConstraints.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusSdpConstraints.h"
5 | #import "JanusVideoConstraints.h"
6 | #import
7 |
8 | @interface JanusConstraints : NSObject
9 | - (nonnull instancetype)initWithSdp:(nonnull JanusSdpConstraints *)sdp
10 | video:(nonnull JanusVideoConstraints *)video;
11 | + (nonnull instancetype)constraintsWithSdp:(nonnull JanusSdpConstraints *)sdp
12 | video:(nonnull JanusVideoConstraints *)video;
13 |
14 | @property (nonatomic, readonly, nonnull) JanusSdpConstraints * sdp;
15 |
16 | @property (nonatomic, readonly, nonnull) JanusVideoConstraints * video;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/examples/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 |
15 |
16 |
--------------------------------------------------------------------------------
/generated/cpp/janus/protocol_delegate.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 |
9 | namespace Janus {
10 |
11 | class Bundle;
12 | class JanusEvent;
13 | struct JanusError;
14 |
15 | class ProtocolDelegate {
16 | public:
17 | virtual ~ProtocolDelegate() {}
18 |
19 | virtual void onReady() = 0;
20 |
21 | virtual void onClose() = 0;
22 |
23 | virtual void onError(const JanusError & error, const std::shared_ptr & context) = 0;
24 |
25 | virtual void onEvent(const std::shared_ptr & event, const std::shared_ptr & context) = 0;
26 |
27 | virtual void onHangup(const std::string & reason) = 0;
28 | };
29 |
30 | } // namespace Janus
31 |
--------------------------------------------------------------------------------
/platforms/ios/janus-clientTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/test/async.test.cc:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include "janus/async.h"
5 |
6 | using testing::ElementsAre;
7 |
8 | namespace Janus {
9 |
10 | class AsyncTest : public testing::Test {
11 | };
12 |
13 | TEST_F(AsyncTest, shouldExecuteTasksInBackground) {
14 | std::mutex mutex;
15 |
16 | std::vector results = { -1, -1 };
17 | auto async = std::make_shared();
18 |
19 | async->submit([&] {
20 | std::lock_guard lock(mutex);
21 | results[0] = 200;
22 | });
23 |
24 | async->submit([&] {
25 | std::lock_guard lock(mutex);
26 | results[1] = 201;
27 | });
28 |
29 | usleep(10000);
30 |
31 | std::lock_guard lock(mutex);
32 | EXPECT_THAT(results, ElementsAre(200, 201));
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/generated/cpp/janus/janus.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 |
9 | namespace Janus {
10 |
11 | class Bundle;
12 | class JanusConf;
13 | class Platform;
14 | class ProtocolDelegate;
15 |
16 | class Janus {
17 | public:
18 | virtual ~Janus() {}
19 |
20 | virtual void init() = 0;
21 |
22 | virtual void close() = 0;
23 |
24 | virtual void hangup() = 0;
25 |
26 | virtual void dispatch(const std::string & command, const std::shared_ptr & payload) = 0;
27 |
28 | static std::shared_ptr create(const std::shared_ptr & conf, const std::shared_ptr & platform, const std::shared_ptr & delegate);
29 | };
30 |
31 | } // namespace Janus
32 |
--------------------------------------------------------------------------------
/generated/cpp/janus/janus_data.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | namespace Janus {
12 |
13 | class JanusData {
14 | public:
15 | virtual ~JanusData() {}
16 |
17 | virtual std::string getString(const std::string & key, const std::string & fallback) = 0;
18 |
19 | virtual int64_t getInt(const std::string & key, int64_t fallback) = 0;
20 |
21 | virtual bool getBool(const std::string & key, bool fallback) = 0;
22 |
23 | virtual std::shared_ptr getObject(const std::string & key) = 0;
24 |
25 | virtual std::vector> getList(const std::string & key) = 0;
26 | };
27 |
28 | } // namespace Janus
29 |
--------------------------------------------------------------------------------
/platforms/ios/janus-client/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 |
22 |
23 |
--------------------------------------------------------------------------------
/generated/objc/JanusJanusPlugins.mm:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusJanusPlugins.h"
5 |
6 |
7 | NSString * __nonnull const JanusJanusPluginsECHOTEST = @"janus.plugin.echotest";
8 |
9 | NSString * __nonnull const JanusJanusPluginsSTREAMING = @"janus.plugin.streaming";
10 |
11 | NSString * __nonnull const JanusJanusPluginsVIDEOROOM = @"janus.plugin.videoroom";
12 |
13 | @implementation JanusJanusPlugins
14 |
15 | - (nonnull instancetype)init
16 | {
17 | if (self = [super init]) {
18 | }
19 | return self;
20 | }
21 |
22 | + (nonnull instancetype)janusPlugins
23 | {
24 | return [[self alloc] init];
25 | }
26 |
27 | - (NSString *)description
28 | {
29 | return [NSString stringWithFormat:@"<%@ %p>", self.class, (void *)self];
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/examples/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJsep+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "jsep.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusJsep;
10 |
11 | namespace djinni_generated {
12 |
13 | class Jsep
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::Jsep>;
17 | using CppOptType = std::shared_ptr<::Janus::Jsep>;
18 | using ObjcType = JanusJsep*;
19 |
20 | using Boxed = Jsep;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/test/mocks/bundle.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/bundle.hpp"
4 |
5 | #include "janus/constraints.hpp"
6 |
7 | namespace Janus {
8 |
9 | class BundleMock : public Bundle {
10 | public:
11 | MOCK_METHOD2(setString, void(const std::string& key, const std::string& value));
12 | MOCK_METHOD2(getString, std::string(const std::string& key, const std::string& fallback));
13 |
14 | MOCK_METHOD2(setInt, void(const std::string& key, int64_t value));
15 | MOCK_METHOD2(getInt, int64_t(const std::string& key, int64_t fallback));
16 |
17 | MOCK_METHOD2(setBool, void(const std::string& key, bool value));
18 | MOCK_METHOD2(getBool, bool(const std::string& key, bool fallback));
19 |
20 | MOCK_METHOD1(setConstraints, void(const Constraints& constraints));
21 | MOCK_METHOD0(getConstraints, Constraints());
22 | };
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJanus+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "janus.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusJanus;
10 |
11 | namespace djinni_generated {
12 |
13 | class Janus
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::Janus>;
17 | using CppOptType = std::shared_ptr<::Janus::Janus>;
18 | using ObjcType = JanusJanus*;
19 |
20 | using Boxed = Janus;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusPeer+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "peer.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @protocol JanusPeer;
10 |
11 | namespace djinni_generated {
12 |
13 | class Peer
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::Peer>;
17 | using CppOptType = std::shared_ptr<::Janus::Peer>;
18 | using ObjcType = id;
19 |
20 | using Boxed = Peer;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusBundle+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "bundle.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusBundle;
10 |
11 | namespace djinni_generated {
12 |
13 | class Bundle
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::Bundle>;
17 | using CppOptType = std::shared_ptr<::Janus::Bundle>;
18 | using ObjcType = JanusBundle*;
19 |
20 | using Boxed = Bundle;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusPlugin+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "plugin.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @protocol JanusPlugin;
10 |
11 | namespace djinni_generated {
12 |
13 | class Plugin
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::Plugin>;
17 | using CppOptType = std::shared_ptr<::Janus::Plugin>;
18 | using ObjcType = id;
19 |
20 | using Boxed = Plugin;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/generated/cpp/janus/sdp_constraints.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 |
8 | namespace Janus {
9 |
10 | struct SdpConstraints final {
11 | bool send_audio;
12 | bool send_video;
13 | bool receive_audio;
14 | bool receive_video;
15 | bool datachannel;
16 |
17 | SdpConstraints(bool send_audio_,
18 | bool send_video_,
19 | bool receive_audio_,
20 | bool receive_video_,
21 | bool datachannel_)
22 | : send_audio(std::move(send_audio_))
23 | , send_video(std::move(send_video_))
24 | , receive_audio(std::move(receive_audio_))
25 | , receive_video(std::move(receive_video_))
26 | , datachannel(std::move(datachannel_))
27 | {}
28 | };
29 |
30 | } // namespace Janus
31 |
--------------------------------------------------------------------------------
/examples/android/app/src/main/java/com/github/helloiampau/app/custom/CustomPlugin.java:
--------------------------------------------------------------------------------
1 | package com.github.helloiampau.app.custom;
2 |
3 | import com.github.helloiampau.janus.generated.Bundle;
4 | import com.github.helloiampau.janus.generated.JanusEvent;
5 | import com.github.helloiampau.janus.generated.Plugin;
6 |
7 | public class CustomPlugin extends Plugin {
8 |
9 | @Override
10 | public void onEvent(JanusEvent event, Bundle context) {
11 |
12 | }
13 |
14 | @Override
15 | public void onHangup(String reason) {
16 |
17 | }
18 |
19 | @Override
20 | public void onClose() {
21 |
22 | }
23 |
24 | @Override
25 | public void command(String command, Bundle payload) {
26 |
27 | }
28 |
29 | @Override
30 | public void onOffer(String sdp, Bundle context) {
31 |
32 | }
33 |
34 | @Override
35 | public void onAnswer(String sdp, Bundle context) {
36 |
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusPlatform+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "platform.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusPlatform;
10 |
11 | namespace djinni_generated {
12 |
13 | class Platform
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::Platform>;
17 | using CppOptType = std::shared_ptr<::Janus::Platform>;
18 | using ObjcType = JanusPlatform*;
19 |
20 | using Boxed = Platform;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusProtocol+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "protocol.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @protocol JanusProtocol;
10 |
11 | namespace djinni_generated {
12 |
13 | class Protocol
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::Protocol>;
17 | using CppOptType = std::shared_ptr<::Janus::Protocol>;
18 | using ObjcType = id;
19 |
20 | using Boxed = Protocol;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/generated/java/com/github/helloiampau/janus/generated/JanusError.java:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | package com.github.helloiampau.janus.generated;
5 |
6 | public final class JanusError {
7 |
8 |
9 | /*package*/ final long code;
10 |
11 | /*package*/ final String message;
12 |
13 | public JanusError(
14 | long code,
15 | String message) {
16 | this.code = code;
17 | this.message = message;
18 | }
19 |
20 | public long getCode() {
21 | return code;
22 | }
23 |
24 | public String getMessage() {
25 | return message;
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | return "JanusError{" +
31 | "code=" + code +
32 | "," + "message=" + message +
33 | "}";
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJanusData+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "janus_data.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusJanusData;
10 |
11 | namespace djinni_generated {
12 |
13 | class JanusData
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::JanusData>;
17 | using CppOptType = std::shared_ptr<::Janus::JanusData>;
18 | using ObjcType = JanusJanusData*;
19 |
20 | using Boxed = JanusData;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusConstraints+Private.mm:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusConstraints+Private.h"
5 | #import "JanusSdpConstraints+Private.h"
6 | #import "JanusVideoConstraints+Private.h"
7 | #include
8 |
9 | namespace djinni_generated {
10 |
11 | auto Constraints::toCpp(ObjcType obj) -> CppType
12 | {
13 | assert(obj);
14 | return {::djinni_generated::SdpConstraints::toCpp(obj.sdp),
15 | ::djinni_generated::VideoConstraints::toCpp(obj.video)};
16 | }
17 |
18 | auto Constraints::fromCpp(const CppType& cpp) -> ObjcType
19 | {
20 | return [[JanusConstraints alloc] initWithSdp:(::djinni_generated::SdpConstraints::fromCpp(cpp.sdp))
21 | video:(::djinni_generated::VideoConstraints::fromCpp(cpp.video))];
22 | }
23 |
24 | } // namespace djinni_generated
25 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJanusConf+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "janus_conf.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @protocol JanusJanusConf;
10 |
11 | namespace djinni_generated {
12 |
13 | class JanusConf
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::JanusConf>;
17 | using CppOptType = std::shared_ptr<::Janus::JanusConf>;
18 | using ObjcType = id;
19 |
20 | using Boxed = JanusConf;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusJanusEvent+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "janus_event.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusJanusEvent;
10 |
11 | namespace djinni_generated {
12 |
13 | class JanusEvent
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::JanusEvent>;
17 | using CppOptType = std::shared_ptr<::Janus::JanusEvent>;
18 | using ObjcType = JanusJanusEvent*;
19 |
20 | using Boxed = JanusEvent;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusPeerFactory+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "peer_factory.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @protocol JanusPeerFactory;
10 |
11 | namespace djinni_generated {
12 |
13 | class PeerFactory
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::PeerFactory>;
17 | using CppOptType = std::shared_ptr<::Janus::PeerFactory>;
18 | using ObjcType = id;
19 |
20 | using Boxed = PeerFactory;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/generated/cpp/janus/plugin.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 |
9 | namespace Janus {
10 |
11 | class Bundle;
12 | class JanusEvent;
13 |
14 | class Plugin {
15 | public:
16 | virtual ~Plugin() {}
17 |
18 | virtual void onEvent(const std::shared_ptr & event, const std::shared_ptr & context) = 0;
19 |
20 | virtual void onHangup(const std::string & reason) = 0;
21 |
22 | virtual void onClose() = 0;
23 |
24 | virtual void command(const std::string & command, const std::shared_ptr & payload) = 0;
25 |
26 | virtual void onOffer(const std::string & sdp, const std::shared_ptr & context) = 0;
27 |
28 | virtual void onAnswer(const std::string & sdp, const std::shared_ptr & context) = 0;
29 | };
30 |
31 | } // namespace Janus
32 |
--------------------------------------------------------------------------------
/generated/objc/JanusJanusError.mm:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusJanusError.h"
5 |
6 |
7 | @implementation JanusJanusError
8 |
9 | - (nonnull instancetype)initWithCode:(int64_t)code
10 | message:(nonnull NSString *)message
11 | {
12 | if (self = [super init]) {
13 | _code = code;
14 | _message = [message copy];
15 | }
16 | return self;
17 | }
18 |
19 | + (nonnull instancetype)janusErrorWithCode:(int64_t)code
20 | message:(nonnull NSString *)message
21 | {
22 | return [[self alloc] initWithCode:code
23 | message:message];
24 | }
25 |
26 | - (NSString *)description
27 | {
28 | return [NSString stringWithFormat:@"<%@ %p code:%@ message:%@>", self.class, (void *)self, @(self.code), self.message];
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusPluginFactory+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "plugin_factory.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @protocol JanusPluginFactory;
10 |
11 | namespace djinni_generated {
12 |
13 | class PluginFactory
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::PluginFactory>;
17 | using CppOptType = std::shared_ptr<::Janus::PluginFactory>;
18 | using ObjcType = id;
19 |
20 | using Boxed = PluginFactory;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/generated/java/com/github/helloiampau/janus/generated/Constraints.java:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | package com.github.helloiampau.janus.generated;
5 |
6 | public final class Constraints {
7 |
8 |
9 | /*package*/ final SdpConstraints sdp;
10 |
11 | /*package*/ final VideoConstraints video;
12 |
13 | public Constraints(
14 | SdpConstraints sdp,
15 | VideoConstraints video) {
16 | this.sdp = sdp;
17 | this.video = video;
18 | }
19 |
20 | public SdpConstraints getSdp() {
21 | return sdp;
22 | }
23 |
24 | public VideoConstraints getVideo() {
25 | return video;
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | return "Constraints{" +
31 | "sdp=" + sdp +
32 | "," + "video=" + video +
33 | "}";
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/generated/jni/native_camera.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include "camera.hpp"
7 | #include "djinni_support.hpp"
8 |
9 | namespace djinni_generated {
10 |
11 | class NativeCamera final : ::djinni::JniEnum {
12 | public:
13 | using CppType = ::Janus::Camera;
14 | using JniType = jobject;
15 |
16 | using Boxed = NativeCamera;
17 |
18 | static CppType toCpp(JNIEnv* jniEnv, JniType j) { return static_cast(::djinni::JniClass::get().ordinal(jniEnv, j)); }
19 | static ::djinni::LocalRef fromCpp(JNIEnv* jniEnv, CppType c) { return ::djinni::JniClass::get().create(jniEnv, static_cast(c)); }
20 |
21 | private:
22 | NativeCamera() : JniEnum("com/github/helloiampau/janus/generated/Camera") {}
23 | friend ::djinni::JniClass;
24 | };
25 |
26 | } // namespace djinni_generated
27 |
--------------------------------------------------------------------------------
/generated/objc/JanusPeer.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusConstraints.h"
5 | #import "JanusSdpType.h"
6 | #import
7 | @class JanusBundle;
8 |
9 |
10 | @protocol JanusPeer
11 |
12 | - (void)createOffer:(nonnull JanusConstraints *)constraints
13 | context:(nullable JanusBundle *)context;
14 |
15 | - (void)createAnswer:(nonnull JanusConstraints *)constraints
16 | context:(nullable JanusBundle *)context;
17 |
18 | - (void)setLocalDescription:(JanusSdpType)type
19 | sdp:(nonnull NSString *)sdp;
20 |
21 | - (void)setRemoteDescription:(JanusSdpType)type
22 | sdp:(nonnull NSString *)sdp;
23 |
24 | - (void)addIceCandidate:(nonnull NSString *)mid
25 | index:(int32_t)index
26 | sdp:(nonnull NSString *)sdp;
27 |
28 | - (void)close;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusProtocolDelegate+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "protocol_delegate.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @protocol JanusProtocolDelegate;
10 |
11 | namespace djinni_generated {
12 |
13 | class ProtocolDelegate
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::ProtocolDelegate>;
17 | using CppOptType = std::shared_ptr<::Janus::ProtocolDelegate>;
18 | using ObjcType = id;
19 |
20 | using Boxed = ProtocolDelegate;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/generated/jni/native_sdp_type.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include "djinni_support.hpp"
7 | #include "sdp_type.hpp"
8 |
9 | namespace djinni_generated {
10 |
11 | class NativeSdpType final : ::djinni::JniEnum {
12 | public:
13 | using CppType = ::Janus::SdpType;
14 | using JniType = jobject;
15 |
16 | using Boxed = NativeSdpType;
17 |
18 | static CppType toCpp(JNIEnv* jniEnv, JniType j) { return static_cast(::djinni::JniClass::get().ordinal(jniEnv, j)); }
19 | static ::djinni::LocalRef fromCpp(JNIEnv* jniEnv, CppType c) { return ::djinni::JniClass::get().create(jniEnv, static_cast(c)); }
20 |
21 | private:
22 | NativeSdpType() : JniEnum("com/github/helloiampau/janus/generated/SdpType") {}
23 | friend ::djinni::JniClass;
24 | };
25 |
26 | } // namespace djinni_generated
27 |
--------------------------------------------------------------------------------
/generated/objc/JanusConstraints.mm:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusConstraints.h"
5 |
6 |
7 | @implementation JanusConstraints
8 |
9 | - (nonnull instancetype)initWithSdp:(nonnull JanusSdpConstraints *)sdp
10 | video:(nonnull JanusVideoConstraints *)video
11 | {
12 | if (self = [super init]) {
13 | _sdp = sdp;
14 | _video = video;
15 | }
16 | return self;
17 | }
18 |
19 | + (nonnull instancetype)constraintsWithSdp:(nonnull JanusSdpConstraints *)sdp
20 | video:(nonnull JanusVideoConstraints *)video
21 | {
22 | return [[self alloc] initWithSdp:sdp
23 | video:video];
24 | }
25 |
26 | - (NSString *)description
27 | {
28 | return [NSString stringWithFormat:@"<%@ %p sdp:%@ video:%@>", self.class, (void *)self, self.sdp, self.video];
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/test/mocks/protocol.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "janus/protocol.hpp"
4 |
5 | namespace Janus {
6 |
7 | class ProtocolMock : public Protocol {
8 | public:
9 | MOCK_METHOD0(name, std::string());
10 | MOCK_METHOD0(close, void());
11 | MOCK_METHOD0(hangup, void());
12 | MOCK_METHOD3(init, void(const std::shared_ptr& conf, const std::shared_ptr& platform, const std::shared_ptr& delegate));
13 | MOCK_METHOD2(dispatch, void(const std::string& command, const std::shared_ptr& payload));
14 |
15 | MOCK_METHOD2(onOffer, void(const std::string& sdp, const std::shared_ptr& context));
16 | MOCK_METHOD2(onAnswer, void(const std::string& sdp, const std::shared_ptr& context));
17 | MOCK_METHOD4(onIceCandidate, void(const std::string& mid, int32_t index, const std::string& sdp, int64_t id));
18 | MOCK_METHOD1(onIceCompleted, void(int64_t id));
19 | };
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusConstraintsBuilder+Private.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "constraints_builder.hpp"
5 | #include
6 |
7 | static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
8 |
9 | @class JanusConstraintsBuilder;
10 |
11 | namespace djinni_generated {
12 |
13 | class ConstraintsBuilder
14 | {
15 | public:
16 | using CppType = std::shared_ptr<::Janus::ConstraintsBuilder>;
17 | using CppOptType = std::shared_ptr<::Janus::ConstraintsBuilder>;
18 | using ObjcType = JanusConstraintsBuilder*;
19 |
20 | using Boxed = ConstraintsBuilder;
21 |
22 | static CppType toCpp(ObjcType objc);
23 | static ObjcType fromCppOpt(const CppOptType& cpp);
24 | static ObjcType fromCpp(const CppType& cpp) { return fromCppOpt(cpp); }
25 |
26 | private:
27 | class ObjcProxy;
28 | };
29 |
30 | } // namespace djinni_generated
31 |
32 |
--------------------------------------------------------------------------------
/generated/cpp/janus/peer.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | namespace Janus {
11 |
12 | class Bundle;
13 | enum class SdpType;
14 | struct Constraints;
15 |
16 | class Peer {
17 | public:
18 | virtual ~Peer() {}
19 |
20 | virtual void createOffer(const Constraints & constraints, const std::shared_ptr & context) = 0;
21 |
22 | virtual void createAnswer(const Constraints & constraints, const std::shared_ptr & context) = 0;
23 |
24 | virtual void setLocalDescription(SdpType type, const std::string & sdp) = 0;
25 |
26 | virtual void setRemoteDescription(SdpType type, const std::string & sdp) = 0;
27 |
28 | virtual void addIceCandidate(const std::string & mid, int32_t index, const std::string & sdp) = 0;
29 |
30 | virtual void close() = 0;
31 | };
32 |
33 | } // namespace Janus
34 |
--------------------------------------------------------------------------------
/generated/jni/native_janus_p_types.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include "djinni_support.hpp"
7 | #include "janus_p_types.hpp"
8 |
9 | namespace djinni_generated {
10 |
11 | class NativeJanusPTypes final {
12 | public:
13 | using CppType = ::Janus::JanusPTypes;
14 | using JniType = jobject;
15 |
16 | using Boxed = NativeJanusPTypes;
17 |
18 | ~NativeJanusPTypes();
19 |
20 | static CppType toCpp(JNIEnv* jniEnv, JniType j);
21 | static ::djinni::LocalRef fromCpp(JNIEnv* jniEnv, const CppType& c);
22 |
23 | private:
24 | NativeJanusPTypes();
25 | friend ::djinni::JniClass;
26 |
27 | const ::djinni::GlobalRef clazz { ::djinni::jniFindClass("com/github/helloiampau/janus/generated/JanusPTypes") };
28 | const jmethodID jconstructor { ::djinni::jniGetMethodID(clazz.get(), "", "()V") };
29 | };
30 |
31 | } // namespace djinni_generated
32 |
--------------------------------------------------------------------------------
/generated/objc/JanusVideoConstraints.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusCamera.h"
5 | #import
6 |
7 | @interface JanusVideoConstraints : NSObject
8 | - (nonnull instancetype)initWithWidth:(int32_t)width
9 | height:(int32_t)height
10 | fps:(int32_t)fps
11 | camera:(JanusCamera)camera;
12 | + (nonnull instancetype)videoConstraintsWithWidth:(int32_t)width
13 | height:(int32_t)height
14 | fps:(int32_t)fps
15 | camera:(JanusCamera)camera;
16 |
17 | @property (nonatomic, readonly) int32_t width;
18 |
19 | @property (nonatomic, readonly) int32_t height;
20 |
21 | @property (nonatomic, readonly) int32_t fps;
22 |
23 | @property (nonatomic, readonly) JanusCamera camera;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/generated/jni/native_janus_plugins.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include "djinni_support.hpp"
7 | #include "janus_plugins.hpp"
8 |
9 | namespace djinni_generated {
10 |
11 | class NativeJanusPlugins final {
12 | public:
13 | using CppType = ::Janus::JanusPlugins;
14 | using JniType = jobject;
15 |
16 | using Boxed = NativeJanusPlugins;
17 |
18 | ~NativeJanusPlugins();
19 |
20 | static CppType toCpp(JNIEnv* jniEnv, JniType j);
21 | static ::djinni::LocalRef fromCpp(JNIEnv* jniEnv, const CppType& c);
22 |
23 | private:
24 | NativeJanusPlugins();
25 | friend ::djinni::JniClass;
26 |
27 | const ::djinni::GlobalRef clazz { ::djinni::jniFindClass("com/github/helloiampau/janus/generated/JanusPlugins") };
28 | const jmethodID jconstructor { ::djinni::jniGetMethodID(clazz.get(), "", "()V") };
29 | };
30 |
31 | } // namespace djinni_generated
32 |
--------------------------------------------------------------------------------
/generated/jni/native_janus_commands.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include "djinni_support.hpp"
7 | #include "janus_commands.hpp"
8 |
9 | namespace djinni_generated {
10 |
11 | class NativeJanusCommands final {
12 | public:
13 | using CppType = ::Janus::JanusCommands;
14 | using JniType = jobject;
15 |
16 | using Boxed = NativeJanusCommands;
17 |
18 | ~NativeJanusCommands();
19 |
20 | static CppType toCpp(JNIEnv* jniEnv, JniType j);
21 | static ::djinni::LocalRef fromCpp(JNIEnv* jniEnv, const CppType& c);
22 |
23 | private:
24 | NativeJanusCommands();
25 | friend ::djinni::JniClass;
26 |
27 | const ::djinni::GlobalRef clazz { ::djinni::jniFindClass("com/github/helloiampau/janus/generated/JanusCommands") };
28 | const jmethodID jconstructor { ::djinni::jniGetMethodID(clazz.get(), "", "()V") };
29 | };
30 |
31 | } // namespace djinni_generated
32 |
--------------------------------------------------------------------------------
/generated/objc/JanusBundle.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusConstraints.h"
5 | #import
6 | @class JanusBundle;
7 |
8 |
9 | @interface JanusBundle : NSObject
10 |
11 | - (void)setString:(nonnull NSString *)key
12 | value:(nonnull NSString *)value;
13 |
14 | - (nonnull NSString *)getString:(nonnull NSString *)key
15 | fallback:(nonnull NSString *)fallback;
16 |
17 | - (void)setInt:(nonnull NSString *)key
18 | value:(int64_t)value;
19 |
20 | - (int64_t)getInt:(nonnull NSString *)key
21 | fallback:(int64_t)fallback;
22 |
23 | - (void)setBool:(nonnull NSString *)key
24 | value:(BOOL)value;
25 |
26 | - (BOOL)getBool:(nonnull NSString *)key
27 | fallback:(BOOL)fallback;
28 |
29 | - (void)setConstraints:(nonnull JanusConstraints *)constraints;
30 |
31 | - (nonnull JanusConstraints *)getConstraints;
32 |
33 | + (nullable JanusBundle *)create;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/include/janus/janus_impl.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * janus-client SDK
3 | *
4 | * janus_impl.h
5 | * Janus service implementation
6 | * This class defines the main API you use to interact with the library
7 | *
8 | * Copyright 2019 Pasquale Boemio
9 | */
10 |
11 | #pragma once
12 |
13 | #include "janus/janus.hpp"
14 |
15 | #include "janus/platform_impl.h"
16 | #include "janus/protocol_delegate.hpp"
17 |
18 | namespace Janus {
19 |
20 | class JanusImpl : public Janus {
21 | public:
22 | JanusImpl(const std::shared_ptr& conf, const std::shared_ptr& platform, const std::shared_ptr& delegate);
23 |
24 | void init();
25 | void close();
26 | void hangup();
27 | void dispatch(const std::string& command, const std::shared_ptr& payload);
28 |
29 | private:
30 | std::shared_ptr _conf;
31 | std::shared_ptr _platform;
32 | std::shared_ptr _delegate;
33 |
34 | std::shared_ptr _protocol;
35 | };
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/generated/jni/native_janus_p_types.cpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "native_janus_p_types.hpp" // my header
5 |
6 | namespace djinni_generated {
7 |
8 | NativeJanusPTypes::NativeJanusPTypes() = default;
9 |
10 | NativeJanusPTypes::~NativeJanusPTypes() = default;
11 |
12 | auto NativeJanusPTypes::fromCpp(JNIEnv* jniEnv, const CppType& c) -> ::djinni::LocalRef {
13 | (void)c; // Suppress warnings in release builds for empty records
14 | const auto& data = ::djinni::JniClass::get();
15 | auto r = ::djinni::LocalRef{jniEnv->NewObject(data.clazz.get(), data.jconstructor)};
16 | ::djinni::jniExceptionCheck(jniEnv);
17 | return r;
18 | }
19 |
20 | auto NativeJanusPTypes::toCpp(JNIEnv* jniEnv, JniType j) -> CppType {
21 | ::djinni::JniLocalScope jscope(jniEnv, 1);
22 | assert(j != nullptr);
23 | (void)j; // Suppress warnings in release builds for empty records
24 | return {};
25 | }
26 |
27 | } // namespace djinni_generated
28 |
--------------------------------------------------------------------------------
/include/janus/plugins/janus_plugin.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * janus-client SDK
3 | *
4 | * janus_plugin.h
5 | * The Janus Base Plugin
6 | * This module implements the base functionalities of all janus plugins.
7 | *
8 | * Copyright 2019 Pasquale Boemio
9 | */
10 |
11 | #pragma once
12 |
13 | #include "janus/plugin.hpp"
14 |
15 | #include "janus/peer.hpp"
16 | #include "janus/peer_factory.hpp"
17 | #include "janus/janus_api.h"
18 |
19 | namespace Janus {
20 |
21 | class JanusPlugin : public Plugin {
22 | public:
23 | JanusPlugin(int64_t handleId, const std::shared_ptr& delegate, const std::shared_ptr& peerFactory, const std::shared_ptr& owner);
24 | void onHangup(const std::string& reason);
25 | void onClose();
26 |
27 | protected:
28 | std::shared_ptr _peer;
29 |
30 | int64_t _handleId = -1;
31 |
32 | std::shared_ptr _owner;
33 | std::shared_ptr _peerFactory;
34 | std::shared_ptr _delegate;
35 | };
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/generated/jni/native_janus_plugins.cpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "native_janus_plugins.hpp" // my header
5 |
6 | namespace djinni_generated {
7 |
8 | NativeJanusPlugins::NativeJanusPlugins() = default;
9 |
10 | NativeJanusPlugins::~NativeJanusPlugins() = default;
11 |
12 | auto NativeJanusPlugins::fromCpp(JNIEnv* jniEnv, const CppType& c) -> ::djinni::LocalRef {
13 | (void)c; // Suppress warnings in release builds for empty records
14 | const auto& data = ::djinni::JniClass::get();
15 | auto r = ::djinni::LocalRef{jniEnv->NewObject(data.clazz.get(), data.jconstructor)};
16 | ::djinni::jniExceptionCheck(jniEnv);
17 | return r;
18 | }
19 |
20 | auto NativeJanusPlugins::toCpp(JNIEnv* jniEnv, JniType j) -> CppType {
21 | ::djinni::JniLocalScope jscope(jniEnv, 1);
22 | assert(j != nullptr);
23 | (void)j; // Suppress warnings in release builds for empty records
24 | return {};
25 | }
26 |
27 | } // namespace djinni_generated
28 |
--------------------------------------------------------------------------------
/generated/cpp/janus/bundle.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | namespace Janus {
11 |
12 | struct Constraints;
13 |
14 | class Bundle {
15 | public:
16 | virtual ~Bundle() {}
17 |
18 | virtual void setString(const std::string & key, const std::string & value) = 0;
19 |
20 | virtual std::string getString(const std::string & key, const std::string & fallback) = 0;
21 |
22 | virtual void setInt(const std::string & key, int64_t value) = 0;
23 |
24 | virtual int64_t getInt(const std::string & key, int64_t fallback) = 0;
25 |
26 | virtual void setBool(const std::string & key, bool value) = 0;
27 |
28 | virtual bool getBool(const std::string & key, bool fallback) = 0;
29 |
30 | virtual void setConstraints(const Constraints & constraints) = 0;
31 |
32 | virtual Constraints getConstraints() = 0;
33 |
34 | static std::shared_ptr create();
35 | };
36 |
37 | } // namespace Janus
38 |
--------------------------------------------------------------------------------
/platforms/ios/janus-clientTests/janus_clientTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // janus_clientTests.m
3 | // janus-clientTests
4 | //
5 | // Created by Pasquale Boemio on 18/10/2019.
6 | // Copyright © 2019 Pasquale Boemio. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface janus_clientTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation janus_clientTests
16 |
17 | - (void)setUp {
18 | // Put setup code here. This method is called before the invocation of each test method in the class.
19 | }
20 |
21 | - (void)tearDown {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | - (void)testExample {
26 | // This is an example of a functional test case.
27 | // Use XCTAssert and related functions to verify your tests produce the correct results.
28 | }
29 |
30 | - (void)testPerformanceExample {
31 | // This is an example of a performance test case.
32 | [self measureBlock:^{
33 | // Put the code you want to measure the time of here.
34 | }];
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/generated/jni/native_janus_commands.cpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #include "native_janus_commands.hpp" // my header
5 |
6 | namespace djinni_generated {
7 |
8 | NativeJanusCommands::NativeJanusCommands() = default;
9 |
10 | NativeJanusCommands::~NativeJanusCommands() = default;
11 |
12 | auto NativeJanusCommands::fromCpp(JNIEnv* jniEnv, const CppType& c) -> ::djinni::LocalRef {
13 | (void)c; // Suppress warnings in release builds for empty records
14 | const auto& data = ::djinni::JniClass::get();
15 | auto r = ::djinni::LocalRef{jniEnv->NewObject(data.clazz.get(), data.jconstructor)};
16 | ::djinni::jniExceptionCheck(jniEnv);
17 | return r;
18 | }
19 |
20 | auto NativeJanusCommands::toCpp(JNIEnv* jniEnv, JniType j) -> CppType {
21 | ::djinni::JniLocalScope jscope(jniEnv, 1);
22 | assert(j != nullptr);
23 | (void)j; // Suppress warnings in release builds for empty records
24 | return {};
25 | }
26 |
27 | } // namespace djinni_generated
28 |
--------------------------------------------------------------------------------
/platforms/android/janus-client/src/main/java/com/github/helloiampau/janusclientsdk/rtc/MutableMediaBundle.java:
--------------------------------------------------------------------------------
1 | package com.github.helloiampau.janusclientsdk.rtc;
2 |
3 | import org.webrtc.AudioTrack;
4 | import org.webrtc.DataChannel;
5 | import org.webrtc.VideoCapturer;
6 | import org.webrtc.VideoTrack;
7 |
8 | public class MutableMediaBundle extends MediaBundle {
9 |
10 | public void localVideoTrack(VideoTrack localTrack) {
11 | this._localVideoTrack = localTrack;
12 | }
13 |
14 | public void localAudioTrack(AudioTrack localTrack) {
15 | this._localAudioTrack = localTrack;
16 | }
17 |
18 | public void addRemoteVideoTrack(VideoTrack remoteVideoTrack) {
19 | this._remoteVideoTracks.add(remoteVideoTrack);
20 | }
21 |
22 | public void addRemoteAudioTrack(AudioTrack remoteAudioTrack) {
23 | this._remoteAudioTracks.add(remoteAudioTrack);
24 | }
25 |
26 | public void videoCapturer(VideoCapturer videoCapturer) {
27 | this._videoCapturer = videoCapturer;
28 | }
29 |
30 | public void dataChannel(DataChannel dataChannel) {
31 | this._dataChannel = dataChannel;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/generated/objc/JanusProtocol.h:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import
5 | @class JanusBundle;
6 | @class JanusPlatform;
7 | @protocol JanusJanusConf;
8 | @protocol JanusProtocolDelegate;
9 |
10 |
11 | @protocol JanusProtocol
12 |
13 | - (nonnull NSString *)name;
14 |
15 | - (void)init:(nullable id)conf
16 | platform:(nullable JanusPlatform *)platform
17 | delegate:(nullable id)delegate;
18 |
19 | - (void)dispatch:(nonnull NSString *)command
20 | payload:(nullable JanusBundle *)payload;
21 |
22 | - (void)hangup;
23 |
24 | - (void)close;
25 |
26 | - (void)onOffer:(nonnull NSString *)sdp
27 | context:(nullable JanusBundle *)context;
28 |
29 | - (void)onAnswer:(nonnull NSString *)sdp
30 | context:(nullable JanusBundle *)context;
31 |
32 | - (void)onIceCandidate:(nonnull NSString *)mid
33 | index:(int32_t)index
34 | sdp:(nonnull NSString *)sdp
35 | id:(int64_t)id;
36 |
37 | - (void)onIceCompleted:(int64_t)id;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/include/janus/async.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * janus-client SDK
3 | *
4 | * async.h
5 | * Single thread work queue
6 | * This class defines a work queue you can use to submit async tasks
7 | *
8 | * Copyright 2019 Pasquale Boemio
9 | */
10 |
11 | #pragma once
12 |
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 |
20 | #define THREAD_POOL_SIZE 2
21 |
22 | namespace Janus {
23 |
24 | typedef std::function Task;
25 |
26 | class Async {
27 | public:
28 | virtual void submit(Task task) = 0;
29 | };
30 |
31 | class AsyncImpl : public Async {
32 | public:
33 | AsyncImpl();
34 | ~AsyncImpl();
35 |
36 | void submit(Task task);
37 | private:
38 | bool _isEnabled();
39 |
40 | static void* _loop(AsyncImpl* context);
41 |
42 | std::queue _queue;
43 | std::mutex _queueMutex;
44 | std::condition_variable _notEmpty;
45 |
46 | std::mutex _enabledMutex;
47 | bool _enabled = true;
48 |
49 | std::thread _threads[THREAD_POOL_SIZE];
50 | };
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/generated/cpp/janus/janus_commands.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include
7 | #include
8 |
9 | namespace Janus {
10 |
11 | struct JanusCommands final {
12 |
13 | static std::string const CALL;
14 |
15 | static std::string const UPDATE;
16 |
17 | static std::string const LIST;
18 |
19 | static std::string const LISTPARTICIPANTS;
20 |
21 | static std::string const INFO;
22 |
23 | static std::string const PUBLISH;
24 |
25 | static std::string const SUBSCRIBE;
26 |
27 | static std::string const WATCH;
28 |
29 | static std::string const START;
30 |
31 | static std::string const PAUSE;
32 |
33 | static std::string const STOP;
34 |
35 | static std::string const JOIN;
36 |
37 | static std::string const ATTACH;
38 |
39 | static std::string const CREATE;
40 |
41 | static std::string const DESTROY;
42 |
43 | static std::string const TRICKLE;
44 |
45 | static std::string const TRICKLE_COMPLETED;
46 |
47 | static std::string const HANGUP;
48 | };
49 |
50 | } // namespace Janus
51 |
--------------------------------------------------------------------------------
/generated/jni/native_jsep.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include "djinni_support.hpp"
7 | #include "jsep.hpp"
8 |
9 | namespace djinni_generated {
10 |
11 | class NativeJsep final : ::djinni::JniInterface<::Janus::Jsep, NativeJsep> {
12 | public:
13 | using CppType = std::shared_ptr<::Janus::Jsep>;
14 | using CppOptType = std::shared_ptr<::Janus::Jsep>;
15 | using JniType = jobject;
16 |
17 | using Boxed = NativeJsep;
18 |
19 | ~NativeJsep();
20 |
21 | static CppType toCpp(JNIEnv* jniEnv, JniType j) { return ::djinni::JniClass::get()._fromJava(jniEnv, j); }
22 | static ::djinni::LocalRef fromCppOpt(JNIEnv* jniEnv, const CppOptType& c) { return {jniEnv, ::djinni::JniClass::get()._toJava(jniEnv, c)}; }
23 | static ::djinni::LocalRef fromCpp(JNIEnv* jniEnv, const CppType& c) { return fromCppOpt(jniEnv, c); }
24 |
25 | private:
26 | NativeJsep();
27 | friend ::djinni::JniClass;
28 | friend ::djinni::JniInterface<::Janus::Jsep, NativeJsep>;
29 |
30 | };
31 |
32 | } // namespace djinni_generated
33 |
--------------------------------------------------------------------------------
/generated/objcpp/JanusVideoConstraints+Private.mm:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #import "JanusVideoConstraints+Private.h"
5 | #import "DJIMarshal+Private.h"
6 | #import "JanusCamera+Private.h"
7 | #include
8 |
9 | namespace djinni_generated {
10 |
11 | auto VideoConstraints::toCpp(ObjcType obj) -> CppType
12 | {
13 | assert(obj);
14 | return {::djinni::I32::toCpp(obj.width),
15 | ::djinni::I32::toCpp(obj.height),
16 | ::djinni::I32::toCpp(obj.fps),
17 | ::djinni::Enum<::Janus::Camera, JanusCamera>::toCpp(obj.camera)};
18 | }
19 |
20 | auto VideoConstraints::fromCpp(const CppType& cpp) -> ObjcType
21 | {
22 | return [[JanusVideoConstraints alloc] initWithWidth:(::djinni::I32::fromCpp(cpp.width))
23 | height:(::djinni::I32::fromCpp(cpp.height))
24 | fps:(::djinni::I32::fromCpp(cpp.fps))
25 | camera:(::djinni::Enum<::Janus::Camera, JanusCamera>::fromCpp(cpp.camera))];
26 | }
27 |
28 | } // namespace djinni_generated
29 |
--------------------------------------------------------------------------------
/generated/jni/native_janus.hpp:
--------------------------------------------------------------------------------
1 | // AUTOGENERATED FILE - DO NOT MODIFY!
2 | // This file generated by Djinni from janus-client.djinni
3 |
4 | #pragma once
5 |
6 | #include "djinni_support.hpp"
7 | #include "janus.hpp"
8 |
9 | namespace djinni_generated {
10 |
11 | class NativeJanus final : ::djinni::JniInterface<::Janus::Janus, NativeJanus> {
12 | public:
13 | using CppType = std::shared_ptr<::Janus::Janus>;
14 | using CppOptType = std::shared_ptr<::Janus::Janus>;
15 | using JniType = jobject;
16 |
17 | using Boxed = NativeJanus;
18 |
19 | ~NativeJanus();
20 |
21 | static CppType toCpp(JNIEnv* jniEnv, JniType j) { return ::djinni::JniClass