summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2013-05-22 11:29:34 -0700
committerDima Zavin <dima@android.com>2013-05-23 10:28:58 -0700
commit622bf2bf79849127cbedd1f56631615bf58aaf78 (patch)
tree7eaf3fff7ce92ac97c8e2dfd965c5747284fef86 /include
parentf467af616bbbc479771184731132d68e213a4419 (diff)
downloadandroid_hardware_ril-622bf2bf79849127cbedd1f56631615bf58aaf78.tar.gz
android_hardware_ril-622bf2bf79849127cbedd1f56631615bf58aaf78.tar.bz2
android_hardware_ril-622bf2bf79849127cbedd1f56631615bf58aaf78.zip
ril: move record_stream_xxx to librilutils and export header
Change-Id: I9986c8c5fb1777bbd2b686769ecc726319a73100 Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'include')
-rw-r--r--include/telephony/record_stream.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/telephony/record_stream.h b/include/telephony/record_stream.h
new file mode 100644
index 0000000..7a89ae4
--- /dev/null
+++ b/include/telephony/record_stream.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * 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.
+ */
+
+/*
+ * A simple utility for reading fixed records out of a stream fd
+ */
+
+#ifndef _LIBRIL_RECORD_STREAM_H
+#define _LIBRIL_RECORD_STREAM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+typedef struct RecordStream RecordStream;
+
+extern RecordStream *record_stream_new(int fd, size_t maxRecordLen);
+extern void record_stream_free(RecordStream *p_rs);
+
+extern int record_stream_get_next (RecordStream *p_rs, void ** p_outRecord,
+ size_t *p_outRecordLen);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /*_LIBRIL_RECORD_STREAM_H*/
+