Fixed newline characters throughout the code
[com/gs-lite.git] / include / app.h
index 22c6f5a..d9967e3 100644 (file)
-/* ------------------------------------------------\r
- Copyright 2014 AT&T Intellectual Property\r
- Licensed under the Apache License, Version 2.0 (the "License");\r
- you may not use this file except in compliance with the License.\r
- You may obtain a copy of the License at\r
\r
- http://www.apache.org/licenses/LICENSE-2.0\r
\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
- ------------------------------------------- */\r
-/*\r
- * app.h: interface for applications\r
- */\r
-#ifndef APP_H\r
-#define APP_H\r
-\r
-\r
-#include "fta.h"\r
-#include "lapp.h"\r
-\r
-/* HIGH LEVEL APPLICATION INTERFACE */\r
-/* ================================ */\r
-\r
-\r
-\r
-\r
-/* will call hostlib_init using the specified ringbuffer size\r
- */\r
-gs_retval_t ftaapp_init(gs_uint32_t bufsz);\r
-\r
-/* this should be used before exit() to make sure everything gets\r
- cleaned up\r
- */\r
-gs_retval_t ftaapp_exit();\r
-\r
-/* adds an FTA by key returns unique streamid which can be used to reference FTA*/\r
-\r
-/* reuse:\r
- if reuse is set to 0, only FTA information will be returned\r
- if reuse is set to 1, instance will be returned provided there is an\r
- instance that is marked as reusable by fta/app who instantiated it\r
- */\r
-\r
-/* reusable:\r
- if reusable is 0, new instance will be created and it will be marked as\r
- non-reusable regardless of how reuse flag is set by query writer\r
\r
- if reusable is 1, new instance will be created and it will be marked as\r
- reusable regardless of how reuse flag is set by query writer\r
\r
- if reusable is set to 2. new instance will be created with reusability flag\r
- matching the reusability flag of the query being instantiated\r
- */\r
-\r
-FTAID ftaapp_add_fta(FTAname name, gs_uint32_t reuse, gs_uint32_t reusable,\r
-                     gs_int32_t command, gs_int32_t sz, void *  data);\r
-\r
-/* adds an FTA by key returns unique streamid which can be used to reference\r
- FTA. This FTA does not produce any local data. Instead it generates a\r
- compressed outpufile in gdat format. The path specifies the directory\r
- the file will be put in. base specifies the base part of the name\r
- the <temporal field value> will be prepented to the name and gdat.gz\r
- will be appended. The temporal field needs to be specified which\r
- can be an uint, int, ullong or llong. The delta is an integer defining how\r
- much the temoral value has to change before a new file is generated.\r
- The same ftaapp_remote_fta function is used to remove these FTAs.\r
- */\r
-FTAID ftaapp_add_fta_print(FTAname name, gs_uint32_t reuse, gs_uint32_t reusable,\r
-                           gs_int32_t command, gs_int32_t sz,\r
-                           void *  data, gs_sp_t path,\r
-                           gs_sp_t basename, gs_sp_t temporal_field, gs_sp_t split_field,\r
-                           gs_uint32_t delta, gs_uint32_t split);\r
-\r
-/* get the schema handle definition for the FTA associated with the streamid\r
- the returned handle will be freed by the app library when the corresponding\r
- fta is removed\r
- */\r
-gs_schemahandle_t ftaapp_get_fta_schema(FTAID f);\r
-\r
-/* get a schema handle definition for the FTA associated with the FTA name\r
- this handle has to be freed by the caller using the schema interface */\r
-gs_schemahandle_t ftaapp_get_fta_schema_by_name(gs_sp_t name);\r
-\r
-/* get an ascii representation of the schema definition\r
- for the FTA associated with the FTA name. The ascii representation\r
- is stored in a static buffer. The value will therefore change\r
- after subsequent calls to this function and the function is not\r
- multithread safe.*/\r
-gs_sp_t ftaapp_get_fta_ascii_schema_by_name(gs_sp_t name);\r
-\r
-/* control operations keyed of one to one mapping of stream id */\r
-gs_retval_t ftaapp_control(FTAID f, gs_int32_t command, gs_int32_t sz, void *  data);\r
-\r
-/* remove FTA keyed of stream id */\r
-/* if recursive is true the children of f will get removed too */\r
-gs_retval_t ftaapp_remove_fta(FTAID f, gs_uint32_t recursive);\r
-\r
-/* same as sgroup_get_buffer just repeated to have a complet ftapp interface */\r
-gs_retval_t ftaapp_get_tuple(FTAID * f, gs_uint32_t * size, void *tbuffer,\r
-                             gs_int32_t tbuf_size, gs_int32_t timeout);\r
-\r
-#endif\r
+/* ------------------------------------------------
+ Copyright 2014 AT&T Intellectual Property
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ------------------------------------------- */
+/*
+ * app.h: interface for applications
+ */
+#ifndef APP_H
+#define APP_H
+
+
+#include "fta.h"
+#include "lapp.h"
+
+/* HIGH LEVEL APPLICATION INTERFACE */
+/* ================================ */
+
+
+
+
+/* will call hostlib_init using the specified ringbuffer size
+ */
+gs_retval_t ftaapp_init(gs_uint32_t bufsz);
+
+/* this should be used before exit() to make sure everything gets
+ cleaned up
+ */
+gs_retval_t ftaapp_exit();
+
+/* adds an FTA by key returns unique streamid which can be used to reference FTA*/
+
+/* reuse:
+ if reuse is set to 0, only FTA information will be returned
+ if reuse is set to 1, instance will be returned provided there is an
+ instance that is marked as reusable by fta/app who instantiated it
+ */
+
+/* reusable:
+ if reusable is 0, new instance will be created and it will be marked as
+ non-reusable regardless of how reuse flag is set by query writer
+ if reusable is 1, new instance will be created and it will be marked as
+ reusable regardless of how reuse flag is set by query writer
+ if reusable is set to 2. new instance will be created with reusability flag
+ matching the reusability flag of the query being instantiated
+ */
+
+FTAID ftaapp_add_fta(FTAname name, gs_uint32_t reuse, gs_uint32_t reusable,
+                     gs_int32_t command, gs_int32_t sz, void *  data);
+
+/* adds an FTA by key returns unique streamid which can be used to reference
+ FTA. This FTA does not produce any local data. Instead it generates a
+ compressed outpufile in gdat format. The path specifies the directory
+ the file will be put in. base specifies the base part of the name
+ the <temporal field value> will be prepented to the name and gdat.gz
+ will be appended. The temporal field needs to be specified which
+ can be an uint, int, ullong or llong. The delta is an integer defining how
+ much the temoral value has to change before a new file is generated.
+ The same ftaapp_remote_fta function is used to remove these FTAs.
+ */
+FTAID ftaapp_add_fta_print(FTAname name, gs_uint32_t reuse, gs_uint32_t reusable,
+                           gs_int32_t command, gs_int32_t sz,
+                           void *  data, gs_sp_t path,
+                           gs_sp_t basename, gs_sp_t temporal_field, gs_sp_t split_field,
+                           gs_uint32_t delta, gs_uint32_t split);
+
+/* get the schema handle definition for the FTA associated with the streamid
+ the returned handle will be freed by the app library when the corresponding
+ fta is removed
+ */
+gs_schemahandle_t ftaapp_get_fta_schema(FTAID f);
+
+/* get a schema handle definition for the FTA associated with the FTA name
+ this handle has to be freed by the caller using the schema interface */
+gs_schemahandle_t ftaapp_get_fta_schema_by_name(gs_sp_t name);
+
+/* get an ascii representation of the schema definition
+ for the FTA associated with the FTA name. The ascii representation
+ is stored in a static buffer. The value will therefore change
+ after subsequent calls to this function and the function is not
+ multithread safe.*/
+gs_sp_t ftaapp_get_fta_ascii_schema_by_name(gs_sp_t name);
+
+/* control operations keyed of one to one mapping of stream id */
+gs_retval_t ftaapp_control(FTAID f, gs_int32_t command, gs_int32_t sz, void *  data);
+
+/* remove FTA keyed of stream id */
+/* if recursive is true the children of f will get removed too */
+gs_retval_t ftaapp_remove_fta(FTAID f, gs_uint32_t recursive);
+
+/* same as sgroup_get_buffer just repeated to have a complet ftapp interface */
+gs_retval_t ftaapp_get_tuple(FTAID * f, gs_uint32_t * size, void *tbuffer,
+                             gs_int32_t tbuf_size, gs_int32_t timeout);
+
+#endif