Discussion:
[BitPim-devel] sch-u520
John Schmitt
2008-10-04 15:04:37 UTC
Permalink
I am having a little trouble porting the following block of code to my
phone, I have attached a sample call log with that describes a call going
out to 1234567891.
I know the off offsets for where the time and duration of the call is
located, but not how to add offsets into the reading process. I've put
comments at the 2 places I need the read buffer to jump to.


# read the call history files
_req=self.protocolclass.cl_file()
_buf=prototypes.buffer(self.getfilecontents(
'%s%02d'%(self.protocolclass.CL_PREFIX, _idx)))
_req.readfrombuffer(_buf, 'Reading Call Log File')
_entry=call_history.CallHistoryEntry()
_entry.folder=folder
_entry.number=_req.number
#_buf.setcurrentoffset(36)
_entry.datetime=_req.datetime
#_buf.setcurrentoffset(80)
_entry.duration=_req.duration
res[_entry.id]=_entry
pass
raise
How do I get my change into bitpim codebase as well?
<bitpim-***@lists.sourceforge.net>
John Schmitt
2008-10-16 00:04:25 UTC
Permalink
I am having a little trouble porting the following block of code to my
phone, I have attached a sample call log with that describes a call going
out to 1234567891.
I know the off offsets for where the time and duration of the call is
located, but not how to add offsets into the reading process. I've put
comments at the 2 places I need the read buffer to jump to.


# read the call history files
_req=self.protocolclass.cl_file()
_buf=prototypes.buffer(self.getfilecontents(
'%s%02d'%(self.protocolclass.CL_PREFIX, _idx)))
_req.readfrombuffer(_buf, 'Reading Call Log File')
_entry=call_history.CallHistoryEntry()
_entry.folder=folder
_entry.number=_req.number
#_buf.setcurrentoffset(36)
_entry.datetime=_req.datetime
#_buf.setcurrentoffset(80)
_entry.duration=_req.duration
res[_entry.id]=_entry
pass
raise
How do I get my change into bitpim codebase as well?
<bitpim-***@lists.sourceforge.net>

Loading...