PVMFFormatType为一个class
PVMF_MIME_AMR_IETF 为一个常量如果 PVMFFormatType mime_type=PVMF_MIME_AMR_IETF;这个是表示
mime_type= new PVMFFormatType(PVMF_MIME_AMR_IETF) 吧?Thanks
#define PVMF_MIME_AMR_IETF "X-AMR-IETF-SEPARATE" // Today's IETFclass PVMFFormatType
{
public:
// default constructor
PVMFFormatType() : iCompressed(false), iMimeStr(PVMF_MIME_FORMAT_UNKNOWN)
{} PVMFFormatType(const char* mimeStrPtr, bool compressed = false)
{
iStr = OSCL_HeapString<OsclMemAllocator> (mimeStrPtr);
iMimeStr = iStr.get_cstr();
iCompressed = compressed;
} PVMFFormatType(const char* mimeStrPtr, int32 mimeStrLen, bool compressed = false)
{
iStr = OSCL_HeapString<OsclMemAllocator> (mimeStrPtr, mimeStrLen);
iMimeStr.setPtrLen(iStr.get_cstr(), iStr.get_size());
iCompressed = compressed;
} PVMFFormatType& operator=(const PVMFFormatType& rhs)
{
iStr = OSCL_HeapString<OsclMemAllocator> (rhs.getMIMEStrPtr(), rhs.getMIMEStrLen());
iMimeStr.setPtrLen(iStr.get_cstr(), iStr.get_size());
iCompressed = rhs.isCompressed();
return *this;
} PVMFFormatType& operator=(const char* mimeStrPtr)
{
iStr = OSCL_HeapString<OsclMemAllocator> (mimeStrPtr);
iMimeStr = iStr.get_cstr();
return *this;
} virtual ~PVMFFormatType() {}; // case insensitive comparision
c_bool operator==(const PVMFFormatType& rhs) const
{
return iMimeStr.isCIEquivalentTo(rhs.getStrCSumPtr());
} bool operator!=(const PVMFFormatType& rhs) const
{
return !(*this == rhs);
} void setCompressed(bool compressed = false)
{
iCompressed = compressed;
} const char* getMIMEStrPtr() const
{
return iMimeStr.c_str();
} int32 getMIMEStrLen() const
{
return iMimeStr.length();
} const StrCSumPtrLen& getStrCSumPtr() const
{
return iMimeStr;
} //return true if it is a compressed Media
OSCL_IMPORT_REF bool isCompressed() const; //return true if a media type is IANA audio format or PV internal audio format.
OSCL_IMPORT_REF bool isAudio() const; //return true if a media type is IANA video format or PV internal video format.
OSCL_IMPORT_REF bool isVideo() const; //return true if a media type is image format or PV internal image format.
OSCL_IMPORT_REF bool isImage() const; //return true if a media type is IANA text format.
OSCL_IMPORT_REF bool isText() const; //return true if a media type is PV internal file format.
OSCL_IMPORT_REF bool isFile() const; //return true if a media type is PV internal raw format.
OSCL_IMPORT_REF bool isRaw() const; //return true if a media type is PV internal data source.
OSCL_IMPORT_REF bool isDataSource() const; //return true if a media type is PV internal data source.
OSCL_IMPORT_REF bool isUserInput() const; // a flag to indicate if a media type described by the MIME is compressed
// this value should be passed in because this class does not have the
// ability to determine if a given media type, especially a format from
// the third party???
bool iCompressed; protected:
// a local storage for MIME string
OSCL_HeapString<OsclMemAllocator> iStr;
StrCSumPtrLen iMimeStr;};
PVMF_MIME_AMR_IETF 为一个常量如果 PVMFFormatType mime_type=PVMF_MIME_AMR_IETF;这个是表示
mime_type= new PVMFFormatType(PVMF_MIME_AMR_IETF) 吧?Thanks
#define PVMF_MIME_AMR_IETF "X-AMR-IETF-SEPARATE" // Today's IETFclass PVMFFormatType
{
public:
// default constructor
PVMFFormatType() : iCompressed(false), iMimeStr(PVMF_MIME_FORMAT_UNKNOWN)
{} PVMFFormatType(const char* mimeStrPtr, bool compressed = false)
{
iStr = OSCL_HeapString<OsclMemAllocator> (mimeStrPtr);
iMimeStr = iStr.get_cstr();
iCompressed = compressed;
} PVMFFormatType(const char* mimeStrPtr, int32 mimeStrLen, bool compressed = false)
{
iStr = OSCL_HeapString<OsclMemAllocator> (mimeStrPtr, mimeStrLen);
iMimeStr.setPtrLen(iStr.get_cstr(), iStr.get_size());
iCompressed = compressed;
} PVMFFormatType& operator=(const PVMFFormatType& rhs)
{
iStr = OSCL_HeapString<OsclMemAllocator> (rhs.getMIMEStrPtr(), rhs.getMIMEStrLen());
iMimeStr.setPtrLen(iStr.get_cstr(), iStr.get_size());
iCompressed = rhs.isCompressed();
return *this;
} PVMFFormatType& operator=(const char* mimeStrPtr)
{
iStr = OSCL_HeapString<OsclMemAllocator> (mimeStrPtr);
iMimeStr = iStr.get_cstr();
return *this;
} virtual ~PVMFFormatType() {}; // case insensitive comparision
c_bool operator==(const PVMFFormatType& rhs) const
{
return iMimeStr.isCIEquivalentTo(rhs.getStrCSumPtr());
} bool operator!=(const PVMFFormatType& rhs) const
{
return !(*this == rhs);
} void setCompressed(bool compressed = false)
{
iCompressed = compressed;
} const char* getMIMEStrPtr() const
{
return iMimeStr.c_str();
} int32 getMIMEStrLen() const
{
return iMimeStr.length();
} const StrCSumPtrLen& getStrCSumPtr() const
{
return iMimeStr;
} //return true if it is a compressed Media
OSCL_IMPORT_REF bool isCompressed() const; //return true if a media type is IANA audio format or PV internal audio format.
OSCL_IMPORT_REF bool isAudio() const; //return true if a media type is IANA video format or PV internal video format.
OSCL_IMPORT_REF bool isVideo() const; //return true if a media type is image format or PV internal image format.
OSCL_IMPORT_REF bool isImage() const; //return true if a media type is IANA text format.
OSCL_IMPORT_REF bool isText() const; //return true if a media type is PV internal file format.
OSCL_IMPORT_REF bool isFile() const; //return true if a media type is PV internal raw format.
OSCL_IMPORT_REF bool isRaw() const; //return true if a media type is PV internal data source.
OSCL_IMPORT_REF bool isDataSource() const; //return true if a media type is PV internal data source.
OSCL_IMPORT_REF bool isUserInput() const; // a flag to indicate if a media type described by the MIME is compressed
// this value should be passed in because this class does not have the
// ability to determine if a given media type, especially a format from
// the third party???
bool iCompressed; protected:
// a local storage for MIME string
OSCL_HeapString<OsclMemAllocator> iStr;
StrCSumPtrLen iMimeStr;};
解决方案 »
- vc6安装目录中,\VC98\ATL 这个文件夹是做什么用的呀?很少的文件夹呀? 里面有 include,src 两个文件夹,我不知做何用的,文件夹很少,文
- <com+编程指南>,有的兄弟进来看一哈!
- 请问哪有生成镜像的源码?
- 怎么在对话框的静态成员函数中获得该对话框的指针?
- 如何使用c/c++和win sdk编写有窗口界面的activex control?
- 请问 退格 控件的代码怎么写?
- 单文档项目怎么使菜单的一项动态隐藏或删除??
- 关于dll头文件的问题!
- 关于dialog和控件回车键消息处理的小问题
- 怎样取消按钮响应键盘按键事件
- PhotoShop 的磁性锁套怎样实现的??
- 关于messagebox的最后一个参数的问题
PVMF_MIME_AMR_IETF是字符串
对应这个
PVMFFormatType& operator=(const char* mimeStrPtr)
{
iStr = OSCL_HeapString <OsclMemAllocator> (mimeStrPtr);
iMimeStr = iStr.get_cstr();
return *this;
}