Hi Hendrik,

> > > > I'll need to read the specs again. But I don't think it's okay to
> > > > decompose the headers (into ID and TYPE).
> > > > The TYPE macros on the other hand will be quite useful.
> > >
> > > Obex-1.2 spec, ch. 2.1:
> > > "The low order 6 bits of the header identifier are used to indicate the
> > > meaning of the header, while the upper 2 bits are used to indicate the
> > > header encoding."
> > >
> > > I called the encodings OBEX_HDR_TYPE_* but the meaning is the same. This
> > > resolves pretty nice for e.g. the time HI values.
> > > Note that OBEX_HDR_TYPE_BYTES does not say anything about the format, a
> > > format ID table would be nice.
> >
> > I am not willing to break the API. So only additions are allowed.
> 
> That's exactly what it does, extending the API. It does not break it.

my bad. I only saw that you removed defines.

Some comments on the patch. Something like this is not good enough:

#define OBEX_HDR_TYPE(hi)     (hi & 0xC0)

You need an extra protection of the hi parameter. Change it to:

#define OBEX_HDR_TYPE(hi)     ((hi) & 0xC0)

And to make the header easier to read, make it look like this:

#define OBEX_HDR_WHO           (OBEX_HDR_ID_WHO        | OBEX_HDR_TYPE_BYTES)
#define OBEX_HDR_CONNECTION    (OBEX_HDR_ID_CONNECTION | OBEX_HDR_TYPE_UINT32)
#define OBEX_HDR_APPARAM       (OBEX_HDR_ID_APPARAM    | OBEX_HDR_TYPE_BYTES)

And I think the usage of tabs vs. whitspaces is mixed up. Pick one.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users

Reply via email to