Re: [PATCH 3/5] cdma-atmodem: Add CDMA SMS Support

2010-12-20 Thread Denis Kenzior
On 12/08/2010 06:35 PM, Lei Yu wrote:
 ---
  Makefile.am|7 ++
  configure.ac   |5 ++
  drivers/cdma-atmodem/atmodem.c |   47 
  drivers/cdma-atmodem/atmodem.h |   23 ++

You need to synchronize with Dara on this one.  Both of you are sending
the same stub implementation.  I suggest submitting this as a separate
patch.  And please name it cdmamodem/cdmamodem.c  .h.  Dara has this
right actually.

  drivers/cdma-atmodem/atutil.c  |   45 
  drivers/cdma-atmodem/atutil.h  |   64 +

As I mentioned before, please use the atutil.[ch] from atmodem directly.
 No need to create a new set of these...

  drivers/cdma-atmodem/sms.c |  151 
 

And this one should be in a separate patch ;)

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 3/5] cdma-atmodem: Add CDMA SMS Support

2010-12-20 Thread Lei Yu

Hi Denis,

On 12/20/2010 12:39 PM, ext Denis Kenzior wrote:

On 12/08/2010 06:35 PM, Lei Yu wrote:

---
  Makefile.am|7 ++
  configure.ac   |5 ++
  drivers/cdma-atmodem/atmodem.c |   47 
  drivers/cdma-atmodem/atmodem.h |   23 ++


You need to synchronize with Dara on this one.  Both of you are sending
the same stub implementation.  I suggest submitting this as a separate
patch.  And please name it cdmamodem/cdmamodem.c  .h.  Dara has this
right actually.



I will synchronize with Dara. Most likely, I will hold of submitting
update to my patch at least for 3/5 till Dara's patch is finalized and
accepted.


  drivers/cdma-atmodem/atutil.c  |   45 
  drivers/cdma-atmodem/atutil.h  |   64 +


As I mentioned before, please use the atutil.[ch] from atmodem directly.
  No need to create a new set of these...



I will fix this and resubmit after Dara's patch is finalized.


  drivers/cdma-atmodem/sms.c |  151 


And this one should be in a separate patch ;)



Will fix this.


Regards,
-Denis


Regards,
Lei

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH 3/5] cdma-atmodem: Add CDMA SMS Support

2010-12-08 Thread Lei Yu
---
 Makefile.am|7 ++
 configure.ac   |5 ++
 drivers/cdma-atmodem/atmodem.c |   47 
 drivers/cdma-atmodem/atmodem.h |   23 ++
 drivers/cdma-atmodem/atutil.c  |   45 
 drivers/cdma-atmodem/atutil.h  |   64 +
 drivers/cdma-atmodem/sms.c |  151 
 7 files changed, 342 insertions(+), 0 deletions(-)
 create mode 100644 drivers/cdma-atmodem/atmodem.c
 create mode 100644 drivers/cdma-atmodem/atmodem.h
 create mode 100644 drivers/cdma-atmodem/atutil.c
 create mode 100644 drivers/cdma-atmodem/atutil.h
 create mode 100644 drivers/cdma-atmodem/sms.c

diff --git a/Makefile.am b/Makefile.am
index b7dc5ee..400d4c0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -242,6 +242,13 @@ conf_DATA += plugins/phonesim.conf
 endif
 endif
 
+if CDMA_ATMODEM
+builtin_modules += cdma_atmodem
+builtin_sources += drivers/cdma-atmodem/atmodem.h \
+   drivers/cdma-atmodem/atmodem.c \
+   drivers/cdma-atmodem/sms.c
+endif
+
 builtin_modules += g1
 builtin_sources += plugins/g1.c
 
diff --git a/configure.ac b/configure.ac
index 5c18f68..abbd8cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -166,6 +166,11 @@ AC_ARG_ENABLE(phonesim, 
AC_HELP_STRING([--disable-phonesim],
 AM_CONDITIONAL(PHONESIM, test ${enable_phonesim} != no 
test ${enable_atmodem} != no)
 
+AC_ARG_ENABLE(cdmaatmodem, AC_HELP_STRING([--disable-cdma-atmodem],
+   [disable CDMA AT modem support]),
+   [enable_cdma_atmodem=${enableval}])
+AM_CONDITIONAL(CDMA_ATMODEM, test ${enable_cdma_atmodem} != no)
+
 AC_ARG_ENABLE(isimodem, AC_HELP_STRING([--disable-isimodem],
[disable PhoNet/ISI modem support]),
[enable_isimodem=${enableval}])
diff --git a/drivers/cdma-atmodem/atmodem.c b/drivers/cdma-atmodem/atmodem.c
new file mode 100644
index 000..fac9069
--- /dev/null
+++ b/drivers/cdma-atmodem/atmodem.c
@@ -0,0 +1,47 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2010 Nokia Corporation. All rights reserved.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program 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 this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include config.h
+#endif
+
+#include glib.h
+
+#define OFONO_API_SUBJECT_TO_CHANGE
+#include ofono/plugin.h
+#include ofono/types.h
+
+#include atmodem.h
+
+static int cdma_atmodem_init(void)
+{
+   cdma_at_sms_init();
+
+   return 0;
+}
+
+static void cdma_atmodem_exit(void)
+{
+   cdma_at_sms_exit();
+}
+
+OFONO_PLUGIN_DEFINE(cdma_atmodem, CDMA AT modem driver, VERSION,
+   OFONO_PLUGIN_PRIORITY_DEFAULT, cdma_atmodem_init, cdma_atmodem_exit)
diff --git a/drivers/cdma-atmodem/atmodem.h b/drivers/cdma-atmodem/atmodem.h
new file mode 100644
index 000..28d3d63
--- /dev/null
+++ b/drivers/cdma-atmodem/atmodem.h
@@ -0,0 +1,23 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2010 Nokia Corporation. All rights reserved.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program 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 this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+extern void cdma_at_sms_init();
+extern void cdma_at_sms_exit();
diff --git a/drivers/cdma-atmodem/atutil.c b/drivers/cdma-atmodem/atutil.c
new file mode 100644
index 000..f0da2d0
--- /dev/null
+++ b/drivers/cdma-atmodem/atutil.c
@@ -0,0 +1,45 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2010 Nokia Corporation. All rights reserved.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the