Hello community, here is the log from the commit of package python-gammu checked in at Thu Dec 14 18:06:51 CET 2006. -------- --- python-gammu/python-gammu.changes 2006-10-18 01:19:47.000000000 +0200 +++ /mounts/work_src_done/STABLE/python-gammu/python-gammu.changes 2006-12-14 17:42:58.000000000 +0100 @@ -1,0 +2,6 @@ +Thu Dec 14 17:42:53 CET 2006 - prusnak@suse.cz + +- update to 0.16 + * Support for recent gammu versions + +------------------------------------------------------------------- @@ -4 +10 @@ -- make it even start +- make it even start Old: ---- python-gammu-0.15.tar.bz2 python-gammu.dif New: ---- python-gammu-0.16.tar.bz2 python-gammu.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-gammu.spec ++++++ --- /var/tmp/diff_new_pack.6rSe8j/_old 2006-12-14 18:06:25.000000000 +0100 +++ /var/tmp/diff_new_pack.6rSe8j/_new 2006-12-14 18:06:25.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package python-gammu (Version 0.15) +# spec file for package python-gammu (Version 0.16) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,16 +12,16 @@ Name: python-gammu BuildRequires: gammu-devel python-devel -Version: 0.15 +Version: 0.16 Release: 1 Requires: python-gammu python-wxGTK Autoreqprov: on Group: Development/Libraries/Python -License: GNU General Public License (GPL) - all versions +License: GNU General Public License (GPL) URL: http://www.cihar.com/gammu/python/ Summary: Python Module to Communicate with Mobile Phones Source0: %{name}-%{version}.tar.bz2 -Patch: python-gammu.dif +Patch0: %{name}.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %{py_requires} @@ -37,7 +37,7 @@ %prep %setup -q -%patch +%patch0 %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" @@ -54,6 +54,9 @@ %doc AUTHORS COPYING README NEWS %changelog -n python-gammu +* Thu Dec 14 2006 - prusnak@suse.cz +- update to 0.16 + * Support for recent gammu versions * Wed Oct 18 2006 - ro@suse.de - make it even start * Tue Oct 17 2006 - ro@suse.de ++++++ python-gammu-0.15.tar.bz2 -> python-gammu-0.16.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/INSTALL new/python-gammu-0.16/INSTALL --- old/python-gammu-0.15/INSTALL 2006-09-20 08:11:54.000000000 +0200 +++ new/python-gammu-0.16/INSTALL 2006-11-16 11:16:20.000000000 +0100 @@ -2,19 +2,22 @@ ========================= -UNIX systems ------------- +UNIX systems - installation from sources +---------------------------------------- -First you need Gammu installed as shared library and with header files. You -can use either packages for your favourite distribution or do it by hand -(replace XXX by current gammu version): - -> tar xfj gammu-XXX.tar.bz2 -> cd gammu-XXX -> ./configure --prefix=/usr -> make share -> su -# make installshared +First you need Gammu installed as shared library and with header files. + +1. Download recent Gammu sources from <http://www.gammu.org/>. +2. Unpack it: + > tar xfj gammu-XXX.tar.bz2 +3. Configure (you might want to tweak configure parameters): + > cd gammu-XXX + > ./configure --prefix=/usr +4. Build as shared library: + > make share + > su +5. Install as shared library: + # make installshared For finding gammu libraries, pkg-config is used, so please install it also. @@ -46,6 +49,6 @@ where static library you built before is placed and GAMMU_INC to directory with sources (common subdirectory from gammu source tarball). -Now you can layunch build of python-gammu module. +Now you can launch build of python-gammu module. Alternatively there will be prebuilt modules on python-gammu web site. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/Makefile new/python-gammu-0.16/Makefile --- old/python-gammu-0.15/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/python-gammu-0.16/Makefile 2006-09-21 08:46:57.000000000 +0200 @@ -0,0 +1,13 @@ +all: setup.py + python setup.py build + +clean: setup.py + python setup.py clean + +install: setup.py + python setup.py install + +dist: setup.py + python setup.py sdist --formats=gztar,bztar,zip + +.PHONY: all clean install dist diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/NEWS new/python-gammu-0.16/NEWS --- old/python-gammu-0.15/NEWS 2006-09-20 08:11:54.000000000 +0200 +++ new/python-gammu-0.16/NEWS 2006-12-04 22:41:14.000000000 +0100 @@ -4,6 +4,11 @@ Major changes for each release are described here. Detailed changes between two versions can be retrieved from GNU Arch. +0.16 +==== (2006-12-04) + +* Support for recent gammu versions. + 0.15 ==== (2006-09-20) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/PKG-INFO new/python-gammu-0.16/PKG-INFO --- old/python-gammu-0.15/PKG-INFO 2006-09-20 08:12:19.000000000 +0200 +++ new/python-gammu-0.16/PKG-INFO 2006-12-04 22:43:22.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: python-gammu -Version: 0.15 +Version: 0.16 Summary: Gammu bindings Home-page: http://cihar.com/gammu/python Author: Michal Čihař diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/convertors/calendar.c new/python-gammu-0.16/convertors/calendar.c --- old/python-gammu-0.15/convertors/calendar.c 2006-09-20 08:11:54.000000000 +0200 +++ new/python-gammu-0.16/convertors/calendar.c 2006-11-16 11:12:27.000000000 +0100 @@ -136,7 +136,7 @@ Py_DECREF(v); return NULL; } - f = Py_BuildValue("{s:s,s:O}", "Type", "START_DATETIME", "Value", d); + f = Py_BuildValue("{s:s,s:O,s:i}", "Type", "START_DATETIME", "Value", d, "AddError", (int)entry->Entries[i].AddError); Py_DECREF(d); break; case CAL_END_DATETIME: @@ -156,7 +156,7 @@ Py_DECREF(v); return NULL; } - f = Py_BuildValue("{s:s,s:O}", "Type", "END_DATETIME", "Value", d); + f = Py_BuildValue("{s:s,s:O,s:i}", "Type", "END_DATETIME", "Value", d, "AddError", (int)entry->Entries[i].AddError); Py_DECREF(d); break; case CAL_TONE_ALARM_DATETIME: @@ -165,7 +165,7 @@ Py_DECREF(v); return NULL; } - f = Py_BuildValue("{s:s,s:O}", "Type", "TONE_ALARM_DATETIME", "Value", d); + f = Py_BuildValue("{s:s,s:O,s:i}", "Type", "TONE_ALARM_DATETIME", "Value", d, "AddError", (int)entry->Entries[i].AddError); Py_DECREF(d); break; case CAL_SILENT_ALARM_DATETIME: @@ -174,7 +174,7 @@ Py_DECREF(v); return NULL; } - f = Py_BuildValue("{s:s,s:O}", "Type", "SILENT_ALARM_DATETIME", "Value", d); + f = Py_BuildValue("{s:s,s:O,s:i}", "Type", "SILENT_ALARM_DATETIME", "Value", d, "AddError", (int)entry->Entries[i].AddError); Py_DECREF(d); break; case CAL_REPEAT_STARTDATE: @@ -183,7 +183,7 @@ Py_DECREF(v); return NULL; } - f = Py_BuildValue("{s:s,s:O}", "Type", "REPEAT_STARTDATE", "Value", d); + f = Py_BuildValue("{s:s,s:O,s:i}", "Type", "REPEAT_STARTDATE", "Value", d, "AddError", (int)entry->Entries[i].AddError); Py_DECREF(d); break; case CAL_REPEAT_STOPDATE: @@ -192,7 +192,7 @@ Py_DECREF(v); return NULL; } - f = Py_BuildValue("{s:s,s:O}", "Type", "REPEAT_STOPDATE", "Value", d); + f = Py_BuildValue("{s:s,s:O,s:i}", "Type", "REPEAT_STOPDATE", "Value", d, "AddError", (int)entry->Entries[i].AddError); Py_DECREF(d); break; @@ -202,7 +202,25 @@ Py_DECREF(v); return NULL; } - f = Py_BuildValue("{s:s,s:u}", "Type", "TEXT", "Value", s); + f = Py_BuildValue("{s:s,s:u,s:i}", "Type", "TEXT", "Value", s, "AddError", (int)entry->Entries[i].AddError); + free(s); + break; + case CAL_DESCRIPTION: + s = strGammuToPython(entry->Entries[i].Text); + if (s == NULL) { + Py_DECREF(v); + return NULL; + } + f = Py_BuildValue("{s:s,s:u,s:i}", "Type", "DESCRIPTION", "Value", s, "AddError", (int)entry->Entries[i].AddError); + free(s); + break; + case CAL_LUID: + s = strGammuToPython(entry->Entries[i].Text); + if (s == NULL) { + Py_DECREF(v); + return NULL; + } + f = Py_BuildValue("{s:s,s:u,s:i}", "Type", "LUID", "Value", s, "AddError", (int)entry->Entries[i].AddError); free(s); break; case CAL_LOCATION: @@ -211,7 +229,7 @@ Py_DECREF(v); return NULL; } - f = Py_BuildValue("{s:s,s:u}", "Type", "LOCATION", "Value", s); + f = Py_BuildValue("{s:s,s:u,s:i}", "Type", "LOCATION", "Value", s, "AddError", (int)entry->Entries[i].AddError); free(s); break; case CAL_PHONE: @@ -220,30 +238,30 @@ Py_DECREF(v); return NULL; } - f = Py_BuildValue("{s:s,s:u}", "Type", "PHONE", "Value", s); + f = Py_BuildValue("{s:s,s:u,s:i}", "Type", "PHONE", "Value", s, "AddError", (int)entry->Entries[i].AddError); free(s); break; case CAL_PRIVATE: - f = Py_BuildValue("{s:s,s:i}", "Type", "PRIVATE", "Value", entry->Entries[i].Number); + f = Py_BuildValue("{s:s,s:i,s:i}", "Type", "PRIVATE", "Value", entry->Entries[i].Number, "AddError", (int)entry->Entries[i].AddError); break; case CAL_CONTACTID: - f = Py_BuildValue("{s:s,s:i}", "Type", "CONTACTID", "Value", entry->Entries[i].Number); + f = Py_BuildValue("{s:s,s:i,s:i}", "Type", "CONTACTID", "Value", entry->Entries[i].Number, "AddError", (int)entry->Entries[i].AddError); break; case CAL_REPEAT_DAYOFWEEK: - f = Py_BuildValue("{s:s,s:i}", "Type", "REPEAT_DAYOFWEEK", "Value", entry->Entries[i].Number); + f = Py_BuildValue("{s:s,s:i,s:i}", "Type", "REPEAT_DAYOFWEEK", "Value", entry->Entries[i].Number, "AddError", (int)entry->Entries[i].AddError); break; case CAL_REPEAT_DAY: - f = Py_BuildValue("{s:s,s:i}", "Type", "REPEAT_DAY", "Value", entry->Entries[i].Number); + f = Py_BuildValue("{s:s,s:i,s:i}", "Type", "REPEAT_DAY", "Value", entry->Entries[i].Number, "AddError", (int)entry->Entries[i].AddError); break; case CAL_REPEAT_WEEKOFMONTH: - f = Py_BuildValue("{s:s,s:i}", "Type", "REPEAT_WEEKOFMONTH", "Value", entry->Entries[i].Number); + f = Py_BuildValue("{s:s,s:i,s:i}", "Type", "REPEAT_WEEKOFMONTH", "Value", entry->Entries[i].Number, "AddError", (int)entry->Entries[i].AddError); break; case CAL_REPEAT_MONTH: - f = Py_BuildValue("{s:s,s:i}", "Type", "REPEAT_MONTH", "Value", entry->Entries[i].Number); + f = Py_BuildValue("{s:s,s:i,s:i}", "Type", "REPEAT_MONTH", "Value", entry->Entries[i].Number, "AddError", (int)entry->Entries[i].AddError); break; case CAL_REPEAT_FREQUENCY: - f = Py_BuildValue("{s:s,s:i}", "Type", "REPEAT_FREQUENCY", "Value", entry->Entries[i].Number); + f = Py_BuildValue("{s:s,s:i,s:i}", "Type", "REPEAT_FREQUENCY", "Value", entry->Entries[i].Number, "AddError", (int)entry->Entries[i].AddError); break; } @@ -358,6 +376,12 @@ } else if (strcmp("TEXT", type) == 0) { valuetype = 't'; entry->Entries[i].EntryType = CAL_TEXT; + } else if (strcmp("DESCRIPTION", type) == 0) { + valuetype = 't'; + entry->Entries[i].EntryType = CAL_DESCRIPTION; + } else if (strcmp("LUID", type) == 0) { + valuetype = 't'; + entry->Entries[i].EntryType = CAL_LUID; } else if (strcmp("LOCATION", type) == 0) { valuetype = 't'; entry->Entries[i].EntryType = CAL_LOCATION; @@ -410,6 +434,14 @@ if (entry->Entries[i].Date.Year == -1) return 0; break; } + + /* Get AddError flag */ + entry->Entries[i].AddError = GetIntFromDict(item, "AddError"); + if (entry->Entries[i].AddError == INT_INVALID) { + entry->Entries[i].AddError = ERR_NONE; + PyErr_Clear(); + } + } /* end for */ return 1; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/convertors/memory.c new/python-gammu-0.16/convertors/memory.c --- old/python-gammu-0.15/convertors/memory.c 2006-09-20 08:11:54.000000000 +0200 +++ new/python-gammu-0.16/convertors/memory.c 2006-11-16 11:09:26.000000000 +0100 @@ -28,7 +28,7 @@ Py_DECREF(v); \ return NULL; \ } \ - f = Py_BuildValue("{s:s,s:u}", "Type", name, "Value", s); \ + f = Py_BuildValue("{s:s,s:u,s:i}", "Type", name, "Value", s, "AddError", (int)entry->Entries[i].AddError); \ free(s); #define convert_number(name) \ @@ -158,6 +158,9 @@ case PBK_Text_Custom4: convert_text("Text_Custom4"); break; + case PBK_Text_LUID: + convert_text("Text_LUID"); + break; case PBK_Text_UserID: convert_text("Text_UserID"); break; @@ -279,6 +282,13 @@ PyErr_Clear(); } + /* Get AddError flag */ + entry->Entries[i].AddError = GetIntFromDict(item, "AddError"); + if (entry->Entries[i].AddError == INT_INVALID) { + entry->Entries[i].AddError = ERR_NONE; + PyErr_Clear(); + } + if (strcmp("Number_General", type) == 0) { valuetype = 't'; entry->Entries[i].EntryType = PBK_Number_General; @@ -369,6 +379,9 @@ } else if (strcmp("Text_Custom4", type) == 0) { valuetype = 't'; entry->Entries[i].EntryType = PBK_Text_Custom4; + } else if (strcmp("Text_LUID", type) == 0) { + valuetype = 't'; + entry->Entries[i].EntryType = PBK_Text_LUID; } else if (strcmp("Text_UserID", type) == 0) { valuetype = 't'; entry->Entries[i].EntryType = PBK_Text_UserID; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/convertors/todo.c new/python-gammu-0.16/convertors/todo.c --- old/python-gammu-0.15/convertors/todo.c 2006-09-20 08:11:54.000000000 +0200 +++ new/python-gammu-0.16/convertors/todo.c 2006-11-15 08:47:05.000000000 +0100 @@ -63,6 +63,7 @@ int i; Py_UNICODE *s; char *p; + char *t; v = PyList_New(0); if (v == NULL) return NULL; @@ -106,6 +107,33 @@ f = Py_BuildValue("{s:s,s:u}", "Type", "TEXT", "Value", s); free(s); break; + case TODO_LOCATION: + s = strGammuToPython(entry->Entries[i].Text); + if (s == NULL) { + Py_DECREF(v); + return NULL; + } + f = Py_BuildValue("{s:s,s:u}", "Type", "LOCATION", "Value", s); + free(s); + break; + case TODO_DESCRIPTION: + s = strGammuToPython(entry->Entries[i].Text); + if (s == NULL) { + Py_DECREF(v); + return NULL; + } + f = Py_BuildValue("{s:s,s:u}", "Type", "DESCRIPTION", "Value", s); + free(s); + break; + case TODO_LUID: + s = strGammuToPython(entry->Entries[i].Text); + if (s == NULL) { + Py_DECREF(v); + return NULL; + } + f = Py_BuildValue("{s:s,s:u}", "Type", "LUID", "Value", s); + free(s); + break; case TODO_COMPLETED: f = Py_BuildValue("{s:s,s:i}", "Type", "COMPLETED", "Value", entry->Entries[i].Number); break; @@ -154,12 +182,21 @@ return NULL; } - r = Py_BuildValue("{s:i,s:s,s:O}", + t = CalendarTypeToString(entry->Type); + if (t == NULL) { + free(p); + Py_DECREF(v); + return NULL; + } + + r = Py_BuildValue("{s:i,s:s,s:s,s:O}", "Location", entry->Location, + "Type", t, "Priority", p, "Entries", v ); free(p); + free(t); Py_DECREF(v); return r; } @@ -170,6 +207,7 @@ int len; int i; char *p; + char *t; char *type; char valuetype; @@ -185,6 +223,11 @@ if (entry->Location == INT_INVALID) return 0; } + t = GetCharFromDict(dict, "Type"); + if (t == NULL) return 0; + entry->Type = StringToCalendarType(t); + if (entry->Type == 0) return 0; + p = GetCharFromDict(dict, "Priority"); if (p == NULL) return 0; entry->Priority = StringToTodoPriority(p); @@ -230,6 +273,15 @@ } else if (strcmp("SILENT_ALARM_DATETIME", type) == 0) { valuetype = 'd'; entry->Entries[i].EntryType = TODO_SILENT_ALARM_DATETIME; + } else if (strcmp("LUID", type) == 0) { + valuetype = 't'; + entry->Entries[i].EntryType = TODO_LUID; + } else if (strcmp("LOCATION", type) == 0) { + valuetype = 't'; + entry->Entries[i].EntryType = TODO_LOCATION; + } else if (strcmp("DESCRIPTION", type) == 0) { + valuetype = 't'; + entry->Entries[i].EntryType = TODO_DESCRIPTION; } else if (strcmp("TEXT", type) == 0) { valuetype = 't'; entry->Entries[i].EntryType = TODO_TEXT; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/convertors.h new/python-gammu-0.16/convertors.h --- old/python-gammu-0.15/convertors.h 2006-09-20 08:11:54.000000000 +0200 +++ new/python-gammu-0.16/convertors.h 2006-11-15 08:43:07.000000000 +0100 @@ -260,6 +260,16 @@ int TodoFromPython(PyObject *dict, GSM_ToDoEntry *entry, int needs_location); /** + * Convert calendar type to string. + */ +char *CalendarTypeToString(GSM_CalendarNoteType p); + +/** + * Convert string to calendar type. + */ +GSM_CalendarNoteType StringToCalendarType(const char *s); + +/** * Converts Calendar to Python object. */ PyObject *CalendarToPython(const GSM_CalendarEntry *entry); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/errors.c new/python-gammu-0.16/errors.c --- old/python-gammu-0.15/errors.c 2006-09-20 08:11:54.000000000 +0200 +++ new/python-gammu-0.16/errors.c 2006-11-16 11:01:22.000000000 +0100 @@ -175,6 +175,7 @@ if (id == NULL)\ return 0;\ PyDict_SetItemString(error_list, "" #x, id); \ + PyDict_SetItem(errornumber_list, id, PyString_FromString("" #x)); \ Py_DECREF(id); \ /* End of macro */ @@ -182,12 +183,16 @@ int gammu_create_errors(PyObject *d) { PyObject *help_text; PyObject *error_list; + PyObject *errornumber_list; PyObject *id; /* Prepare dict for error codes */ error_list = PyDict_New(); if (error_list == NULL) return 0; + errornumber_list = PyDict_New(); + if (errornumber_list == NULL) + return 0; GammuError = PyErr_NewException("gammu.GSMError", NULL, NULL); if (GammuError == NULL) @@ -254,5 +259,8 @@ PyDict_SetItemString(d, "Errors", error_list); Py_DECREF(error_list); + PyDict_SetItemString(d, "ErrorNumbers", errornumber_list); + Py_DECREF(errornumber_list); + return 1; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/examples/bakup-convertor.py new/python-gammu-0.16/examples/bakup-convertor.py --- old/python-gammu-0.15/examples/bakup-convertor.py 1970-01-01 01:00:00.000000000 +0100 +++ new/python-gammu-0.16/examples/bakup-convertor.py 2006-11-06 23:16:15.000000000 +0100 @@ -0,0 +1,11 @@ +#!/usr/bin/env python + +import gammu + +import sys +if len(sys.argv) != 3: + print 'This requires two parameter with file names! First is input, second output.' + sys.exit(1) + +backup = gammu.ReadBackup(sys.argv[1]) +gammu.SaveBackup(sys.argv[2], backup) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/examples/batteryinfo.py new/python-gammu-0.16/examples/batteryinfo.py --- old/python-gammu-0.15/examples/batteryinfo.py 1970-01-01 01:00:00.000000000 +0100 +++ new/python-gammu-0.16/examples/batteryinfo.py 2006-11-15 14:45:17.000000000 +0100 @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +import gammu + +sm = gammu.StateMachine() +sm.ReadConfig() +sm.Init() + +import sys + +status = sm.GetBatteryCharge() + +for x in status: + if status[x] != -1: + print "%20s: %s" % (x, status[x]) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/gammu.c new/python-gammu-0.16/gammu.c --- old/python-gammu-0.15/gammu.c 2006-09-20 08:11:54.000000000 +0200 +++ new/python-gammu-0.16/gammu.c 2006-11-23 21:32:44.000000000 +0100 @@ -209,8 +209,10 @@ if (sm == NULL) return; sm->MessageReference = mr; - if (status==0) { + if (status == 0) { sm->SMSStatus = ERR_NONE; + } else if (status == 322) { + sm->SMSStatus = ERR_FULL; } else { sm->SMSStatus = ERR_UNKNOWN; } @@ -1658,13 +1660,23 @@ switch (bat.ChargeState) { case GSM_BatteryPowered: buffer = "BatteryPowered"; break; case GSM_BatteryConnected: buffer = "BatteryConnected"; break; + case GSM_BatteryCharging: buffer = "BatteryCharging"; break; + case GSM_BatteryFull: buffer = "BatteryFull"; break; case GSM_BatteryNotConnected: buffer = "BatteryNotConnected"; break; case GSM_PowerFault: buffer = "PowerFault"; break; } - return Py_BuildValue("{s:i,s:s}", + return Py_BuildValue("{s:i,s:s,s:i,s:i,s:i,s:i,s:i,s:i,s:i}", "BatteryPercent", bat.BatteryPercent, - "ChargeState", buffer); + "ChargeState", buffer, + "BatteryVoltage", bat.BatteryVoltage, + "ChargeVoltage", bat.ChargeVoltage, + "ChargeCurrent", bat.ChargeCurrent, + "PhoneCurrent", bat.PhoneCurrent, + "BatteryTemperature", bat.BatteryTemperature, + "PhoneTemperature", bat.PhoneTemperature, + "BatteryCapacity", bat.BatteryCapacity + ); } /********************/ @@ -2618,7 +2630,7 @@ BEGIN_PHONE_COMM GSM_ReadDevice(&(self->s), true); END_PHONE_COMM - if (self->SMSStatus == ERR_UNKNOWN || i == 100) { + if (self->SMSStatus == ERR_FULL || self->SMSStatus == ERR_UNKNOWN || i == 100) { if (!checkError(&(self->s), self->SMSStatus, "SendSMS")) { return NULL; } @@ -2666,7 +2678,7 @@ BEGIN_PHONE_COMM GSM_ReadDevice(&(self->s),true); END_PHONE_COMM - if (self->SMSStatus == ERR_UNKNOWN || i == 100) { + if (self->SMSStatus == ERR_FULL || self->SMSStatus == ERR_UNKNOWN || i == 100) { if (!checkError(&(self->s), self->SMSStatus, "SendSavedSMS")) { return NULL; } @@ -3531,7 +3543,7 @@ if (!checkError(&(self->s), error, "GetToDoStatus")) return NULL; - return Py_BuildValue("{s:i}", "Used", status.Used); + return Py_BuildValue("{s:i,s:i}", "Used", status.Used, "Free", status.Free); } /***********/ @@ -3796,7 +3808,7 @@ if (!checkError(&(self->s), error, "GetCalendarStatus")) return NULL; - return Py_BuildValue("{s:i}", "Used", status.Used); + return Py_BuildValue("{s:i,s:i}", "Used", status.Used, "Free", status.Free); } /***************/ @@ -4585,7 +4597,12 @@ if (!checkError(&(self->s), error, "GetFileSystemStatus")) return NULL; - return Py_BuildValue("{s:i,s:i}", "Used", Status.Used, "Free", Status.Free); + return Py_BuildValue("{s:i,s:i,s:i,s:i,s:i}", + "Used", Status.Used, + "Free", Status.Free, + "UsedImages", Status.UsedImages, + "UsedThemes", Status.UsedThemes, + "UsedSounds", Status.UsedSounds); } /**************/ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/python-gammu.spec new/python-gammu-0.16/python-gammu.spec --- old/python-gammu-0.15/python-gammu.spec 2006-09-20 08:11:54.000000000 +0200 +++ new/python-gammu-0.16/python-gammu.spec 2006-12-04 22:35:37.000000000 +0100 @@ -1,5 +1,5 @@ %define name python-gammu -%define version 0.15 +%define version 0.16 %define release 1 Summary: Python module to communicate with mobile phones @@ -15,7 +15,7 @@ %endif Packager: Michal Cihar <michal@cihar.com> Vendor: Michal Cihar <michal@cihar.com> -BuildRequires: gammu-devel >= 1.08.00 +BuildRequires: gammu-devel >= 1.08.16 Url: http://cihar.com/gammu/wammu Buildroot: %{_tmppath}/%name-%version-root %py_requires -d diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/python-gammu-0.15/setup.py new/python-gammu-0.16/setup.py --- old/python-gammu-0.15/setup.py 2006-09-20 08:11:54.000000000 +0200 +++ new/python-gammu-0.16/setup.py 2006-11-15 10:20:12.000000000 +0100 @@ -29,7 +29,7 @@ # some defines MAJOR_VERSION = 0 -MINOR_VERSION = 15 +MINOR_VERSION = 16 EXTRA_VERSION = None if EXTRA_VERSION == None: @@ -37,7 +37,7 @@ else: VERSION = '%d.%d.%d' % (MAJOR_VERSION, MINOR_VERSION, EXTRA_VERSION) -GAMMU_REQUIRED = (1,8,0) +GAMMU_REQUIRED = (1,8,16) PYTHON_REQUIRED = (2,3) GAMMU_LIB = os.getenv('GAMMU_LIB') ++++++ python-gammu.diff ++++++ --- errors.c +++ errors.c @@ -163,12 +163,12 @@ } #define CREATE_ERROR(x) \ - Py##x = PyErr_NewException("gammu." #x, GammuError, NULL);\ + help_text = PyString_FromFormat("Exception corresponding to gammu error " #x ".\nVerbose error description: %s", print_error(x, NULL, 0)); \ + exc_d = PyDict_New(); \ + PyDict_SetItemString(exc_d, "__doc__", help_text); \ + Py##x = PyErr_NewException("gammu." #x, GammuError, exc_d);\ if (Py##x == NULL)\ return 0;\ - help_text = PyString_FromFormat("Exception corresponding to gammu error " #x ".\nVerbose error description: %s", print_error(x, NULL, 0)); \ - PyObject_SetAttrString(Py##x, "__doc__", help_text); \ - Py_DECREF(help_text); \ PyDict_SetItemString(d, "" #x, Py##x); \ Py_DECREF(Py##x); \ id = PyInt_FromLong(x); \ @@ -185,6 +185,7 @@ PyObject *error_list; PyObject *errornumber_list; PyObject *id; + PyObject *exc_d; /* Prepare dict for error codes */ error_list = PyDict_New(); @@ -194,12 +195,12 @@ if (errornumber_list == NULL) return 0; - GammuError = PyErr_NewException("gammu.GSMError", NULL, NULL); + exc_d = PyDict_New(); \ + help_text = PyString_FromString("Generic class as parent for all gammu exceptions. This is never raised directly."); + PyDict_SetItemString(exc_d, "__doc__", help_text); \ + GammuError = PyErr_NewException("gammu.GSMError", NULL, exc_d); if (GammuError == NULL) return 0; - help_text = PyString_FromString("Generic class as parent for all gammu exceptions. This is never raised directly."); - PyObject_SetAttrString(GammuError, "__doc__", help_text); - Py_DECREF(help_text); PyDict_SetItemString(d, "GSMError", GammuError); Py_DECREF(GammuError); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@suse.de