当前位置: 首页>>代码示例>>C++>>正文


C++ OutStream::out_uint8方法代码示例

本文整理汇总了C++中OutStream::out_uint8方法的典型用法代码示例。如果您正苦于以下问题:C++ OutStream::out_uint8方法的具体用法?C++ OutStream::out_uint8怎么用?C++ OutStream::out_uint8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OutStream的用法示例。


在下文中一共展示了OutStream::out_uint8方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: emit

 void emit(OutStream & stream) const
 {
     stream.out_uint16_le(this->capabilityType);
     stream.out_uint16_le(this->len);
     stream.out_uint8(this->cacheVersion);
     stream.out_uint8(this->pad1);
     stream.out_uint16_le(this->pad2);
 }
开发者ID:wallix,项目名称:redemption,代码行数:8,代码来源:bitmapcachehostsupport.hpp

示例2:

 FlowPDU_Send(OutStream & stream, uint8_t flow_pdu_type, uint8_t flow_identifier,
              uint8_t flow_number, uint16_t pdu_source)
 {
     stream.out_uint16_le(0x8000);
     stream.out_uint8(flow_pdu_type);
     stream.out_uint8(0);
     stream.out_uint8(flow_identifier);
     stream.out_uint8(flow_number);
     stream.out_uint16_le(pdu_source);
 }
开发者ID:,项目名称:,代码行数:10,代码来源:

示例3: emit

 void emit(OutStream & stream)override {
     stream.out_uint16_le(this->capabilityType);
     stream.out_uint16_le(this->len);
     stream.out_uint16_le(this->cacheFlags);
     stream.out_uint8(this->pad1);
     stream.out_uint8(this->numCellCaches);
     stream.out_uint32_le(this->bitmapCache0CellInfo);
     stream.out_uint32_le(this->bitmapCache1CellInfo);
     stream.out_uint32_le(this->bitmapCache2CellInfo);
     stream.out_uint32_le(this->bitmapCache3CellInfo);
     stream.out_uint32_le(this->bitmapCache4CellInfo);
     stream.out_clear_bytes(12);
 }
开发者ID:gvsurenderreddy,项目名称:redemption,代码行数:13,代码来源:bmpcache2.hpp

示例4: emit

    void emit(OutStream & stream) /* TODO const*/ {
        // ULONG length;

        this->RespType = 0x01;
        this->HiRespType = 0x01;
        stream.out_uint8(this->RespType);
        stream.out_uint8(this->HiRespType);
        stream.out_clear_bytes(2);
        stream.out_clear_bytes(4);
        stream.out_copy_bytes(this->Timestamp, 8);
        stream.out_copy_bytes(this->ClientChallenge, 8);
        stream.out_clear_bytes(4);
        this->AvPairList.emit(stream);
        stream.out_clear_bytes(4);
    }
开发者ID:pykoder,项目名称:redemption,代码行数:15,代码来源:ntlm_message_authenticate.hpp

示例5: emit

 void emit(OutStream & stream) const
 {
     stream.out_uint16_le(this->capabilityType);
     stream.out_uint16_le(this->len);
     stream.out_uint32_le(this->WndSupportLevel);
     stream.out_uint8(this->NumIconCaches);
     stream.out_uint16_le(this->NumIconCacheEntries);
 }
开发者ID:pykoder,项目名称:redemption,代码行数:8,代码来源:window.hpp

示例6: emit

    void emit(OutStream & stream, RDPOrderCommon & common, const RDPOrderCommon & oldcommon,
              const RDPEllipseSC & oldcmd) const {
        RDPPrimaryOrderHeader header(RDP::STANDARD, 0);

        if (!common.clip.contains(this->el.get_rect())){
            header.control |= RDP::BOUNDS;
        }

        const int16_t oldleft   = oldcmd.el.left();
        const int16_t oldtop    = oldcmd.el.top();
        const int16_t oldright  = oldcmd.el.right();
        const int16_t oldbottom = oldcmd.el.bottom();

        header.control |= (is_1_byte(this->el.left() - oldleft) &&
                           is_1_byte(this->el.top() - oldtop) &&
                           is_1_byte(this->el.right() - oldright) &&
                           is_1_byte(this->el.bottom() - oldbottom)) * RDP::DELTA;

        header.fields =
            ( this->el.left()   != oldleft        ) * 0x0001
            |(this->el.top()    != oldtop         ) * 0x0002
            |(this->el.right()  != oldright       ) * 0x0004
            |(this->el.bottom() != oldbottom      ) * 0x0008
            |(this->bRop2    != oldcmd.bRop2   ) * 0x0010
            |(this->fillMode != oldcmd.fillMode) * 0x0020
            |(this->color    != oldcmd.color   ) * 0x0040;

        common.emit(stream, header, oldcommon);
        header.emit_coord(stream, 0x0001, this->el.left(),   oldleft);
        header.emit_coord(stream, 0x0002, this->el.top(),    oldtop);
        header.emit_coord(stream, 0x0004, this->el.right(),  oldright);
        header.emit_coord(stream, 0x0008, this->el.bottom(), oldbottom);

        if (header.fields & 0x0010) { stream.out_uint8(this->bRop2); }

        if (header.fields & 0x0020) { stream.out_uint8(this->fillMode); }

        if (header.fields & 0x0040) {
            emit_rdp_color(stream, this->color);
        }

        // LOG(LOG_INFO, "RDPEllipseSC::emit: header fields=0x%02X", header.fields);
        // LOG(LOG_INFO, "RDPEllipseSC::emit: header color=0x%02X", this->color);
    }
开发者ID:pykoder,项目名称:redemption,代码行数:44,代码来源:RDPOrdersPrimaryEllipseSC.hpp

示例7: emit

    void emit(OutStream & stream) const {
        stream.out_uint8(this->allowDisplayUpdates_);
        stream.out_clear_bytes(3);  // Padding(3)

        if (ALLOW_DISPLAY_UPDATES == this->allowDisplayUpdates_) {
            stream.out_uint16_le(this->left_);
            stream.out_uint16_le(this->top_);
            stream.out_uint16_le(this->right_);
            stream.out_uint16_le(this->bottom_);
        }
    }   // void emit(OutStream & stream) const
开发者ID:pykoder,项目名称:redemption,代码行数:11,代码来源:SuppressOutputPDU.hpp

示例8: get_compressed_data

    void get_compressed_data(OutStream & stream) const override
    {
        if (stream.tailroom() <
            static_cast<size_t>(2) + // Level1ComprFlags(1) + Level2ComprFlags(1)
                this->bytes_in_output_buffer) {
            LOG(LOG_ERR, "rdp_mppc_61_enc::get_compressed_data: Buffer too small");
            throw Error(ERR_BUFFER_TOO_SMALL);
        }

        stream.out_uint8(this->Level1ComprFlags);
        stream.out_uint8(this->Level2ComprFlags);
        stream.out_copy_bytes(this->outputBuffer, this->bytes_in_output_buffer);
    }
开发者ID:pykoder,项目名称:redemption,代码行数:13,代码来源:mppc_61.hpp

示例9: emit

    void emit(OutStream & stream) const
    {
        using namespace RDP;

        uint8_t control = STANDARD | SECONDARY;
        stream.out_uint8(control);
        uint16_t len = 1027 - 7;    // length after type minus 7
        stream.out_uint16_le(len);
        stream.out_uint16_le(0);    // flags
        stream.out_uint8(TS_CACHE_COLOR_TABLE); // type

        stream.out_uint8(this->cacheIndex);
        stream.out_uint16_le(256); /* num colors */
        for (int i = 0; i < 256; i++) {
            uint32_t color = this->palette[i];
            uint8_t r = color >> 16;
            uint8_t g = color >> 8;
            uint8_t b = color;
            stream.out_uint8(b);
            stream.out_uint8(g);
            stream.out_uint8(r);
            stream.out_uint8(0);
        }
    }
开发者ID:,项目名称:,代码行数:24,代码来源:

示例10: emit

    void emit(OutStream & stream,
            RDPOrderCommon & common,
            const RDPOrderCommon & oldcommon,
            const RDPLineTo & oldcmd) const
    {
        using namespace RDP;
        RDPPrimaryOrderHeader header(STANDARD, 0);

        // TODO check that
        if (!(common.clip.contains_pt(this->startx, this->starty)
           && common.clip.contains_pt(this->endx, this->endy))){
           header.control |= BOUNDS;
        }

        header.control |= (is_1_byte(this->startx - oldcmd.startx)
                 && is_1_byte(this->starty - oldcmd.starty)
                 && is_1_byte(this->endx - oldcmd.endx)
                 && is_1_byte(this->endy - oldcmd.endy)) * DELTA;

        header.fields =
                (this->back_mode  != oldcmd.back_mode  ) * 0x001
              | (this->startx     != oldcmd.startx     ) * 0x002
              | (this->starty     != oldcmd.starty     ) * 0x004
              | (this->endx       != oldcmd.endx       ) * 0x008
              | (this->endy       != oldcmd.endy       ) * 0x010
              | (this->back_color != oldcmd.back_color ) * 0x020
              | (this->rop2       != oldcmd.rop2       ) * 0x040
              | (this->pen.style  != oldcmd.pen.style  ) * 0x080
              | (this->pen.width  != oldcmd.pen.width  ) * 0x100
              | (this->pen.color  != oldcmd.pen.color  ) * 0x200
              ;

        common.emit(stream, header, oldcommon);

        if (header.fields & 0x001) { stream.out_uint16_le(this->back_mode); }

        header.emit_coord(stream, 0x02, this->startx, oldcmd.startx);
        header.emit_coord(stream, 0x04, this->starty, oldcmd.starty);
        header.emit_coord(stream, 0x08, this->endx,   oldcmd.endx);
        header.emit_coord(stream, 0x10, this->endy,   oldcmd.endy);

        if (header.fields & 0x20) {
            emit_rdp_color(stream, this->back_color);
        }
        if (header.fields & 0x40) { stream.out_uint8(this->rop2); }
        header.emit_pen(stream, 0x80, this->pen, oldcmd.pen);
    }
开发者ID:pykoder,项目名称:redemption,代码行数:47,代码来源:RDPOrdersPrimaryLineTo.hpp

示例11: emit

    void emit(OutStream & stream) {
        stream.out_uint16_le(this->numEntriesCache[0]);
        stream.out_uint16_le(this->numEntriesCache[1]);
        stream.out_uint16_le(this->numEntriesCache[2]);
        stream.out_uint16_le(this->numEntriesCache[3]);
        stream.out_uint16_le(this->numEntriesCache[4]);
        stream.out_uint16_le(this->totalEntriesCache[0]);
        stream.out_uint16_le(this->totalEntriesCache[1]);
        stream.out_uint16_le(this->totalEntriesCache[2]);
        stream.out_uint16_le(this->totalEntriesCache[3]);
        stream.out_uint16_le(this->totalEntriesCache[4]);
        stream.out_uint8(this->bBitMask);

        stream.out_clear_bytes(3);  // Pad2(1) + Pad3(2)

        for (uint32_t i = 0, c = this->maximum_entries(); i < c; i++) {
            stream.out_uint32_le(this->entries[i].Key1);
            stream.out_uint32_le(this->entries[i].Key2);
        }
    }
开发者ID:tvi123,项目名称:redemption,代码行数:20,代码来源:PersistentKeyListPDU.hpp

示例12: make_chunk_header

 void make_chunk_header(OutStream & stream, uint8_t chunk_type, uint16_t data_size) {
     stream.out_uint8(chunk_type);
     stream.out_uint16_le(data_size);
     stream.out_timeval_to_uint64le_usec(tvtime());
 }
开发者ID:,项目名称:,代码行数:5,代码来源:

示例13: emit

 void emit(OutStream & stream) const {
     uint8_t controlFlags = SECONDARY | (AltsecDrawingOrderHeader::FrameMarker << 2);
     stream.out_uint8(controlFlags);
     stream.out_uint32_le(this->action);
 }
开发者ID:gvsurenderreddy,项目名称:redemption,代码行数:5,代码来源:RDPOrdersSecondaryFrameMarker.hpp

示例14: emit

    void emit(OutStream & stream, RDPOrderCommon & common, const RDPOrderCommon & oldcommon,
              const RDPPolygonCB & oldcmd) const {
        RDPPrimaryOrderHeader header(RDP::STANDARD, 0);

        // TODO check that
        int16_t pointx = this->xStart;
        int16_t pointy = this->yStart;
        if (!common.clip.contains_pt(pointx, pointy)) {
            header.control |= RDP::BOUNDS;
        }
        else {
            for (uint8_t i = 0; i < this->NumDeltaEntries; i++) {
                pointx += this->deltaPoints[i].xDelta;
                pointy += this->deltaPoints[i].yDelta;

                if (!common.clip.contains_pt(pointx, pointy)) {
                    header.control |= RDP::BOUNDS;
                    break;
                }
            }
        }

        header.control |= (is_1_byte(this->xStart - oldcmd.xStart) && is_1_byte(this->yStart - oldcmd.yStart)) * RDP::DELTA;

        header.fields =
              (this->xStart          != oldcmd.xStart         ) * 0x0001
            | (this->yStart          != oldcmd.yStart         ) * 0x0002
            | (this->bRop2           != oldcmd.bRop2          ) * 0x0004
            | (this->fillMode        != oldcmd.fillMode       ) * 0x0008
            | (this->backColor       != oldcmd.backColor      ) * 0x0010
            | (this->foreColor       != oldcmd.foreColor      ) * 0x0020
            | (this->brush.org_x     != oldcmd.brush.org_x    ) * 0x0040
            | (this->brush.org_y     != oldcmd.brush.org_y    ) * 0x0080
            | (this->brush.style     != oldcmd.brush.style    ) * 0x0100
            | (this->brush.hatch     != oldcmd.brush.hatch    ) * 0x0200
            | (memcmp(this->brush.extra, oldcmd.brush.extra, 7) != 0) * 0x0400
            | (this->NumDeltaEntries != oldcmd.NumDeltaEntries) * 0x0800
            | ((this->NumDeltaEntries != oldcmd.NumDeltaEntries) ||
               memcmp(this->deltaPoints, oldcmd.deltaPoints,
                      this->NumDeltaEntries * sizeof(DeltaPoint))
               ) * 0x1000
              ;

        common.emit(stream, header, oldcommon);

        header.emit_coord(stream, 0x0001, this->xStart, oldcmd.xStart);
        header.emit_coord(stream, 0x0002, this->yStart, oldcmd.yStart);

        if (header.fields & 0x0004) { stream.out_uint8(this->bRop2); }

        if (header.fields & 0x0008) { stream.out_uint8(this->fillMode); }

        if (header.fields & 0x0010) {
            emit_rdp_color(stream, this->backColor);
        }
        if (header.fields & 0x0020) {
            emit_rdp_color(stream, this->foreColor);
        }

        header.emit_brush(stream, 0x0040, this->brush, oldcmd.brush);

        if (header.fields & 0x0800) { stream.out_uint8(this->NumDeltaEntries); }

        if (header.fields & 0x1000) {
            uint32_t offset_cbData = stream.get_offset();
            stream.out_clear_bytes(1);

            uint8_t * zeroBit = stream.get_current();
            stream.out_clear_bytes((this->NumDeltaEntries + 3) / 4);
            *zeroBit = 0;

            for (uint8_t i = 0, m4 = 0; i < this->NumDeltaEntries; i++, m4++) {
                if (m4 == 4) {
                    m4 = 0;
                }

                if (i && !m4) {
                    *(++zeroBit) = 0;
                }

                if (!this->deltaPoints[i].xDelta) {
                    *zeroBit |= (1 << (7 - m4 * 2));
                }
                else {
                    stream.out_DEP(this->deltaPoints[i].xDelta);
                }

                if (!this->deltaPoints[i].yDelta) {
                    *zeroBit |= (1 << (6 - m4 * 2));
                }
                else {
                    stream.out_DEP(this->deltaPoints[i].yDelta);
                }
            }

            stream.set_out_uint8(stream.get_offset() - offset_cbData - 1, offset_cbData);
        }
    }
开发者ID:pykoder,项目名称:redemption,代码行数:98,代码来源:RDPOrdersPrimaryPolygonCB.hpp

示例15: emit

    // order to stream returns true if state clip must be changed
    // it does not change state by itself
    void emit(OutStream & stream,
                RDPOrderCommon & common,
                const RDPOrderCommon & oldcommon,
                const RDPOpaqueRect & oldcmd) const
    {
        using namespace RDP;
        RDPPrimaryOrderHeader header(STANDARD, 0);

        if (!common.clip.contains(this->rect)){
            header.control |= BOUNDS;
        }

        // OPAQUERECT fields bytes (1 byte)
        // ------------------------------
        // 0x01: x coordinate
        // 0x02: y coordinate
        // 0x04: cx coordinate
        // 0x08: cy coordinate
        // 0x10: red color byte
        // 0x20: green color byte
        // 0x40: blue color byte

        // Note by CGR:
        // ------------
        // As far as we can see the OPAQUERECT fields called "red" "green" and
        // "blue" don't care much for actual color components. Really they
        // should be called "first color byte", "second color byte" and "third
        // color byte". They are red green and blue only in 24 bits. In 15 or 16
        // one byte is always empty and changing green component will
        // change both used bytes.

        DeltaRect dr(this->rect, oldcmd.rect);

        // RDP specs says that we can have DELTA only if we
        // have bounds. Can't see the rationale and rdesktop don't do it
        // by the book. Behavior should be checked with server and clients
        // from Microsoft. Looks like an error in RDP specs.
        header.control |= dr.fully_relative() * DELTA;

        uint32_t diff_color = this->color ^ oldcmd.color;

//        LOG(LOG_INFO, "emit opaque rect old_color = %.6x new_color = %.6x\n", oldcmd.color, this->color);

        header.fields =   (dr.dleft                != 0) * 0x01
                        | (dr.dtop                 != 0) * 0x02
                        | (dr.dwidth               != 0) * 0x04
                        | (dr.dheight              != 0) * 0x08
                        | ((diff_color & 0x0000FF) != 0) * 0x10
                        | ((diff_color & 0x00FF00) != 0) * 0x20
                        | ((diff_color & 0xFF0000) != 0) * 0x40
                        ;

        common.emit(stream, header, oldcommon);
        header.emit_rect(stream, 0x01, this->rect, oldcmd.rect);

        if (header.fields & 0x10){
            stream.out_uint8(this->color);
        }
        if (header.fields & 0x20){
            stream.out_uint8(this->color >> 8);
        }
开发者ID:gvsurenderreddy,项目名称:redemption,代码行数:63,代码来源:RDPOrdersPrimaryOpaqueRect.hpp


注:本文中的OutStream::out_uint8方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。