~ubuntu-branches/ubuntu/wily/zeromq3/wily-proposed

« back to all changes in this revision

Viewing changes to src/v1_encoder.hpp

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2014-03-16 14:02:28 UTC
  • mfrom: (1.1.6) (6.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20140316140228-ig1sgh7czk59m9ux
Tags: 4.0.4+dfsg-1
* QA upload; orphan the package
  - Upload to unstable
* New upstream release
* Update repack.stub script
* Drop 02_fix-exported-symbols.patch and 03_fix-s390-rdtsc.patch
  (merged upstream)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
    Copyright (c) 2009-2011 250bpm s.r.o.
3
 
    Copyright (c) 2007-2012 iMatix Corporation
4
 
    Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
 
2
    Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file
5
3
 
6
4
    This file is part of 0MQ.
7
5
 
22
20
#ifndef __ZMQ_V1_ENCODER_HPP_INCLUDED__
23
21
#define __ZMQ_V1_ENCODER_HPP_INCLUDED__
24
22
 
25
 
#include "msg.hpp"
26
 
#include "i_msg_source.hpp"
27
23
#include "encoder.hpp"
28
24
 
29
25
namespace zmq
30
26
{
31
 
 
32
 
    //  Encoder for 0MQ framing protocol. Converts messages into data stream.
 
27
    //  Encoder for ZMTP/1.0 protocol. Converts messages into data batches.
33
28
 
34
29
    class v1_encoder_t : public encoder_base_t <v1_encoder_t>
35
30
    {
36
31
    public:
37
32
 
38
 
        v1_encoder_t (size_t bufsize_, i_msg_source *msg_source_);
39
 
        virtual ~v1_encoder_t ();
40
 
 
41
 
        virtual void set_msg_source (i_msg_source *msg_source_);
 
33
        v1_encoder_t (size_t bufsize_);
 
34
        ~v1_encoder_t ();
42
35
 
43
36
    private:
44
37
 
45
 
        bool size_ready ();
46
 
        bool message_ready ();
 
38
        void size_ready ();
 
39
        void message_ready ();
47
40
 
48
 
        i_msg_source *msg_source;
49
 
        msg_t in_progress;
50
 
        unsigned char tmpbuf [9];
 
41
        unsigned char tmpbuf [10];
51
42
 
52
43
        v1_encoder_t (const v1_encoder_t&);
53
44
        const v1_encoder_t &operator = (const v1_encoder_t&);