summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2013-05-23 17:29:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-05-23 17:29:37 +0000
commit6b0f914b499a9cc3482ca9919aab67ad4bd1b10b (patch)
tree640d4d74743a3f87608d624d9458c91bf60a5787 /include
parent75697538e485ea2981960dcd4878bfdd032731ac (diff)
parent622bf2bf79849127cbedd1f56631615bf58aaf78 (diff)
downloadandroid_hardware_ril-6b0f914b499a9cc3482ca9919aab67ad4bd1b10b.tar.gz
android_hardware_ril-6b0f914b499a9cc3482ca9919aab67ad4bd1b10b.tar.bz2
android_hardware_ril-6b0f914b499a9cc3482ca9919aab67ad4bd1b10b.zip
Merge "ril: move record_stream_xxx to librilutils and export header"
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*/
+