The flags aren't enums.. they are integer.  in <10m I'll have a new version
which will only need maintenance if the spec changes dramatically.


On Sat, Apr 19, 2014 at 9:07 AM, Jesse Wilson <notifications@github.com>wrote:

> In
> okhttp/src/main/java/com/squareup/okhttp/internal/spdy/Http20Draft10.java:
>
> > +      FLAGS[FLAG_END_STREAM] = "END_STREAM"; // Valid for DATA, HEADERS
> > +      FLAGS[FLAG_END_HEADERS] = "END_HEADERS"; // Valid for HEADERS, PUSH_PROMISE, CONTINUATION
> > +      FLAGS[FLAG_PRIORITY] = "PRIORITY"; // Valid for HEADERS
> > +      FLAGS[FLAG_PAD_LOW] = "PAD_LOW"; // Valid for DATA, HEADERS, CONTINUATION
> > +      FLAGS[FLAG_PAD_LOW | FLAG_PAD_HIGH] = "PAD_LOW|PAD_HIGH"; // these only occur together
> > +
> > +      // combinations for HEADERS and CONTINUATION
> > +      FLAGS[FLAG_END_HEADERS | FLAG_PAD_LOW] = "END_HEADERS|PAD_LOW";
> > +      FLAGS[FLAG_END_HEADERS | FLAG_PAD_LOW | FLAG_PAD_HIGH] = "END_HEADERS|PAD_LOW|PAD_HIGH";
> > +
> > +      // combinations for DATA and HEADERS
> > +      FLAGS[FLAG_END_STREAM | FLAG_PAD_LOW] = "END_STREAM|PAD_LOW";
> > +      FLAGS[FLAG_END_STREAM | FLAG_PAD_LOW | FLAG_PAD_HIGH] = "END_STREAM|PAD_LOW|PAD_HIGH";
> > +
> > +      // combinations for HEADERS
> > +      FLAGS[FLAG_END_HEADERS | FLAG_END_STREAM] = "END_HEADERS|END_STREAM";
>
> (I don't want to have to keep this up to date; and we don't really care if
> the set of flags is consistent or not)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/square/okhttp/pull/723/files#r11794344>
> .
>