summaryrefslogtreecommitdiffstats
path: root/media/libcubeb/src/cubeb_strings.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2019-11-03 11:20:08 +0100
committerGitHub <noreply@github.com>2019-11-03 11:20:08 +0100
commitb7c6c779ee1d0100842822a1a9c63cd97d27644b (patch)
treecd6504982a432efda7dcd0b5208efde4c04847b1 /media/libcubeb/src/cubeb_strings.h
parent21b3f6247403c06f85e1f45d219f87549862198f (diff)
parent22b35fa8e923d52a3fa785993c28c3e63cd1ee1e (diff)
downloadUXP-b7c6c779ee1d0100842822a1a9c63cd97d27644b.tar
UXP-b7c6c779ee1d0100842822a1a9c63cd97d27644b.tar.gz
UXP-b7c6c779ee1d0100842822a1a9c63cd97d27644b.tar.lz
UXP-b7c6c779ee1d0100842822a1a9c63cd97d27644b.tar.xz
UXP-b7c6c779ee1d0100842822a1a9c63cd97d27644b.zip
Merge pull request #1270 from g4jc/libcubeb
Update libcubeb
Diffstat (limited to 'media/libcubeb/src/cubeb_strings.h')
-rw-r--r--media/libcubeb/src/cubeb_strings.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/media/libcubeb/src/cubeb_strings.h b/media/libcubeb/src/cubeb_strings.h
new file mode 100644
index 000000000..a918a01c5
--- /dev/null
+++ b/media/libcubeb/src/cubeb_strings.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright © 2011 Mozilla Foundation
+ *
+ * This program is made available under an ISC-style license. See the
+ * accompanying file LICENSE for details.
+ */
+
+#ifndef CUBEB_STRINGS_H
+#define CUBEB_STRINGS_H
+
+#include "cubeb/cubeb.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/** Opaque handle referencing interned string storage. */
+typedef struct cubeb_strings cubeb_strings;
+
+/** Initialize an interned string structure.
+ @param strings An out param where an opaque pointer to the
+ interned string storage will be returned.
+ @retval CUBEB_OK in case of success.
+ @retval CUBEB_ERROR in case of error. */
+CUBEB_EXPORT int cubeb_strings_init(cubeb_strings ** strings);
+
+/** Destroy an interned string structure freeing all associated memory.
+ @param strings An opaque pointer to the interned string storage to
+ destroy. */
+CUBEB_EXPORT void cubeb_strings_destroy(cubeb_strings * strings);
+
+/** Add string to internal storage.
+ @param strings Opaque pointer to interned string storage.
+ @param s String to add to storage.
+ @retval CUBEB_OK
+ @retval CUBEB_ERROR
+ */
+CUBEB_EXPORT char const * cubeb_strings_intern(cubeb_strings * strings, char const * s);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif // !CUBEB_STRINGS_H