Skip to content

Commit

Permalink
Fix test (hopefully) (#68)
Browse files Browse the repository at this point in the history
* Fix "bindings changed"

* Also run workflow on PR
  • Loading branch information
Sainan authored Nov 10, 2023
1 parent 899eb51 commit a1b9989
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Test CI

on: push
on: [push, pull_request]

env:
CARGO_TERM_COLOR: always
Expand Down
23 changes: 0 additions & 23 deletions includes-cpp/wooting-analog-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ enum class WootingAnalogResult {
WootingAnalogResult_DLLNotFound = -1990,
};

/// The core `DeviceInfo` struct which contains all the interesting information
/// for a particular device. This is for use internally and should be ignored if you're
/// trying to use it when trying to interact with the SDK using the wrapper
struct WootingAnalog_DeviceInfo;

using WootingAnalog_DeviceID = uint64_t;

/// The core `DeviceInfo` struct which contains all the interesting information
Expand All @@ -86,21 +81,3 @@ struct WootingAnalog_DeviceInfo_FFI {
/// Hardware type of the Device
WootingAnalog_DeviceType device_type;
};

extern "C" {

/// Create a new device info struct. This is only for use in Plugins that are written in C
/// Rust plugins should use the native constructor
/// The memory for the struct has been allocated in Rust. So `drop_device_info` must be called
/// for the memory to be properly released
WootingAnalog_DeviceInfo *new_device_info(uint16_t vendor_id,
uint16_t product_id,
char *manufacturer_name,
char *device_name,
WootingAnalog_DeviceID device_id,
WootingAnalog_DeviceType device_type);

/// Drops the given `DeviceInfo`
void drop_device_info(WootingAnalog_DeviceInfo *device);

} // extern "C"
25 changes: 0 additions & 25 deletions includes/wooting-analog-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,6 @@ typedef enum WootingAnalogResult {
WootingAnalogResult_DLLNotFound = -1990,
} WootingAnalogResult;

/**
* The core `DeviceInfo` struct which contains all the interesting information
* for a particular device. This is for use internally and should be ignored if you're
* trying to use it when trying to interact with the SDK using the wrapper
*/
typedef struct WootingAnalog_DeviceInfo WootingAnalog_DeviceInfo;

typedef uint64_t WootingAnalog_DeviceID;

/**
Expand Down Expand Up @@ -141,21 +134,3 @@ typedef struct WootingAnalog_DeviceInfo_FFI {
*/
enum WootingAnalog_DeviceType device_type;
} WootingAnalog_DeviceInfo_FFI;

/**
* Create a new device info struct. This is only for use in Plugins that are written in C
* Rust plugins should use the native constructor
* The memory for the struct has been allocated in Rust. So `drop_device_info` must be called
* for the memory to be properly released
*/
struct WootingAnalog_DeviceInfo *new_device_info(uint16_t vendor_id,
uint16_t product_id,
char *manufacturer_name,
char *device_name,
WootingAnalog_DeviceID device_id,
enum WootingAnalog_DeviceType device_type);

/**
* Drops the given `DeviceInfo`
*/
void drop_device_info(struct WootingAnalog_DeviceInfo *device);

0 comments on commit a1b9989

Please sign in to comment.