LayerDefine.h
资源名称:p2p_vod.rar [点击查看]
上传用户:liguizhu
上传日期:2015-11-01
资源大小:2422k
文件大小:3k
源码类别:
P2P编程
开发平台:
Visual C++
- /*
- * Openmysee
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
- #pragma once
- enum P2P_RETURN_TYPE {
- // 这些常量用作函数的返回值
- PRT_OK = 0, // 成功
- PRT_ALLOC = -1, // 内存分配错误
- PRT_WRONG_ARG = -2, // 错误的参数
- PRT_NOT_INIT = -3, // 尚未初始化
- PRT_DUP_INIT = -4, // 重复初始化
- PRT_INIT_SOCK = -5, // 无法初始化windows socket, 可以调用WSAGetLastError()
- PRT_TRACKER_IP = -6, // 非法的TrackServer地址, 可以调用WSAGetLastError()
- PRT_INIT_BIND = -7, // 无法绑定网络端口, 可以调用WSAGetLastError()
- PRT_UNSUPPORT_RES = -8, // 不支持的资源类型
- PRT_WRONG_IF = -9, // 调用了错误的接口,因为当前资源并非支持所有接口
- PRT_DISK_FULL = -10, // 磁盘空间不足
- PRT_BUFFER_FULL = -11, // 缓冲区已满
- PRT_SEEKING = -12, // 正在SEEK,不能读取数据
- PRT_BLOCK_NOTFOUND = -13, // 块没有找到
- PRT_WRONG_RES_INFO = -14, // 出现了两个资源的hashcode相同,但是参数却不尽相同的情况
- PRT_CANNOT_OPEN_BUF = -15, // 无法打开缓冲文件
- PRT_BAD_MEDIAFORMAT = -16, // 错误的直播媒体类型
- PRT_PROGRAM_SYNC = -17, // 切换节目的过程中,视音频正在同步
- PRT_BAD_BLOCK = -18, // 错误的Block
- PRT_BAD_URL = -19, // 错误URL地址
- PRT_ENDOFFILE = -20, // 文件已经终止
- PRT_NEW_MEDIATYPE = -21, // 需要重新获得媒体类型
- PRT_SYS = -1000, // 系统错误, 可以调用GetLastError()
- PRT_NET = -1001, // 网络错误, 可以调用GetLastError()
- };
- enum P2P_NOTIFY_TYPE {
- // 这些常量用作发送给外部Message的WPARAM
- PNT_BAD_HTTP = -1, // 无法下载此Http资源,无LPARAM
- PNT_CANNOT_LOGON_TS = -2, // 无法登录上TrackServer,无LPARAM
- PNT_NO_CP = -3, // 没有CachePeer,无LPARAM
- PNT_HOOK_ERR = -4, // HookAPI出错
- PNT_UNHOOK_ERR = -5, // UnHookAPI出错
- PNT_HOOK_PROCESS_EXIT = -6, // Hook的进程推出
- PNT_CHNL_CLOSED = -7, // 频道已经关闭,无LPARAM
- PNT_NO_SUCH_RES = -8, // 服务器上没有这个资源,无LPARAM
- PNT_CHNL_ENDED = -9, // 频道到达了结尾
- PNT_LOW_VERSION = -10, // 客户端版本过低
- PNT_DISK_ERR = -11, // 写入磁盘错误
- PNT_SYS = -1000, // 系统错误, LPARAM是错误代码
- PNT_NET = -1001, // 网络错误, LPARAM是错误代码
- };