-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPhpLinphoneCore.h
executable file
·66 lines (54 loc) · 1.51 KB
/
PhpLinphoneCore.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef PHPLINPHONE_PHPLINPHONECORE_H
#define PHPLINPHONE_PHPLINPHONECORE_H
#include <phpcpp.h>
#include <linphone/linphonecore.h>
#include <mutex>
/**
* This class rapresent the linphone core object.
*/
class PhpLinphoneCore : public Php::Base {
private:
/**
* A pointer to the linphone core object.
*/
LinphoneCore *_core;
/**
* A mutex used to synchronize the liblinphone calls.
*/
std::mutex coreMutex;
public:
/**
* The constuctor will initialize the core pointer.
*/
PhpLinphoneCore() : _core(nullptr) {}
/**
* This method is directly invoked by PHP interpreter to build an istance of this class.
* @param parameters an array with the accepted parameters.
*/
void __construct(Php::Parameters &);
/**
* This method is directly invoked by PHP destructor to destroy an istance of this class.
*/
void __destruct();
/**
* Virtual destructor.
*/
virtual ~PhpLinphoneCore() {}
/**
* This method must be called periodically to allow linphone to do background work.
*/
void iterate();
/**
* This method is not visible from PHP, but only from C++, it is used to lock the core object.
*/
void lock();
/**
* This method is not visible from PHP, but only from C++, it is used to unlock the core object.
*/
void unlock();
/**
* This method returns the pointer to the linphone core object.
*/
LinphoneCore *get();
};
#endif //PHPLINPHONE_PHPLINPHONECORE_H