XnsCommon.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. #pragma once
  2. #include "XnsDeviceInterface.h"
  3. #define STR_LEN_NAME 127
  4. #define STR_LEN_ID 63
  5. #define STR_LEN_PSWD 41
  6. #define STR_LEN_PTZ_NAME 41
  7. #define STR_LEN_IP 16
  8. #define STR_LEN_MAC 13
  9. #define STR_LEN_DOMAIN 255
  10. #define STR_LEN_URL 255
  11. #define STR_LEN_DDNSID 21
  12. #define STR_LEN_VERSION 128
  13. #define STR_LEN_DESCRIPTION 255
  14. #define STR_LEN_PHONE 63
  15. #define STR_LEN_ADDRESS 255
  16. #define STR_LEN_PATH 512
  17. //#define ERR_NOT_INITIALIZE -1 // 0xFFFFFFFF
  18. #define ERR_SUCCESS 0x00000000
  19. #define ERR_UNKNOWN 0x00000001
  20. // Initialize
  21. #define ERR_INVALID_CFG_FILE 0x00000010
  22. #define ERR_CFG_FILE_READ_ERROR 0x00000011
  23. #define ERR_ALREADY_INITIALIZE 0x00000012
  24. #define ERR_NOT_INITIALIZE 0x00000013
  25. // ADDED BY SSO(2011.06.03):디바이스핸들유무 체크후 삭제하도록 예외처리추가
  26. // ADDED BY HH3.KIM(2011.06.08):디바이스핸들 체크 에러시 0을 리턴하지 않고 아래의 값을 리턴하도록 변경함.
  27. #define ERR_INVALID_DEVICE_HANDLE 0x00000014
  28. #define ERR_ALREADY_EXIST_DEVICEID 0x00000015
  29. // Device Connection
  30. #define ERR_NOT_SUPPORTED_DEVICE 0x00000020
  31. #define ERR_EXCEED_CONNECTION 0x00000021
  32. #define ERR_NOT_CONNECT 0x00000022
  33. #define ERR_MAC_CONFLICT 0x00000023
  34. #define ERR_INVALID_VERSION 0x00000024
  35. #define ERR_INVALID_MODEL 0x00000025
  36. #define ERR_ALREADY_CONNECT 0x00000026
  37. // Login Error
  38. #define ERR_INVALID_USERID 0x00000030
  39. #define ERR_WRONG_PASSWORD 0x00000031
  40. #define ERR_LOGIN 0x00000032
  41. #define ERR_ADMIN_CONFLICT 0x00000033
  42. #define ERR_USER_FULL 0x00000034
  43. // Query Request
  44. #define ERR_XNS_BUSY 0x00000040
  45. #define ERR_BAD_NETWORK 0x00000041
  46. #define ERR_REQUEST_TIME_OUT 0x00000042
  47. #define ERR_INVALID_PARAMETER 0x00000043
  48. #define ERR_NO_PERMISSION 0x00000044
  49. #define ERR_NOT_SUPPORTED_COMMAND 0x00000045
  50. // File Transfer
  51. #define ERR_INVALID_FILE 0x00000050
  52. #define ERR_UPLOAD_FAIL 0x00000051
  53. #define ERR_IMPORT_FAIL 0x00000052
  54. #define ERR_EXPORT_FAIL 0x00000053
  55. #define ERR_FILE_TRANSFERRING 0x00000054
  56. // Media Open
  57. //#define ERR_VIDEO_LOSS 0x0000001a
  58. //#define ERR_COVERT 0x0000001b
  59. #define ERR_MEDIA_ALREADY_OPEND 0x00000060
  60. // PTZ Control
  61. #define ERR_PTZ_CONFLICT 0x00000070
  62. // XnsWindow Error
  63. #define ERR_INVALID_OBJID 0x00000080
  64. #define ERR_ALREADY_RUN 0x00000081
  65. #define ERR_MEDIA_NOT_OPENED 0x00000082
  66. #define ERR_MEDIA_PAUSED 0x00000083
  67. #define ERR_MEDIA_PLAYED 0x00000084
  68. #define ERR_MEDIA_DISCONNECTED 0x00000085
  69. // File Error
  70. #define ERR_FILE_ALREADY_OPEND 0x00000090
  71. #define ERR_FILE_NOT_OPEND 0x00000091
  72. #define ERR_FILE_OPEN 0x00000092
  73. #define ERR_FILE_SEEK 0x00000093
  74. #define ERR_FILE_READ 0x00000094
  75. #define ERR_FILE_WRITE 0x00000095
  76. #define ERR_INVALID_FRAME 0x00000096
  77. #define ERR_WRITE_STOPPED 0x00000097
  78. #define ERR_WRITE_LIMITED 0x00000098
  79. #define ERR_WRITE_EMPTY 0x00000099
  80. #define ERR_DISK_FULL 0x0000009a
  81. #define ERR_READ_END 0x0000009b
  82. #define ERR_ALREADY_RECORDED 0x0000009c
  83. #define ERR_BACKUP_DOING 0x0000009d
  84. #define ERR_INVALID_XML 0x000000b0
  85. #define ERR_OVERLAPPED 0x000000b1
  86. #define ERR_LIMITED 0x000000b2
  87. #define ERR_BUFFER_FULL 0x000000c0
  88. #define ERR_INVALID_SEQUENCE 0x000000c1
  89. #define ERR_TALK_ALREADY_USE 0x000000c2
  90. // EMAIL INFO 디파인
  91. #define ERR_EMAIL_ALREADY_KEY_EXIST 0x000000d1
  92. #define ERR_EMAIL_KEY_NOT_EXIST 0x000000d2
  93. #define ERR_EMAIL_INVALID_KEY 0x000000d3
  94. #define ERR_EMAIL_SEND_FAIL 0x000000d4
  95. #define ERR_EMAIL_INFO_LIMIT 0x000000d5
  96. //+ jungkoo.kang <2012.11.28> Device Disconnect 에러코드 추가함
  97. #define ERR_DISCONNECT_LOGOUT_BY_ADMIN 0x000000e0
  98. #define ERR_DISCONNECT_TIME_CHANGE 0x000000e1
  99. #define ERR_DISCONNECT_HDD_ERASE 0x000000e2
  100. #define ERR_DISCONNECT_HDD_UNMOUNT 0x000000e3
  101. #define ERR_DISCONNECT_LOAD_FACTORY_DEFAULT 0x000000e4
  102. #define ERR_DISCONNECT_IMPORTED_CONFIG 0x000000e5
  103. #define ERR_DISCONNECT_SYSTEM_SHUTDOWN 0x000000e6
  104. #define ERR_DISCONNECT_REBOOT_MANUALLY 0x000000e7
  105. #define ERR_DISCONNECT_REBOOT_UPGRADE 0x000000e8
  106. #define ERR_DISCONNECT_NETWORK_CHANGE 0x000000e9
  107. //+
  108. //+ jungkoo.kang <2013.04.12> Banamex 관련 Siteminder 접속실패 에러코드 추가
  109. #define ERR_SITEMINDER_CONN_FAILED 0x000000f0
  110. #define ERR_SITEMINDER_AUTH_FAILED 0x000000f1
  111. #define NETADR_IP 1
  112. #define NETADR_URL 2
  113. #define NETADR_DDNS_SAMSUNG 3
  114. #define NETADR_DDNS_S1 4
  115. #define SEC_WRITER 1
  116. #define REC_WRITER 2
  117. #define MEDIA_TYPE_LIVE 1
  118. #define MEDIA_TYPE_PLAYBACK 2
  119. #define MEDIA_TYPE_BACKUP 3
  120. //#define MEDIA_TYPE_LIVE_CODEC1 4
  121. //#define MEDIA_TYPE_LIVE_CODEC2 5
  122. //#define MEDIA_TYPE_FILE 6
  123. #define PTZ_MENU_UP 1
  124. #define PTZ_MENU_DOWN 2
  125. #define PTZ_MENU_LEFT 3
  126. #define PTZ_MENU_RIGHT 4
  127. #define PTZ_MENU_ENTER 5
  128. #define PTZ_MENU_ON 6
  129. #define PTZ_MENU_OFF 7
  130. #define PTZ_MENU_CANCEL 8
  131. #define PTZ_UP 1
  132. #define PTZ_DOWN 2
  133. #define PTZ_LEFT 3
  134. #define PTZ_RIGHT 4
  135. #define PTZ_UPLEFT 5
  136. #define PTZ_UPRIGHT 6
  137. #define PTZ_DOWNLEFT 7
  138. #define PTZ_DOWNRIGHT 8
  139. #define PTZ_ZOOMIN 9
  140. #define PTZ_ZOOMOUT 10
  141. #define PTZ_STOP 11
  142. #define PTZ_FOCUS_NEAR 12
  143. #define PTZ_FOCUS_FAR 13
  144. #define PTZ_FOCUS_STOP 14
  145. #define PTZ_IRIS_OPEN 15
  146. #define PTZ_IRIS_CLOSE 16
  147. #define CAM_STATUS_ON 0x00000001
  148. #define CAM_STATUS_SIGNAL 0x00000002
  149. #define CAM_STATUS_COVERT1 0x00000004
  150. #define CAM_STATUS_COVERT2 0x00000008
  151. #define CAM_STATUS_ACTIVATED 0x00000010
  152. #define CAM_STATUS_NONE 0x00000000
  153. #define CAM_STATUS_MASK_ALL 0xffffffff
  154. #define CAP_NONE 0x00000000
  155. #define CAP_MASK_ALL 0xffffffff
  156. #define DEVICE_CAP_NONE 0x00000000
  157. #define DEVICE_CAP_SW_UPLOAD 0x00000001
  158. #define DEVICE_CAP_CFG_IMPORT 0x00000002
  159. #define DEVICE_CAP_CFG_EXPORT 0x00000004
  160. #define DEVICE_CAP_CONN_FORCED 0x00000008
  161. #define DEVICE_CAP_MEDIA_AUTHORITY 0x00000010
  162. #define DEVICE_CAP_FSPEED1 0x00020000
  163. #define DEVICE_CAP_FSPEED2 0x00040000
  164. #define DEVICE_CAP_FSPEED4 0x00060000
  165. #define DEVICE_CAP_FSPEED8 0x00080000
  166. #define DEVICE_CAP_FSPEED16 0x000a0000
  167. #define DEVICE_CAP_FSPEED32 0x000c0000
  168. #define DEVICE_CAP_FSPEED64 0x000e0000
  169. #define DEVICE_CAP_BSPEED1 0x00100000
  170. #define DEVICE_CAP_BSPEED2 0x00200000
  171. #define DEVICE_CAP_BSPEED4 0x00300000
  172. #define DEVICE_CAP_BSPEED8 0x00400000
  173. #define DEVICE_CAP_BSPEED16 0x00500000
  174. #define DEVICE_CAP_BSPEED32 0x00600000
  175. #define DEVICE_CAP_BSPEED64 0x00700000
  176. #define DEVICE_CAP_FSSPEED1 0x00800000
  177. #define DEVICE_CAP_FSSPEED2 0x01000000
  178. #define DEVICE_CAP_FSSPEED4 0x01800000
  179. #define DEVICE_CAP_FSSPEED8 0x02000000
  180. #define DEVICE_CAP_FSSPEED16 0x02800000
  181. #define DEVICE_CAP_FSSPEED32 0x03000000
  182. #define DEVICE_CAP_FSSPEED64 0x03800000
  183. #define DEVICE_CAP_BSSPEED1 0x04000000
  184. #define DEVICE_CAP_BSSPEED2 0x08000000
  185. #define DEVICE_CAP_BSSPEED4 0x0c000000
  186. #define DEVICE_CAP_BSSPEED8 0x10000000
  187. #define DEVICE_CAP_BSSPEED16 0x14000000
  188. #define DEVICE_CAP_BSSPEED32 0x18000000
  189. #define DEVICE_CAP_BSSPEED64 0x1c000000
  190. #define DEVICE_CAP_SEEK 0x20000000
  191. #define DEVICE_CAP_FSTEP 0x40000000
  192. #define DEVICE_CAP_BSTEP 0x80000000
  193. #define DEVICE_CAP_MASK_OFFLINE 0xfffe001f
  194. #define DEVICE_CAP_MASK_ONLINE 0x0001ffe0
  195. #define CHANNEL_CAP_LIVE 0x00000001
  196. #define CHANNEL_CAP_SEARCH 0x00000002
  197. #define CHANNEL_CAP_BACKUP 0x00000004
  198. #define CHANNEL_CAP_LISTEN 0x00000008
  199. #define CHANNEL_CAP_TALK 0x00000010
  200. #define CHANNEL_CAP_MENU 0x00000020
  201. #define CHANNEL_CAP_PTZ_PAN 0x00000040
  202. #define CHANNEL_CAP_PTZ_TILT 0x00000080
  203. #define CHANNEL_CAP_PTZ_ZOOM 0x00000100
  204. #define CHANNEL_CAP_PTZ_SPEED 0x00000200
  205. #define CHANNEL_CAP_PTZ_PRESET 0x00000400
  206. #define CHANNEL_CAP_PTZ_FUNCTION 0x00000800
  207. #define CHANNEL_CAP_PTZ_POWER 0x00001000
  208. #define CHANNEL_CAP_IRIS 0x00002000
  209. #define CHANNEL_CAP_FOCUS 0x00004000
  210. #define CHANNEL_CAP_BRIGHTNESS 0x00008000
  211. #define CHANNEL_CAP_CONTRAST 0x00010000
  212. #define CHANNEL_CAP_PTZ_FREE_MOVE 0x00020000
  213. #define CHANNEL_CAP_PTZ_SPEED_ZOOM 0x00040000
  214. #define VIDEO_CAP_LIVE 0x00000001
  215. #define ALARMOUT_CAP_ONOFF 0x00000001
  216. #define REC_TYPE_NONE 0x00
  217. #define REC_TYPE_MOTION 0x01
  218. #define REC_TYPE_ALARM 0x02
  219. #define REC_TYPE_VLOSS 0x04
  220. #define REC_TYPE_MANUAL 0x08
  221. #define REC_TYPE_CONTINUOS 0x10
  222. #define REC_TYPE_ALL 0xff
  223. #define HPTZ_TYPE_PRESET 1
  224. #define HPTZ_TYPE_AUTOPAN 2
  225. #define HPTZ_TYPE_SCAN 3
  226. #define HPTZ_TYPE_PATTERN 4
  227. #define FILE_TRANS_SW_UP 1
  228. #define FILE_TRANS_CFG_IMPORT 2
  229. #define FILE_TRANS_CFG_EXPORT 3
  230. #define MEDIA_VIDEO 1
  231. #define MEDIA_AUDIO 2
  232. #define VCODEC_UNKNOWN 0x00000000
  233. #define VCODEC_JPEG 0x00000001
  234. #define VCODEC_MJPEG 0x00000002
  235. #define VCODEC_MP4V 0x00000004
  236. #define VCODEC_MP4V_ASP 0x00000008
  237. #define VCODEC_PENTA 0x00000010
  238. #define VCODEC_SOLO 0x00000020
  239. #define VCODEC_H264 0x00000040
  240. #define ACODEC_G711 0x00010000
  241. #define ACODEC_G711_IPCAM 0x00010001
  242. #define ACODEC_G726 0x00020000
  243. #define ACODEC_PCM 0x00040000
  244. #define ACODEC_G726_504X 0x00080000
  245. #define ACODEC_IMA_ADPCM 0x00100000
  246. #define ACODEC_G723 0x00200000
  247. #define FRAME_UNKNOWN 0
  248. #define FRAME_IVOP 1
  249. #define FRAME_PVOP 2
  250. #define FRAME_BVOP 3
  251. #define FRAME_END 4
  252. #define OBJ_ALL 0xFFFFFFFF
  253. #define XOBJ_ALL 0x000000FF
  254. #define XOBJ_DEVICE 0x00000001
  255. #define XOBJ_CHANNEL 0x00000002
  256. #define XOBJ_VIDEO 0x00000004
  257. #define XOBJ_ALARMIN 0x00000008
  258. #define XOBJ_ALARMOUT 0x00000010
  259. #define PLAY_TYPE_NONE 0
  260. #define PLAY_TYPE_LIVE 1
  261. #define PLAY_TYPE_PLAYBACK 2
  262. #define MEDIA_STATUS_NONE 0
  263. #define LIVE_STATUS_ON 1
  264. #define LIVE_STATUS_VLOSS 2
  265. #define LIVE_STATUS_COVERT 3
  266. #define LIVE_STATUS_DISALBE 4
  267. #define LIVE_STATUS_DISCONNECT 5
  268. #define PLAYBACK_STATUS_PLAY 1
  269. #define PLAYBACK_STATUS_PAUSE 2
  270. #define PLAYBACK_STATUS_NODATA 3
  271. #define PLAYBACK_STATUS_COVERT 4
  272. #define PLAYBACK_STATUS_DISCONNECT 5
  273. // OSD TYPE
  274. #define OSD_ALL 0x0000FFFF
  275. #define OSD_TIME1 0x00000001
  276. #define OSD_TIME2 0x00000002
  277. #define OSD_IPS 0x00000004
  278. #define OSD_LOCAL_NAME 0x00000008
  279. #define OSD_REMOTE_NAME 0x00000010
  280. #define OSD_SPEED 0x00000020
  281. #define OSD_PTZ 0x00000040
  282. #define OSD_LISTEN 0x00000080
  283. #define OSD_TALK 0x00000100
  284. #define OSD_SENSOR 0x00000200
  285. #define OSD_MOTION 0x00000400
  286. #define OSD_DVR_RECORDING 0x00000800
  287. #define OSD_LOCAL_RECORDING 0x00001000
  288. #define EVENT_ALL 0x000000ff
  289. #define EVENT_ALARM 0x00000001
  290. #define EVENT_MOTION 0x00000002
  291. #define EVENT_VIDEOLOSS 0x00000004
  292. #define EXTRACT_TYPE( nObjectID ) ( (nObjectID&(0xff<<24))>>24 )
  293. #define EXTRACT_SESSIONID( nObjectID ) ( (nObjectID&(0xfff<<12))>>12 )
  294. #define EXTRACT_CHANNELNUM( nObjectID ) ( (nObjectID&(0xff<<4))>>4 )
  295. #define EXTRACT_VIDEONUM( nObjectID ) (nObjectID&0xf )
  296. #define EXTRACT_ALARMINNUM( nObjectID ) ( (nObjectID&(0xff<<4))>>4 )
  297. #define EXTRACT_ALARMOUTNUM( nObjectID ) ( (nObjectID&(0xff<<4))>>4 )