?? communicate.h
字號:
#ifndef __COMMUNICATE_H_#define __COMMUNICATE_H_#include <sys/types.h>#include <sys/msg.h>#include <sys/ipc.h>#include <string.h>#include <unistd.h>#include <stdlib.h>#include <iostream>#include <assert.h>#include "NggObject.h"using namespace std;#define APPLY_CERT 10001#define REVOKE_CERT 10002#define SHOW_CERTS 10003#define SHOW_CRL 10004#define UPDATE_CERT 10005#define EXPORT_CERT 10006#define APPLY_GW_CERT 10007#define REMOVE_FROM_CRL 10008#define RECOVER_CERT 10009#define VERIFY_CERT 100010#define IMPORT_THIRD_CRL 100011#define EXPORT_CRL 100012#define PKI_SERVICE 11111#define CA_CONFIG_PATH "./CA.xml"#define K 1024#define SIZE 8*Ktypedef struct tagMessage { int type; char content[SIZE];}MSG;typedef struct tagContent{ long type; char buf[SIZE];}CONTENT;/* * content : struct tagContent{long length, char* }; */class Communicate{public: Communicate(string type="ra"); ~Communicate(); CONTENT caGetMessageFromADT(); CONTENT ADTGetMessageFromCA(); int caSendMessageToADT(CONTENT msg); int ADTSendMessageToCA(CONTENT msg); string readCAconfig(string keyword, string objectName=""); void setCAConfigItem(string keyword, string objectName="", string value=""); void freeCA(); void freeADT(); int m_flag;private: void initializeADT(); void initializeCA(); CONTENT getMessage(string objectName="ca"); int sendMessage(CONTENT msg, string objectName="ca"); string m_type;public: int fromCA, fromADT; int toCA, toADT;};#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -