-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPhpLinphoneAuth.h
executable file
·92 lines (75 loc) · 2.08 KB
/
PhpLinphoneAuth.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#ifndef PHPLINPHONE_PHPLINPHONEAUTH_H
#define PHPLINPHONE_PHPLINPHONEAUTH_H
#include <phpcpp.h>
#include <linphone/linphonecore.h>
#include <iostream>
#include "PhpLinphoneCore.h"
/**
* This class rapresent a linphone authentication object.
*/
class PhpLinphoneAuth : public Php::Base {
private:
/**
* The authentication username.
*/
std::string username;
/**
* The authentication password.
*/
std::string password;
/**
* A pointer to linphone core object.
*/
PhpLinphoneCore *core;
/**
* A pointer to linphone authentication informations.
*/
LinphoneAuthInfo *info;
/**
* A pointer to the address of the user to call.
*/
LinphoneAddress *from;
public:
/**
* Constructor gives a default value to the attributes.
*/
PhpLinphoneAuth() : core(nullptr), info(nullptr), from(nullptr) {}
/**
* This method is automatically invoked by PHP to build an istance of this class.
* @param parameters an array with the accepted parameters.
*/
void __construct(Php::Parameters &);
/**
* Virtual destructor.
*/
virtual ~PhpLinphoneAuth() {}
/**
* This method is automatically invoked by PHP when this object goes out of scope.
*/
void __destruct();
/**
* This method allows to specify an authentication username.
*/
void setUsername(Php::Parameters &);
/**
* This method allows to specifiy an authentication password.
*/
void setPassword(Php::Parameters &);
/**
* This method builds the authentication object.
*/
void build();
/**
* This method is not visible from PHP. It is visible only from C++ and it returns the linphone authentication info.
*/
LinphoneAuthInfo *get();
/**
* This method is not visible from PHP. It is visible only from C++ and it returns the linphone address to call.
*/
LinphoneAddress *getFrom();
/**
* This method returns the username of the called user.
*/
std::string getUsername() const;
};
#endif //PHPLINPHONE_PHPLINHONEAUTH_H