-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathHeadcrab.h
41 lines (35 loc) · 981 Bytes
/
Headcrab.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Author: Robert Weber
*
* Created on November 14, 2012, 2:48 PM
*/
#pragma once
#include <stdint.h>
#include <map>
#include <string>
#include <vector>
struct _zctx_t;
typedef struct _zctx_t zctx_t;
class Headcrab {
public:
explicit Headcrab(const std::string& binding);
virtual ~Headcrab();
std::string GetBinding() const;
zctx_t* GetContext() const;
bool ComeToLife();
void* GetFace(zctx_t* context);
bool GetHitBlock(std::vector<std::string>& theHits);
bool GetHitWait(std::vector<std::string>& theHit,const int timeout);
bool SendSplatter(std::vector<std::string>& feedback);
bool GetHitBlock(std::string& theHit);
bool GetHitWait(std::string& theHit,const int timeout);
bool SendSplatter(const std::string& feedback);
static int GetHighWater();
private:
void setIpcFilePermissions();
Headcrab(const Headcrab& that) : mContext(NULL), mFace(NULL) {
}
std::string mBinding;
zctx_t* mContext;
void* mFace;
};