Skip to content

Commit

Permalink
C++ Client: provide entry points for C API
Browse files Browse the repository at this point in the history
  • Loading branch information
kosak committed Jun 27, 2024
1 parent 20f9c74 commit 9c3120a
Show file tree
Hide file tree
Showing 8 changed files with 3,015 additions and 38 deletions.
7 changes: 7 additions & 0 deletions cpp-client/deephaven/dhclient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ set(ALL_FILES
include/public/deephaven/client/flight.h
include/public/deephaven/client/update_by.h

src/interop/client_interop.cc
src/interop/client_options_interop.cc
include/public/deephaven/client/interop/client_interop.h
include/public/deephaven/client/interop/client_options_interop.h

src/subscription/subscribe_thread.cc

include/private/deephaven/client/subscription/subscribe_thread.h
Expand Down Expand Up @@ -95,6 +100,8 @@ set(ALL_FILES
proto/deephaven/proto/ticket.grpc.pb.h
proto/deephaven/proto/ticket.pb.cc
proto/deephaven/proto/ticket.pb.h
include/public/deephaven/client/interop/update_by_interop.h
src/interop/update_by_interop.cc
)

add_library(dhclient SHARED ${ALL_FILES})
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
*/
#include <cstdint>
#include "deephaven/client/client_options.h"
#include "deephaven/dhcore/interop/interop_util.h"

extern "C" {
void deephaven_client_ClientOptions_ctor(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_ClientOptions_dtor(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> self);
void deephaven_client_ClientOptions_SetDefaultAuthentication(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> self,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_ClientOptions_SetBasicAuthentication(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> self,
const char *username, const char *password,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_ClientOptions_SetCustomAuthentication(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> self,
const char *authentication_key, const char *authentication_value,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_ClientOptions_SetSessionType(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> self,
const char *session_type,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_ClientOptions_SetUseTls(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> self,
deephaven::dhcore::interop::InteropBool use_tls,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_ClientOptions_SetTlsRootCerts(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> self,
const char *tls_root_certs,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_ClientOptions_SetClientCertChain(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> self,
const char *client_cert_chain,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_ClientOptions_SetClientPrivateKey(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> self,
const char *client_private_key,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_ClientOptions_AddIntOption(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> self,
const char *opt, int32_t val,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_ClientOptions_AddStringOption(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> self,
const char *opt, const char *val,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_ClientOptions_AddExtraHeader(
deephaven::dhcore::interop::NativePtr<deephaven::client::ClientOptions> self,
const char *header_name, const char *header_value,
deephaven::dhcore::interop::ErrorStatus *status);
} // extern "C"
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
/*
* Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
*/
#include <cstdint>
#include "deephaven/client/client.h"
#include "deephaven/client/client_options.h"
#include "deephaven/client/update_by.h"
#include "deephaven/client/utility/table_maker.h"
#include "deephaven/dhcore/interop/interop_util.h"


extern "C" {
void deephaven_client_UpdateByOperation_dtor(
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> self);
void deephaven_client_update_by_cumSum(
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_cumProd(
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_cumMin(
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_cumMax(
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_forwardFill(
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_delta(
const char **cols, int32_t num_cols,
deephaven::client::update_by::DeltaControl delta_control,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_emaTick(double decay_ticks,
const char **cols, int32_t num_cols,
const deephaven::client::update_by::OperationControl *op_control,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_emaTime(const char *timestamp_col,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> decay_time,
const char **cols, int32_t num_cols,
const deephaven::client::update_by::OperationControl *op_control,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_emsTick(double decay_ticks,
const char **cols, int32_t num_cols,
const deephaven::client::update_by::OperationControl *op_control,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_emsTime(const char *timestamp_col,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> decay_time,
const char **cols, int32_t num_cols,
const deephaven::client::update_by::OperationControl *op_control,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_emminTick(double decay_ticks,
const char **cols, int32_t num_cols,
const deephaven::client::update_by::OperationControl *op_control,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_emminTime(const char *timestamp_col,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> decay_time,
const char **cols, int32_t num_cols,
const deephaven::client::update_by::OperationControl *op_control,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_emmaxTick(double decay_ticks,
const char **cols, int32_t num_cols,
const deephaven::client::update_by::OperationControl *op_control,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_emmaxTime(const char *timestamp_col,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> decay_time,
const char **cols, int32_t num_cols,
const deephaven::client::update_by::OperationControl *op_control,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_emstdTick(double decay_ticks,
const char **cols, int32_t num_cols,
const deephaven::client::update_by::OperationControl *op_control,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_emstdTime(const char *timestamp_col,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> decay_time,
const char **cols, int32_t num_cols,
const deephaven::client::update_by::OperationControl *op_control,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingSumTick(
const char **cols, int32_t num_cols,
int32_t rev_ticks, int32_t fwd_ticks,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingSumTime(const char *timestamp_col,
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> rev_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> fwd_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingGroupTick(
const char **cols, int32_t num_cols,
int32_t rev_ticks, int32_t fwd_ticks,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingGroupTime(const char *timestamp_col,
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> rev_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> fwd_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingAvgTick(
const char **cols, int32_t num_cols,
int32_t rev_ticks, int32_t fwd_ticks,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingAvgTime(const char *timestamp_col,
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> rev_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> fwd_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingMinTick(
const char **cols, int32_t num_cols,
int32_t rev_ticks, int32_t fwd_ticks,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingMinTime(const char *timestamp_col,
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> rev_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> fwd_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingMaxTick(
const char **cols, int32_t num_cols,
int32_t rev_ticks, int32_t fwd_ticks,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingMaxTime(const char *timestamp_col,
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> rev_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> fwd_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingProdTick(
const char **cols, int32_t num_cols,
int32_t rev_ticks, int32_t fwd_ticks,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingProdTime(const char *timestamp_col,
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> rev_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> fwd_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingCountTick(
const char **cols, int32_t num_cols,
int32_t rev_ticks, int32_t fwd_ticks,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingCountTime(const char *timestamp_col,
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> rev_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> fwd_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingStdTick(
const char **cols, int32_t num_cols,
int32_t rev_ticks, int32_t fwd_ticks,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingStdTime(const char *timestamp_col,
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> rev_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> fwd_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingWavgTick(const char *weight_col,
const char **cols, int32_t num_cols,
int32_t rev_ticks, int32_t fwd_ticks,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
void deephaven_client_update_by_rollingWavgTime(const char *timestamp_col,
const char *weight_col,
const char **cols, int32_t num_cols,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> rev_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::utility::DurationSpecifier> fwd_time,
deephaven::dhcore::interop::NativePtr<deephaven::client::UpdateByOperation> *result,
deephaven::dhcore::interop::ErrorStatus *status);
} // extern "C"
Loading

0 comments on commit 9c3120a

Please sign in to comment.