Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ proto_library(
srcs = [
"lib/src/main/proto/Av.proto",
"lib/src/main/proto/Core.proto",
"lib/src/main/proto/ProtoLog.proto",
],
)

Expand Down
6 changes: 0 additions & 6 deletions lib/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,12 @@ add_library(
${ANDROID_CPU_FEATURES}
ToxAv/Av.proto
ToxCore/Core.proto
util/ProtoLog.proto
ToxAv/generated/enums.cpp
ToxAv/generated/errors.cpp
ToxAv/generated/impls.h
ToxAv/generated/im_tox_tox4j_impl_jni_ToxAvJni.h
ToxAv/generated/natives.h
ToxAv/av.cpp
ToxAv/debug.cpp
ToxAv/lifecycle.cpp
ToxAv/ToxAv.cpp
ToxAv/ToxAv.h
Expand All @@ -88,7 +86,6 @@ add_library(
ToxCore/clientinfo.cpp
ToxCore/connection.cpp
ToxCore/custom.cpp
ToxCore/debug.cpp
ToxCore/filetransfer.cpp
ToxCore/friendlist.cpp
ToxCore/interaction.cpp
Expand All @@ -99,7 +96,6 @@ add_library(
ToxCrypto/generated/errors.cpp
ToxCrypto/generated/im_tox_tox4j_impl_jni_ToxCryptoJni.h
ToxCrypto/generated/natives.h
ToxCrypto/debug.cpp
ToxCrypto/encryptsave.cpp
ToxCrypto/hash.cpp
ToxCrypto/ToxCrypto.cpp
Expand All @@ -122,8 +118,6 @@ add_library(
util/jni/Enum.h
util/jni/UTFChars.cpp
util/jni/UTFChars.h
util/debug_log.cpp
util/debug_log.h
util/exceptions.cpp
util/exceptions.h
util/instance_manager.h
Expand Down
38 changes: 0 additions & 38 deletions lib/src/main/cpp/ToxAv/debug.cpp

This file was deleted.

33 changes: 0 additions & 33 deletions lib/src/main/cpp/ToxAv/generated/enums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,6 @@ Enum::valueOf<TOXAV_CALL_CONTROL> (JNIEnv *env, jint ordinal)
tox4j_fatal ("Invalid enumerator from Java");
}

template<>
void
print_arg<TOXAV_CALL_CONTROL> (protolog::Value &value, TOXAV_CALL_CONTROL const &arg)
{
switch (arg)
{
case TOXAV_CALL_CONTROL_RESUME: value.set_v_string ("TOXAV_CALL_CONTROL_RESUME"); return;
case TOXAV_CALL_CONTROL_PAUSE: value.set_v_string ("TOXAV_CALL_CONTROL_PAUSE"); return;
case TOXAV_CALL_CONTROL_CANCEL: value.set_v_string ("TOXAV_CALL_CONTROL_CANCEL"); return;
case TOXAV_CALL_CONTROL_MUTE_AUDIO: value.set_v_string ("TOXAV_CALL_CONTROL_MUTE_AUDIO"); return;
case TOXAV_CALL_CONTROL_UNMUTE_AUDIO: value.set_v_string ("TOXAV_CALL_CONTROL_UNMUTE_AUDIO"); return;
case TOXAV_CALL_CONTROL_HIDE_VIDEO: value.set_v_string ("TOXAV_CALL_CONTROL_HIDE_VIDEO"); return;
case TOXAV_CALL_CONTROL_SHOW_VIDEO: value.set_v_string ("TOXAV_CALL_CONTROL_SHOW_VIDEO"); return;
}
value.set_v_string ("(TOXAV_CALL_CONTROL)" + std::to_string (arg));
}

template<>
jint
Enum::ordinal<TOXAV_FRIEND_CALL_STATE> (JNIEnv *env, TOXAV_FRIEND_CALL_STATE valueOf)
Expand Down Expand Up @@ -82,19 +65,3 @@ Enum::valueOf<TOXAV_FRIEND_CALL_STATE> (JNIEnv *env, jint ordinal)
}
tox4j_fatal ("Invalid enumerator from Java");
}

template<>
void
print_arg<TOXAV_FRIEND_CALL_STATE> (protolog::Value &value, TOXAV_FRIEND_CALL_STATE const &arg)
{
switch (arg)
{
case TOXAV_FRIEND_CALL_STATE_ERROR: value.set_v_string ("TOXAV_FRIEND_CALL_STATE_ERROR"); return;
case TOXAV_FRIEND_CALL_STATE_FINISHED: value.set_v_string ("TOXAV_FRIEND_CALL_STATE_FINISHED"); return;
case TOXAV_FRIEND_CALL_STATE_SENDING_A: value.set_v_string ("TOXAV_FRIEND_CALL_STATE_SENDING_A"); return;
case TOXAV_FRIEND_CALL_STATE_SENDING_V: value.set_v_string ("TOXAV_FRIEND_CALL_STATE_SENDING_V"); return;
case TOXAV_FRIEND_CALL_STATE_ACCEPTING_A: value.set_v_string ("TOXAV_FRIEND_CALL_STATE_ACCEPTING_A"); return;
case TOXAV_FRIEND_CALL_STATE_ACCEPTING_V: value.set_v_string ("TOXAV_FRIEND_CALL_STATE_ACCEPTING_V"); return;
}
value.set_v_string ("(TOXAV_FRIEND_CALL_STATE)" + std::to_string (arg));
}
23 changes: 0 additions & 23 deletions lib/src/main/cpp/ToxAv/lifecycle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,29 +105,6 @@ toxav_new_unique (Tox *tox, TOXAV_ERR_NEW *error)
}


static NORETURN void
toxav_finalize ()
{
fprintf (stderr, "This function is only here for register_funcs and should never be called.");
abort ();
}


REGISTER_FUNCS (
#define JAVA_METHOD_REF(x)
#define CXX_FUNCTION_REF(func) REGISTER_FUNC (func),
#include "generated/natives.h"
#undef CXX_FUNCTION_REF
#undef JAVA_METHOD_REF

#define CALLBACK(NAME) REGISTER_FUNC (tox4j_##NAME##_cb),
#include "tox/generated/av.h"
#undef CALLBACK

REGISTER_FUNC (toxav_new_unique)
);


/*
* Class: im_tox_tox4j_impl_ToxAvJni
* Method: toxavNew
Expand Down
36 changes: 0 additions & 36 deletions lib/src/main/cpp/ToxCore/ToxCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,59 +57,23 @@ template<
>
struct get_vector
{
static bool register_funcs_0 ();

static std::vector<ConvertT>
make (Tox const *tox)
{
std::vector<T> vec (get_size (tox));
get_data (tox, vec.data ());

assert (register_funcs_0 ());

return convert_vector<ConvertT, T>::value (std::move (vec));
}
};

template<
typename T,
size_t get_size (Tox const *),
void get_data (Tox const *, T *),
typename ConvertT
>
bool
get_vector<T, get_size, get_data, ConvertT>::register_funcs_0 ()
{
REGISTER_FUNCS (
reinterpret_cast<uintptr_t> (make),
"get_vector<" + get_func_name (get_size) + ", " + get_func_name (get_data) + ">"
);

return true;
}


template<std::size_t N>
struct constant_size
{
static bool register_funcs_0 ();

static std::size_t
make (Tox const *)
{
assert (register_funcs_0 ());
return N;
}
};

template<std::size_t N>
bool
constant_size<N>::register_funcs_0 ()
{
REGISTER_FUNCS (
reinterpret_cast<uintptr_t> (make),
"constant_size<" + std::to_string (N) + ">"
);

return true;
}
135 changes: 0 additions & 135 deletions lib/src/main/cpp/ToxCore/debug.cpp

This file was deleted.

Loading