⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 auto_cp.h

📁 自动侦测插入的存贮设备(U盘/移动硬盘等)
💻 H
字号:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <termios.h>
#include <time.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/time.h>
#include <netdb.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/utsname.h>
#include <error.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include "mdebug.h"
#include <sys/ipc.h>
#include <sys/msg.h>
#include <sys/stat.h>
#include <sys/utsname.h>
#include <sys/socket.h>
#include <signal.h>
#include <error.h>
#include <pthread.h>

#define PORTCONF "./auto_cp.conf"
#define LOGFILE  "./log/auto_cp"


#define INSERT 1
#define REMOVE 2
#define FINDDISK 3

#define USB_HANDLE_START 2
#define USB_HANDLE_SUCCESS 1
#define USB_HANDLE_FAIL  0

#define	MSGKEY_RECVTOMANG		0x11112 //接收进程发送心跳给给主进程
////////////////////////////////////////////////////////////
////节目单格式:
//        1;19:50:00:000;0;14;14;xuan-070915-zx0030.mpg
//        2;19:50:14:000;0;19;19;xuan-070815-zx0016.mpg
//        1;19:50:33:000;0;108;108;adve-061001-200311.mpg
//        3;19:52:21:000;0;500;500;vogu-070915-00053a.mpg
// 
//     以分号做为分隔符,每项含义说明如下
//     第一项: 1代表正常节目调度
//              2代表GPS插播的节目
//              3代表手工插播的节目
//     第二项:节目开播时间
//     第三项:节目从第几秒开始播放
//     第三项:节目结束时间
//     第四项:节目总时长
//     第五项:节目文件名
///////////////////////////////////////////////////////////
struct msgqueue {
	long type;
	long body;
	char dev[28];
};
 


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -