Repositories (8)
docs.buttplug.io
6 snippets stored for this repo
<button id="remote-connector-example-button">Run Websocket Connection Example</button>
<button id="device-enumeration-example-button">Run Device Enumeration (Embedded) Example</button>
<button id="device-control-example-button">Run Device Control (Embedded) Example</button>
<script lang="javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web/buttplug.min.js"></script>
<script lang="javascript" src="async-example.js"></script>
<script lang="javascript" src="errors-example.js"></script>
<script lang="javascript" src="device-control-example.js"></script>
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// To create a Websocket Connector, you need the websocket address and some generics fuckery.
let connector = new_json_ws_client_connector("ws://192.168.123.103:12345/buttplug");
let client = ButtplugClient::new("Example Client");
// Usual embedded connector setup. We'll assume the server found all
// of the subtype managers for us (the default features include all of them).
//let client = in_process_client("Example Client", false).await;
// To create a Websocket Connector, you need the websocket address and some generics fuckery.
let connector = new_json_ws_client_connector("ws://127.0.0.1:12345/buttplug");
let client = ButtplugClient::new("Example Client");
client.connect(connector).await?;
using System;
using System.Threading.Tasks;
using Buttplug.Client;
using Buttplug.Core;
namespace AsyncExample
{
using Buttplug.Client;
using System;
using System.Collections.Generic;
{
// Now that we've seen all of the different parts of Buttplug, let's
// put them together in a small program.
buttplug-rs-ffi
13 snippets stored for this repo
package io.buttplug;
import com.sun.jna.*;
package io.buttplug;
import com.sun.jna.Pointer;
import io.buttplug.exceptions.ButtplugException;
import io.buttplug.exceptions.ButtplugMessageException;
import io.buttplug.protos.ButtplugRsFfi.*;
package io.buttplug;
import java.net.URI;
public class WebsocketConnectorOptions {
public URI networkAddress;
package io.buttplug.exceptions;
import io.buttplug.protos.ButtplugRsFfi.ServerMessage;
public class ButtplugException extends Exception {
public ButtplugException(String msg) {
super(msg);
package io.buttplug.exceptions;
public class ButtplugPingException extends ButtplugException {
public ButtplugPingException(String msg) {
super(msg);
}
package io.buttplug.exceptions;
public class ButtplugDeviceException extends ButtplugException {
public ButtplugDeviceException(String msg) {
super(msg);
}
package io.buttplug.exceptions;
public class ButtplugMessageException extends ButtplugException {
public ButtplugMessageException(String msg) {
super(msg);
}
package io.buttplug.exceptions;
public class ButtplugUnknownException extends ButtplugException {
public ButtplugUnknownException(String msg) {
super(msg);
}
&ButtplugClientError::ButtplugError(ButtplugError::ButtplugPingError(
buttplug::core::errors::ButtplugPingError::PingedOut,
)),
use super::{FFICallbackContext, FFICallbackContextWrapper};
use buttplug::{util::async_manager, util::logging::ChannelWriter};
#[cfg(not(feature = "wasm"))]
*
* Detailed information about configuring a multi-project build in Gradle can be found
* in the user manual at https://docs.gradle.org/6.8.3/userguide/multi_project_builds.html
*/
rootProject.name = "buttplug"
include("lib")
group = "io.buttplug"
version = "0.0.1"
mavenCentral()
// grab and cache things from buttplug github releases
val github = ivy {
buttplug-csharp
7 snippets stored for this repo
// <copyright file="AssemblyInfo.cs" company="Nonpolynomial Labs LLC">
// Buttplug C# Source Code File - Visit https://buttplug.io for more info about the project.
// Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
// Licensed under the BSD 3-Clause license. See LICENSE file in the project root for full license information.
// </copyright>
using System.Runtime.CompilerServices;
// <copyright file="ButtplugDeviceMessage.cs" company="Nonpolynomial Labs LLC">
// Buttplug C# Source Code File - Visit https://buttplug.io for more info about the project.
// Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
// Licensed under the BSD 3-Clause license. See LICENSE file in the project root for full license information.
// </copyright>
using Newtonsoft.Json;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using Buttplug.Core.Messages;
using Buttplug.Core;
namespace Buttplug.Client
// <copyright file="DeviceAddedEventArgs.cs" company="Nonpolynomial Labs LLC">
// Buttplug C# Source Code File - Visit https://buttplug.io for more info about the project.
// Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
// Licensed under the BSD 3-Clause license. See LICENSE file in the project root for full license information.
// </copyright>
namespace Buttplug.Client
// <copyright file="IButtplugClientConnector.cs" company="Nonpolynomial Labs LLC">
// Buttplug C# Source Code File - Visit https://buttplug.io for more info about the project.
// Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
// Licensed under the BSD 3-Clause license. See LICENSE file in the project root for full license information.
// </copyright>
using System;
// <copyright file="ButtplugException.cs" company="Nonpolynomial Labs LLC">
// Buttplug C# Source Code File - Visit https://buttplug.io for more info about the project.
// Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
// Licensed under the BSD 3-Clause license. See LICENSE file in the project root for full license information.
// </copyright>
using System;
using Buttplug.Core;
using System;
using System.Net.WebSockets;
using Buttplug.Core.Messages;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
buttplug.world
2 snippets stored for this repo
<head>
<title>Buttplug World</title>
<style>
<div class="page">
<h1>Welcome to buttplug.world, 1995 HTML edition!</h1>
<p>buttplug.world houses applications and tests for use with programs that support the Buttplug Sex Toy Control Protocol. For more information, visit <a href="http://buttplug.io">buttplug.io</a>.</p>
buttplug-tampermonkey
2 snippets stored for this repo
}
.buttplug-button {
box-shadow:inset 0px 1px 3px 0px #91b8b3;
</div>`;
container_div.id = "buttplug-top-container";
body.appendChild(container_div);
buttplug-py
1 snippets stored for this repo
__version__ = "0.3.0"
name = "buttplug"
buttplug_dart
12 snippets stored for this repo
export "package:buttplug/client/client.dart";
export "package:buttplug/client/client_device.dart";
import 'package:buttplug/buttplug.dart';
class ButtplugClientDeviceException implements Exception {
// Return the contents of the message as the map we need to fill out normal Buttplug command messages.
Map<int, T> asMap(int featureCount) {
import 'package:buttplug/messages/messages.dart';
import 'package:loggy/loggy.dart';
import 'package:buttplug/messages/messages.dart';
abstract class ButtplugClientConnector {
Future<void> connect();
Future<void> disconnect();
void send(ButtplugClientMessageUnion message);
Stream<ButtplugServerMessage> get messageStream;
import 'dart:async';
import 'dart:convert';
import 'package:buttplug/connectors/connector.dart';
import 'package:buttplug/messages/messages.dart';
import 'package:loggy/loggy.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
import 'dart:async';
import 'package:buttplug/client/client_device.dart';
import 'package:buttplug/client/sorter.dart';
import 'package:buttplug/connectors/connector.dart';
import 'package:buttplug/messages/messages.dart';
import 'package:buttplug/buttplug.dart';
import 'package:loggy/loggy.dart';
void main() async {
Loggy.initLoggy(
logPrinter: const PrettyPrinter(),
logOptions: const LogOptions(
// This should match what's in buttplug's rust server impl, but this is *not standardized*.
enum Endpoint {
/// Firmware updates (Buttplug does not update firmware, but some firmware endpoints are used for
/// mode setting)
import 'package:json_annotation/json_annotation.dart';
import 'package:buttplug/messages/enums.dart';
import 'dart:convert';
import 'package:buttplug/buttplug.dart';
import 'package:test/test.dart';
void main() {
group('Message de/serialization', () {
buttplug
3 snippets stored for this repo
// Buttplug Rust Source Code File - See https://buttplug.io for more info.
//
// Copyright 2016-2024 Nonpolynomial Labs LLC. All rights reserved.
//
// Licensed under the BSD 3-Clause license. See LICENSE file in the project root
// for full license information.
// Get document, or throw exception on error
const doc = yaml.load(fs.readFileSync('./device-config-v2/buttplug-device-config-v2.yml', 'utf8'));
for (var protocol in doc["protocols"]) {
}
fs.writeFileSync("device-config-v3/buttplug-device-config-v3.yml", yaml.dump(doc));