Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shawn Webb
snippets
Commits
97a63a85
Commit
97a63a85
authored
Mar 18, 2021
by
Shawn Webb
Browse files
Make explicit which API functions can be consumed
Signed-off-by:
Shawn Webb
<
shawn.webb@hardenedbsd.org
>
parent
a7ea5832
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/snippets.h
View file @
97a63a85
...
...
@@ -30,6 +30,8 @@
#include
<curl/curl.h>
#define EXPORTED_SYM __attribute__((visibility("default")))
#define LIBSNIPPETS_VERSION 1
#define SNIPPET_DEFAULT_FILEPATH "file.txt"
...
...
lib/libsnippets/libsnippets.c
View file @
97a63a85
...
...
@@ -29,6 +29,7 @@
#include
"snippets.h"
EXPORTED_SYM
snippet_ctx_t
*
snippet_ctx_new
(
void
)
{
...
...
@@ -42,6 +43,7 @@ snippet_ctx_new(void)
return
(
ctx
);
}
EXPORTED_SYM
snippet_t
*
snippet_new
(
snippet_ctx_t
*
ctx
)
{
...
...
@@ -56,6 +58,7 @@ snippet_new(snippet_ctx_t *ctx)
return
(
snippet
);
}
EXPORTED_SYM
bool
snippet_set_title
(
snippet_t
*
snip
,
const
char
*
title
)
{
...
...
@@ -65,6 +68,7 @@ snippet_set_title(snippet_t *snip, const char *title)
return
(
snip
->
s_title
!=
NULL
);
}
EXPORTED_SYM
bool
snippet_set_description
(
snippet_t
*
snip
,
const
char
*
description
)
{
...
...
@@ -74,6 +78,7 @@ snippet_set_description(snippet_t *snip, const char *description)
return
(
snip
->
s_description
!=
NULL
);
}
EXPORTED_SYM
bool
snippet_set_project
(
snippet_t
*
snip
,
const
char
*
project
)
{
...
...
@@ -93,6 +98,7 @@ snippet_set_project(snippet_t *snip, const char *project)
return
(
snip
->
s_project
!=
NULL
);
}
EXPORTED_SYM
bool
snippet_set_visibility
(
snippet_t
*
snip
,
snippet_visibility_t
vis
)
{
...
...
@@ -101,6 +107,7 @@ snippet_set_visibility(snippet_t *snip, snippet_visibility_t vis)
return
(
true
);
}
EXPORTED_SYM
bool
snippet_add_file
(
snippet_t
*
snip
,
snippet_file_t
*
file
)
{
...
...
@@ -110,6 +117,7 @@ snippet_add_file(snippet_t *snip, snippet_file_t *file)
return
(
true
);
}
EXPORTED_SYM
snippet_file_t
*
snippet_file_new
(
snippet_t
*
snip
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment