Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cfilestream.h
#ifndef CFILESTREAM_H__
#define CFILESTREAM_H__ 1
#include "p6loader.h"
#include "p6file.h"
namespace P6EXAMPLES {
//
// This defines a private interface that will be used
// to initalize our console stream. The createInstance()
// method returns only interface pointers and this
// allows us to ask it for this interface. Once
// initialize() has been successfully called,
// queryInterface() is used to retrieve the p6IDataStream
// interface.
//
interface IFileStreamInit : public P6R::p6ICom
{
P6COMMETHOD initialize( const P6R::P6WCHAR *pFilePath ) = 0;
};
// {33D82C1E-C5A3-43CE-BBE1-3B8716AD6B08}
#define IF_IFileStreamInit {0x33D82C1E,0xC5A3,0x43CE,{0xBB,0xE1,0x3B,0x87,0x16,0xAD,0x6B,0x08}}
class CFileStream : public IFileStreamInit, public P6R::p6IDataStream
{
public:
//
// P6COM Helper macro declares p6ICom methods
// - queryInterface()
// - addref()
// - release()
// - createInstance() <- This is a static method
// used to create an instance
// of this component.
//
//
// p6IDataStream Methods
//
P6COMMETHOD beginStream();
P6COMMETHOD processStream( const P6R::P6VOID *pData, P6R::P6UINT32 cData );
P6COMMETHOD endStream();
//
// IFileStreamTSInit methods
//
P6COMMETHOD initialize( const P6R::P6WCHAR *pFilePath );
CFileStream();
virtual ~CFileStream();
protected:
P6R::P6BOOL m_bInitialized;
P6R::P6WCHAR *m_pszFilepath;
};
} // namespace
#endif