zrtp.h

Go to the documentation of this file.
00001 /*
00002  * zrtp.h
00003  *
00004  * ZRTP protocol handler
00005  *
00006  * OPAL Library
00007  *
00008  * Copyright (C) 2007 Post Increment
00009  *
00010  * The contents of this file are subject to the Mozilla Public License
00011  * Version 1.0 (the "License"); you may not use this file except in
00012  * compliance with the License. You may obtain a copy of the License at
00013  * http://www.mozilla.org/MPL/
00014  *
00015  * Software distributed under the License is distributed on an "AS IS"
00016  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00017  * the License for the specific language governing rights and limitations
00018  * under the License.
00019  *
00020  * The Original Code is OPAL Library.
00021  *
00022  * The Initial Developer of the Original Code is Post Increment
00023  *
00024  * Contributor(s): ______________________________________.
00025  *
00026  * $Log: zrtp.h,v $
00027  * Revision 2.2  2007/05/21 04:30:30  dereksmithies
00028  * put #ifndef _PTLIB_H protection around the include of ptlib.h
00029  *
00030  * Revision 2.1  2007/02/12 02:44:27  csoutheren
00031  * Start of support for ZRTP
00032  *
00033  * Revision 2.1  2007/02/10 07:08:41  craigs
00034  * Start of support for ZRTP
00035  *
00036  */
00037 
00038 #ifndef __OPAL_ZRTP_H
00039 #define __OPAL_ZRTP_H
00040 
00041 #ifdef P_USE_PRAGMA
00042 #pragma interface
00043 #endif
00044 
00045 #ifndef _PTLIB_H
00046 #include <ptlib.h>
00047 #endif
00048 
00049 #include <opal/buildopts.h>
00050 
00051 #if defined(OPAL_ZRTP)
00052 
00053 #include <rtp/rtp.h>
00054 #include <opal/connection.h>
00055 
00056 namespace PWLibStupidLinkerHacks {
00057   extern int libZRTPLoader;
00058 };
00059 
00060 extern "C" {
00061 struct zrtp_global_ctx;
00062 };
00063 
00065 //
00066 //  this class holds the parameters required for a ZRTP session
00067 //
00068 
00069 class OpalZRTPSecurityMode : public OpalSecurityMode
00070 {
00071   PCLASSINFO(OpalZRTPSecurityMode, OpalSecurityMode);
00072 };
00073 
00074 
00076 //
00077 //  this class implements ZRTP over UDP
00078 //
00079 
00080 class OpalZRTP_UDP : public SecureRTP_UDP
00081 {
00082   PCLASSINFO(OpalZRTP_UDP, SecureRTP_UDP);
00083   public:
00084     OpalZRTP_UDP(
00085       PHandleAggregator * _aggregator,   
00086       unsigned id,                       
00087       BOOL remoteIsNAT                  
00088     );
00089 
00090     ~OpalZRTP_UDP();
00091 
00092     SendReceiveStatus OnSendData   (RTP_DataFrame & frame);
00093     SendReceiveStatus OnReceiveData(RTP_DataFrame & frame);
00094     SendReceiveStatus OnSendControl(RTP_ControlFrame & frame, PINDEX & len);
00095     SendReceiveStatus OnReceiveControl(RTP_ControlFrame & frame);
00096 };
00097 
00098 #endif // OPAL_ZRTP
00099 
00100 #endif // __OPAL_ZRTP_H
00101 

Generated on Fri Mar 7 06:33:42 2008 for OPAL by  doxygen 1.5.1