Closed
Bug 794469
Opened 12 years ago
Closed 12 years ago
[b2g-bluetooth] Basic OBEX functions and implement sending "Connect" request
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: echou, Assigned: echou)
References
Details
(Whiteboard: [LOE:S])
Attachments
(2 files, 3 obsolete files)
7.48 KB,
patch
|
qdot
:
review+
|
Details | Diff | Splinter Review |
2.99 KB,
patch
|
Details | Diff | Splinter Review |
Object Push Profile is based on OBEX protocol message communication. We need basic functions to construct an OBEX message and handle received messages. "Connect" is one of OBEX operations, we send "Connect" request to remote device trying to establish an OPP connection over RFCOMM session.
Assignee | ||
Updated•12 years ago
|
Assignee | ||
Comment 1•12 years ago
|
||
In OPP, we often send known length byte stream to remote, therefore it would be more convenient for us to have a ctor like this.
Attachment #664959 -
Flags: review?(kyle)
Assignee | ||
Updated•12 years ago
|
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #664960 -
Flags: review?(kyle)
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #664964 -
Flags: review?(kyle)
Updated•12 years ago
|
blocking-basecamp: ? → +
Comment 4•12 years ago
|
||
Comment on attachment 664959 [details] [diff] [review] patch 1: add a ctor to UnixSocketRawData Review of attachment 664959 [details] [diff] [review]: ----------------------------------------------------------------- ::: ipc/unixsocket/UnixSocket.h @@ +54,5 @@ > + UnixSocketRawData(const uint8_t* aData, int aSize) : > + mSize(aSize), > + mCurrentWriteOffset(0) > + { > + memcpy(mData, aData, aSize); And if aSize > MAX_DATA_SIZE? BTW, know that MAX_DATA_SIZE is mutable for our needs. I have /no/ idea what the packet size for file transfer should be. So if we need to change it, we can.
Attachment #664959 -
Flags: review?(kyle) → review-
Comment 5•12 years ago
|
||
Comment on attachment 664960 [details] [diff] [review] patch 2: v1: OBEX related constants, data structures and basic functions Review of attachment 664960 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bluetooth/ObexBase.h @@ +103,5 @@ > +class ObexHeader { > +public: > + ObexHeader(ObexHeaderId aId, > + int aDataLength, > + uint8_t* aData) : mId(aId) Nit - : should go on the next line I think? I'm not actually sure about style here. @@ +120,5 @@ > + } > + > + ObexHeaderId mId; > + int mDataLength; > + uint8_t* mData; nsAutoPtr will automate the cleanup for you, but I suppose this works too. @@ +126,5 @@ > + > +class ObexHeaderSet { > +public: > + uint8_t mOpcode; > + ObexHeader* mHeaders[10]; Why not nsTArray< nsAutoPtr<ObexHeader> >? Seems like that'd keep you from having to deal with cleanup, size restraints, etc... @@ +143,5 @@ > + } > + > + void AddHeader(ObexHeader* aHeader) > + { > + mHeaders[mCount++] = aHeader; No check for mCount > 10?
Attachment #664960 -
Flags: review?(kyle) → review-
Updated•12 years ago
|
Attachment #664964 -
Flags: review?(kyle) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Fixed problems commented by qdot.
Attachment #664959 -
Attachment is obsolete: true
Attachment #664960 -
Attachment is obsolete: true
Attachment #665487 -
Flags: review?(kyle)
Assignee | ||
Comment 7•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Attachment #664964 -
Attachment is obsolete: true
Updated•12 years ago
|
Attachment #665487 -
Flags: review?(kyle) → review+
Assignee | ||
Comment 8•12 years ago
|
||
try: https://tbpl.mozilla.org/?tree=Try&rev=e2f2327be683
Assignee | ||
Comment 9•12 years ago
|
||
"Try again": https://tbpl.mozilla.org/?tree=Try&rev=0010bc06f156
Assignee | ||
Comment 10•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9386cf1dbde2 https://hg.mozilla.org/integration/mozilla-inbound/rev/3642f3259be6
Comment 11•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9386cf1dbde2 https://hg.mozilla.org/mozilla-central/rev/3642f3259be6
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in
before you can comment on or make changes to this bug.
Description
•