Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7ad1c691d5
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 57 lines (42 sloc) 1.37 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
/*
* StreamEncoder.h
* MoverCore
*
* Created by ∞ on 28/07/10.
* Copyright 2010 __MyCompanyName__. All rights reserved.
*
*/

#ifndef StreamEncoder_H
#define StreamEncoder_H 1

#include "PlatformCore.h"
#include "ILStream.h"

namespace Mover {
struct StreamEncoderImpl;
class StreamEncoderDelegate;

// ~ StreamEncoder ~

class StreamEncoder : public ILObject {
public:
StreamEncoder(); virtual ~StreamEncoder();

// ---------- Editing the stream's contents before sending
void setMetadataValueForKey(ILString* key, ILString* value);

void addPayloadWithData(ILString* key, ILData* content);
void addPayloadWithStreamSource(ILString* key, ILStreamSource* source, ILSize size);

ILProperty(StreamEncoderDelegate*, delegate, setDelegate);

// ---------- Producing the stream
void requestStreamPart();

virtual void* classIdentity();

// private past this point
void performProducingStreamPart(ILMessage* m);
private:
friend class StreamEncoderImpl;
StreamEncoderImpl* _i;
};

extern void* kStreamEncoderClassIdentity;


class StreamEncoderDelegate {
public:
virtual void streamEncoderWillBegin(StreamEncoder* e) = 0;
virtual void streamEncoderDidProducePart(StreamEncoder* e, ILData* d) = 0;
virtual void streamEncoderDidEnd(StreamEncoder* e, uint32_t endCause) = 0;
};
}

#endif // #ifndef StreamEncoder_H
Something went wrong with that request. Please try again.