ccRTP 2.1.2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ZrtpUserCallback.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2006-2008 Werner Dittmann
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef _ZRTPUSERCALLBACK_H_
19 #define _ZRTPUSERCALLBACK_H_
20 
29 #include <stdint.h>
30 #include <string>
31 
32 #include <libzrtpcpp/ZrtpCodes.h>
33 
55 
56  public:
57 
60 
61  virtual ~ZrtpUserCallback() {};
62 
72  virtual void secureOn(std::string cipher) {
73  return;
74  }
82  virtual void secureOff() {
83  return;
84  }
85 
100  virtual void showSAS(std::string sas, bool verified) {
101  return;
102  }
103 
111  virtual void confirmGoClear() {
112  return;
113  }
114 
129  virtual void showMessage(GnuZrtpCodes::MessageSeverity sev, int32_t subCode) {
130  return;
131  }
132 
146  int32_t subCode) {
147  return;
148  }
149 
157  virtual void zrtpNotSuppOther() {
158  return;
159  }
160 
173  return;
174  }
175 
188  return;
189  }
190 
206  virtual void signSAS(uint8_t* sasHash) {
207  return;
208  }
209 
229  virtual bool checkSASSignature(uint8_t* sasHash) {
230  return true;
231  }
232 };
233 
234 #endif
virtual void showSAS(std::string sas, bool verified)
Show the Short Authentication String (SAS) on user interface.
The ZRTP info, warning, and error codes.
virtual void zrtpNotSuppOther()
ZRTPQueue calls this method if the other side does not support ZRTP.
virtual void signSAS(uint8_t *sasHash)
ZRTPQueue calls this method to request a SAS signature.
virtual void zrtpNegotiationFailed(GnuZrtpCodes::MessageSeverity severity, int32_t subCode)
ZRTPQueue calls this if the negotiation failed.
virtual void showMessage(GnuZrtpCodes::MessageSeverity sev, int32_t subCode)
Show some information to user.
InfoEnrollment
Information codes for the Enrollment user callbacks.
Definition: ZrtpCodes.h:152
virtual bool checkSASSignature(uint8_t *sasHash)
ZRTPQueue calls this method to request a SAS signature check.
Application callback methods.
virtual void confirmGoClear()
Inform the user that ZRTP received "go clear" message from its peer.
#define __EXPORT
Definition: ZrtpCallback.h:40
virtual void zrtpAskEnrollment(GnuZrtpCodes::InfoEnrollment info)
ZRTPQueue calls this method to inform about a PBX enrollment request.
virtual ~ZrtpUserCallback()
virtual void secureOff()
Inform user interface that security is not active any more.
virtual void zrtpInformEnrollment(GnuZrtpCodes::InfoEnrollment info)
ZRTPQueue calls this method to inform about PBX enrollment result.
ZrtpUserCallback()
Create the stadard user callback class.
virtual void secureOn(std::string cipher)
Inform user interface that security is active now.