Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
bfrag.h
Package: 142_61_thumb_advanced.rar [view]
Upload User: dangjiwu
Upload Date: 2013-07-19
Package Size: 42019k
Code Size: 3k
Category:
Symbian
Development Platform:
Visual C++
- /****************************************************************************
- *
- * $Id: bfrag.h,v 1.3 2003/07/31 17:23:44 jbloedow Exp $
- *
- * Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
- *
- * http://www.real.com/devzone
- *
- * This program contains proprietary
- * information of Progressive Networks, Inc, and is licensed
- * subject to restrictions on use and distribution.
- *
- *
- * Buffer Fragment Class
- *
- */
- #ifndef _BFRAG_H_
- #define _BFRAG_H_
- /****************************************************************************
- * Defines
- */
- /****************************************************************************
- * Includes
- */
- #include "hxtypes.h"
- #include "hxcom.h"
- #include "hxcomm.h"
- #include "ihxpckts.h"
- #include "qtffrefcounter.h"
- class CBufferFragmentFactory;
- /****************************************************************************
- *
- * Class:
- * CBufferFragment
- *
- * Purpose:
- * Provides for containment of buffer fragments under IHXBuffer API
- *
- */
- class CBufferFragment : public IHXBuffer
- {
- public:
- /*
- * Constructor/Destructor
- */
- #ifdef QTCONFIG_BFRAG_FACTORY
- CBufferFragment(void)
- : m_pBuffer(NULL)
- , m_pData(NULL)
- , m_ulSize(0)
- , m_lRefCount(0)
- , m_pBufferFragmentFactory(NULL)
- {
- }
- #else // QTCONFIG_BFRAG_FACTORY
- CBufferFragment(IHXBuffer* pBuffer,
- ULONG32 ulOffset,
- ULONG32 ulSize)
- : m_pBuffer(pBuffer)
- , m_ulSize(ulSize)
- , m_lRefCount(0)
- {
- pBuffer->AddRef();
- m_pData = pBuffer->GetBuffer() + ulOffset;
- m_ulSize = ulSize;
- }
- #endif // QTCONFIG_BFRAG_FACTORY
- /*
- * IUnknown methods
- */
- STDMETHOD(QueryInterface) (THIS_
- REFIID riid,
- void** ppvObj);
- STDMETHOD_(ULONG32,AddRef) (THIS);
- STDMETHOD_(ULONG32,Release) (THIS);
- /*
- * CBufferFragment methods
- */
- #ifdef QTCONFIG_BFRAG_FACTORY
- void Link (CBufferFragmentFactory* pBufferFragmentFactory);
- inline void Unlink(void);
- void Init (IHXBuffer* pBuffer,
- ULONG32 ulOffset,
- ULONG32 ulSize,
- CBufferFragmentFactory* pBufferFragmentFactory)
- {
- if (m_pBuffer)
- {
- m_pBuffer->Release();
- }
- Link(pBufferFragmentFactory);
- m_pBuffer = pBuffer;
- pBuffer->AddRef();
- m_pData = pBuffer->GetBuffer() + ulOffset;
- m_ulSize = ulSize;
- }
- #endif // QTCONFIG_BFRAG_FACTORY
- /*
- * IHXBuffer methods
- */
- STDMETHOD(Get) (THIS_
- REF(UCHAR*) pData,
- REF(ULONG32) ulLength);
- STDMETHOD(Set) (THIS_
- const UCHAR* pData,
- ULONG32 ulLength);
- STDMETHOD(SetSize) (THIS_
- ULONG32 ulLength);
- STDMETHOD_(ULONG32,GetSize) (THIS);
- STDMETHOD_(UCHAR*,GetBuffer)(THIS);
- private:
- IHXBuffer* m_pBuffer;
- UINT8* m_pData;
- UINT32 m_ulSize;
- #ifdef QTCONFIG_BFRAG_FACTORY
- CBufferFragmentFactory* m_pBufferFragmentFactory;
- #endif // QTCONFIG_BFRAG_FACTORY
- LONG32 m_lRefCount;
- ~CBufferFragment();
- PRIVATE_DESTRUCTORS_ARE_NOT_A_CRIME
- };
- #endif // _BFRAG_H_