Skip to content
Snippets Groups Projects

ENH: Add minimal functionality

Merged Florian Spreckelsen requested to merge f-minimal into dev
4 files
+ 28
14
Compare changes
  • Side-by-side
  • Inline

Files

+ 12
3
@@ -23,6 +23,11 @@
module CaosDB
"""
Chose the name of the library according to the OS you're running.
"""
library_name = (@static Sys.iswindows() ? "ccaosdb" : "libccaosdb")
module Info
"""
@@ -47,6 +52,8 @@ end # Info
module Utility
using ..CaosDB
"""
get_env_var(var[, default])
@@ -57,7 +64,7 @@ instead.
function get_env_var(var::AbstractString, default::AbstractString = "")
ret = ccall(
(:caosdb_utility_get_env_var, "libccaosdb"),
(:caosdb_utility_get_env_var, CaosDB.library_name),
Cstring,
(Cstring, Cstring),
var,
@@ -72,6 +79,8 @@ end # Utility
module Authentication
using ..CaosDB
"""
Struct containing a pointer to the wrapped cpp authenticator
class. Meant for internal use; call a
@@ -89,7 +98,7 @@ mutable struct _Authenticator
# internally by libcaosdb.
function f(t)
ccall(
(:caosdb_authentication_delete_authenticator, "libccaosdb"),
(:caosdb_authentication_delete_authenticator, CaosDB.library_name),
Cint,
(Ref{_Authenticator},),
Ref{_Authenticator}(t),
@@ -119,7 +128,7 @@ function create_plain_password_authenticator(
auth = Ref{_Authenticator}(_Authenticator(true))
err_code = ccall(
(:caosdb_authentication_create_plain_password_authenticator, "libccaosdb"),
(:caosdb_authentication_create_plain_password_authenticator, CaosDB.library_name),
Cint,
(Ref{_Authenticator}, Cstring, Cstring),
auth,
Loading