Translated using Weblate.
[wammu.git] / Wammu / Todo.py
blob7e75f6619a4d34e340fc949e45da9f0896003a78
1 # -*- coding: UTF-8 -*-
2 # vim: expandtab sw=4 ts=4 sts=4:
3 '''
4 Wammu - Phone manager
5 Todo reader
6 '''
7 __author__ = 'Michal Čihař'
8 __email__ = 'michal@cihar.com'
9 __license__ = '''
10 Copyright © 2003 - 2010 Michal Čihař
12 This program is free software; you can redistribute it and/or modify it
13 under the terms of the GNU General Public License version 2 as published by
14 the Free Software Foundation.
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
19 more details.
21 You should have received a copy of the GNU General Public License along with
22 this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 '''
26 import Wammu.Reader
27 import Wammu.Utils
28 import Wammu
30 class GetTodo(Wammu.Reader.Reader):
31 def GetStatus(self):
32 status = self.sm.GetToDoStatus()
33 return status['Used']
35 def GetNextStart(self):
36 return self.sm.GetNextToDo(Start = True)
38 def GetNext(self, location):
39 return self.sm.GetNextToDo(Location = location)
41 def Get(self, location):
42 return self.sm.GetToDo(Location = location)
44 def Parse(self, value):
45 Wammu.Utils.ParseTodo(value)
47 def Send(self, data):
48 self.SendData(['todo', ' '], data)