Package phones :: Module com_samsung :: Class Phone
[show private | hide private]
[frames | no frames]

Type Phone

      object --+    
               |    
           Phone --+
                   |
RealBrewProtocol --+
                   |
                  Phone

Known Subclasses:
Phone, Phone, Phone

Talk to a Samsung phone using AT commands
Method Summary
  __init__(self, logtarget, commport)
Call all the contructors and sets initial modes
  csvsplit(self, line)
Parse a Samsung comma separated list.
  defrell(self, s, acol, ncol)
Fixes up phonebook responses with the alias field.
  del_phone_entry(self, entry_index)
  detectphone(_, coms, likely_ports, res, _module, _log)
(Class method)
  encode_timedate(self, td)
  extract_timedate(self, td)
  get_analog_digital(self)
  get_battery_level(self)
  get_calendar_entry(self, entry_index)
  get_canned_msg(self, entry_index)
  get_detect_data(self, r)
  get_esn(self)
  get_firmware_version(self)
  get_groups(self, groups_range)
  get_manufacturer(self)
  get_memo_entry(self, entry_index)
  get_model(self)
  get_phone_entry(self, entry_index, alias_column, num_columns)
  get_phone_number(self)
  get_signal_quality(self)
  get_sms_inbox(self, entry_index)
  get_sms_saved(self, entry_index)
  get_sms_sent(self, entry_index)
  get_time_stamp(self)
  get_todo_entry(self, entry_index)
  getcalendar(self, result)
  is_mode_modem(self)
  is_online(self)
  phonize(self, str)
Convert the phone number into something the phone understands All digits, P, T, * and # are kept, everything else is removed
  process_calendar(self, dict)
Optimize and expand calendar data suitable for phone download
  samsungescape(self, s)
Escape double quotes and }'s in a string...
  save_calendar_entry(self, entry_str)
  save_canned_msg(self, entry_str)
  save_memo_entry(self, entry_str)
  save_phone_entry(self, entry_str)
  save_todo_entry(self, entry_str)
  savecalendar(self, dict, merge)
  splitandunescape(self, line)
Split fields and unescape double quote and right brace
  _get_at_response(self)
  _getmemo(self, result)
  _getphoneinfo(self, phone_info)
  _getsms(self, result)
  _gettodo(self, result)
  _savememo(self, result, merge)
  _savesms(self, result, merge)
  _savetodo(self, result, merge)
  _send_and_get(self, at_command)
  _send_at_and_get(self, cmd)
  _setmodebrew(self)
  _setmodebrewtomodem(self)
  _setmodemodem(self)
  _setmodemodemtobrew(self)
  _setmodemodemtophonebook(self)
  _setmodephonebook(self)
  _setmodephonebooktobrew(self)
  _setmodephonebooktomodem(self)
    Inherited from Phone
  alert(self, message, wait)
Raises an alert in the main thread
  close(self)
  log(self, str)
Log a message
  logdata(self, str, data, klass)
Log some data with option data object/class for the analyser
  progress(self, pos, max, desc)
Update the progress meter
  raisecommsdnaexception(self, str)
Raise a comms DeviceNeedsAttention Exception
  raisecommsexception(self, str, klass)
  readobject(self, filename, object_class, logtitle, uselocalfs)
Read the specified filename and bind it to the object class
  setmode(self, desiredmode)
Ensure the phone is in the right mode
  writeobject(self, filename, obj, logtitle, uselocalfs)
Writhe the object into the file
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)
    Inherited from RealBrewProtocol
  basename(self, path)
  dirname(self, filename)
  exists(self, path)
  explore0c(self)
  get_brew_esn(self)
  getfilecontents(self, file, use_cache)
  getfilesystem(self, dir, recurse)
  getfirmwareinformation(self)
  hassubdirs(self, dir)
  isdir(self, path)
  isfile(self, filename)
  join(self, *args)
  listfiles(self, dir)
  listsubdirs(self, dir, recurse)
  mkdir(self, name)
  mkdirs(self, directory)
  modemmoderequest(self)
  offlinerequest(self, reset, delay)
  rmdir(self, name)
  rmdirs(self, path)
  rmfile(self, name)
  sendbrewcommand(self, request, responseclass, callsetmode)
  setfileattr(self, filename, date)
  statfile(self, name)
  writefile(self, name, contents)

Class Variable Summary
str desc = 'Samsung SCH-Axx phone'
str MODEPHONEBOOK = 'modephonebook'
str _AT_str = 'AT'
int _cal_alarm_type = 4                                                                     
dict _cal_alarm_values = {'1': 0, '0': -1, '3': 30, '2': 10, ...
int _cal_datetime_stamp = 3                                                                     
int _cal_end_datetime = 2                                                                     
str _cal_end_datetime_value = '19800106T000000'
xrange _cal_entries_range = xrange(20)
int _cal_entry = 0                                                                     
int _cal_max_events = 20                                                                    
int _cal_max_events_per_day = 9                                                                     
int _cal_max_name_len = 32                                                                    
int _cal_num_of_read_fields = 7                                                                     
int _cal_num_of_write_fields = 6                                                                     
int _cal_read_name = 6                                                                     
int _cal_start_datetime = 1                                                                     
int _cal_write_name = 5                                                                     
str _Error_str = '\r\nERROR\r\n'
str _OK_str = '\r\nOK\r\n'
float _read_timeout = 0.10000000000000001                                                   
str _switch_mode_cmd = 'DX\xf4~'
    Inherited from Phone
NotImplementedType getcallhistory = NotImplemented
NotImplementedType getmemo = NotImplemented
NotImplementedType getplaylist = NotImplemented
NotImplementedType getsms = NotImplemented
NotImplementedType gett9db = NotImplemented
NotImplementedType gettodo = NotImplemented
str MODEMODEM = 'modemodem'
str MODENONE = 'modenone'
    Inherited from RealBrewProtocol
str brewterminator = '~'
str MODEBREW = 'modebrew'
int _brewepochtounix = 315964800                                                             

Instance Method Details

__init__(self, logtarget, commport)
(Constructor)

Call all the contructors and sets initial modes
Overrides:
phones.com_phone.Phone.__init__

csvsplit(self, line)

Parse a Samsung comma separated list.

defrell(self, s, acol, ncol)

Fixes up phonebook responses with the alias field. The alias field does not have quotes around it, but can still contain commas

phonize(self, str)

Convert the phone number into something the phone understands All digits, P, T, * and # are kept, everything else is removed

process_calendar(self, dict)

Optimize and expand calendar data suitable for phone download

samsungescape(self, s)

Escape double quotes and }'s in a string

splitandunescape(self, line)

Split fields and unescape double quote and right brace

Class Variable Details

desc

Type:
str
Value:
'Samsung SCH-Axx phone'                                                

MODEPHONEBOOK

Type:
str
Value:
'modephonebook'                                                        

_AT_str

Type:
str
Value:
'AT'                                                                   

_cal_alarm_type

Type:
int
Value:
4                                                                     

_cal_alarm_values

Type:
dict
Value:
{'1': 0, '0': -1, '3': 30, '2': 10, '4': 60}                           

_cal_datetime_stamp

Type:
int
Value:
3                                                                     

_cal_end_datetime

Type:
int
Value:
2                                                                     

_cal_end_datetime_value

Type:
str
Value:
'19800106T000000'                                                      

_cal_entries_range

Type:
xrange
Value:
xrange(20)                                                             

_cal_entry

Type:
int
Value:
0                                                                     

_cal_max_events

Type:
int
Value:
20                                                                    

_cal_max_events_per_day

Type:
int
Value:
9                                                                     

_cal_max_name_len

Type:
int
Value:
32                                                                    

_cal_num_of_read_fields

Type:
int
Value:
7                                                                     

_cal_num_of_write_fields

Type:
int
Value:
6                                                                     

_cal_read_name

Type:
int
Value:
6                                                                     

_cal_start_datetime

Type:
int
Value:
1                                                                     

_cal_write_name

Type:
int
Value:
5                                                                     

_Error_str

Type:
str
Value:
'''\r
ERROR\r
'''                                                                    

_OK_str

Type:
str
Value:
'''\r
OK\r
'''                                                                    

_read_timeout

Type:
float
Value:
0.10000000000000001                                                   

_switch_mode_cmd

Type:
str
Value:
'DX\xf4~'                                                              

Generated by Epydoc 2.1 on Fri Aug 15 18:58:25 2008 http://epydoc.sf.net