From 0091ceae5f7cbeeb42e3b43de3dcf8e500fe8752 Mon Sep 17 00:00:00 2001 From: PaulK Date: Wed, 21 Dec 2011 21:54:03 +0100 Subject: RIL rework: multi-client, more stable, added GPLv3 copyright notice --- include/samsung-ril-socket.h | 62 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/samsung-ril-socket.h b/include/samsung-ril-socket.h index 6686932..4c3fc1b 100644 --- a/include/samsung-ril-socket.h +++ b/include/samsung-ril-socket.h @@ -1,37 +1,81 @@ +/** + * This file is part of samsung-ril. + * + * Copyright (C) 2011 Paul Kocialkowski + * + * samsung-ril is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * samsung-ril is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with samsung-ril. If not, see . + * + */ + /* Samsung RIL Socket protocol defines */ +#ifndef _SAMSUNG_RIL_SOCKET_H_ +#define _SAMSUNG_RIL_SOCKET_H_ + #define SRS_COMMAND(f) ((f->group << 8) | f->index) #define SRS_GROUP(m) (m >> 8) #define SRS_INDEX(m) (m & 0xff) +#define SRS_SOCKET_NAME "samsung-ril-socket" +#define SRS_DATA_MAX_SIZE 0x1000 + #define SRS_CONTROL 0x01 -#define SRS_CONTROL_GET_HELO 0x0102 -#define SRS_CONTROL_LINK_CLOSE 0x0103 +#define SRS_CONTROL_PING 0x0101 #define SRS_SND 0x02 #define SRS_SND_SET_CALL_VOLUME 0x0201 #define SRS_SND_SET_CALL_AUDIO_PATH 0x0202 #define SRS_SND_SET_CALL_CLOCK_SYNC 0x0203 -#define SRS_CONTROL_HELO 0xCAFFE +#define SRS_CONTROL_CAFFE 0xCAFFE -#define SRS_CONTROL_LINK_STATUS_OPEN 0x01 -#define SRS_CONTROL_LINK_STATUS_CLOSE 0x02 +enum srs_snd_type { + SRS_SND_TYPE_VOICE, + SRS_SND_TYPE_SPEAKER, + SRS_SND_TYPE_HEADSET, + SRS_SND_TYPE_BTVOICE +}; -#define SRS_SOCKET_NAME "samsung-ril-socket" -#define SRS_DATA_MAX_SIZE 0x1000 +enum srs_snd_path { + SRS_SND_PATH_HANDSET, + SRS_SND_PATH_HEADSET, + SRS_SND_PATH_SPEAKER, + SRS_SND_PATH_BLUETOOTH, + SRS_SND_PATH_BLUETOOTH_NO_NR, + SRS_SND_PATH_HEADPHONE +}; + +enum srs_snd_clock { + SND_CLOCK_STOP, + SND_CLOCK_START +}; + +struct srs_snd_call_volume { + enum srs_snd_type type; + int volume; +} __attribute__((__packed__)); struct srs_header { unsigned int length; unsigned char group; unsigned char index; - unsigned char msg_id; } __attribute__((__packed__)); struct srs_message { unsigned short command; - unsigned char msg_id; int data_len; void *data; } __attribute__((__packed__)); +#endif -- cgit v1.2.3