Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

zapIStunMessage.idl

Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the Mozilla SIP client project.
00015  *
00016  * The Initial Developer of the Original Code is 8x8 Inc.
00017  * Portions created by the Initial Developer are Copyright (C) 2005
00018  * the Initial Developer. All Rights Reserved.
00019  *
00020  * Contributor(s):
00021  *   Alex Fritze <alex@croczilla.com> (original author)
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 #include "nsISupports.idl"
00038 
00042 [scriptable, uuid(a86483da-1baf-4417-a644-562e0c3ae87a)]
00043 interface zapIStunMessage : nsISupports
00044 {
00048   ACString serialize();
00049 
00058   void deserialize(in ACString packet,
00059                    [array, size_is(count)] out
00060                    unsigned short unknownAttribs,
00061                    out unsigned long count);
00062   
00067   const unsigned short BINDING_REQUEST_MESSAGE              = 0x0001;
00068   const unsigned short BINDING_RESPONSE_MESSAGE             = 0x0101;
00069   const unsigned short BINDING_ERROR_RESPONSE_MESSAGE       = 0x0111;
00070   const unsigned short SHARED_SECRET_REQUEST_MESSAGE        = 0x0002;
00071   const unsigned short SHARED_SECRET_RESPONSE_MESSAGE       = 0x0102;
00072   const unsigned short SHARED_SECRET_ERROR_RESPONSE_MESSAGE = 0x0112;
00079   attribute unsigned short messageType;
00080 
00084   attribute ACString transactionID;
00085 
00089   void initTransactionID();
00090   
00097   attribute boolean hasMappedAddressAttrib;
00098   attribute unsigned short mappedAddressPort;
00105   attribute ACString mappedAddress;
00112   attribute boolean hasResponseAddressAttrib;
00113   attribute unsigned short responseAddressPort;
00120   attribute ACString responseAddress;
00127   attribute boolean hasChangeRequestAttrib;
00128   attribute boolean changeRequestChangeIP;
00129   attribute boolean changeRequestChangePort;
00136   attribute boolean hasSourceAddressAttrib;
00137   attribute unsigned short sourceAddressPort;
00144   attribute ACString sourceAddress;
00151   attribute boolean hasChangedAddressAttrib;
00152   attribute unsigned short changedAddressPort;
00159   attribute ACString changedAddress;
00166   attribute boolean hasUsernameAttrib;
00170   attribute ACString username;
00177   attribute boolean hasPasswordAttrib;
00181   attribute ACString password;
00188   attribute boolean hasMessageIntegrityAttrib;
00192   attribute ACString messageIntegrity;
00197   void generateMessageIntegrityAttrib(in ACString key);
00204   boolean checkMessageIntegrity(in ACString key);
00211   attribute boolean hasErrorCodeAttrib;
00215   attribute ACString errorCode;
00220   attribute ACString errorCodeReasonPhrase;
00227   attribute boolean hasUnknownAttributesAttrib;
00228   void getUnknownAttributes(out unsigned long count,
00229                             [array, size_is(count), retval] out
00230                             unsigned short attribs);
00231   void setUnknownAttributes([array, size_is(count)] in unsigned short attribs,
00232                             in unsigned long count);
00239   attribute boolean hasReflectedFromAttrib;
00240   attribute unsigned short reflectedFromPort;
00247   attribute ACString reflectedFrom;
00254   attribute boolean hasXORMappedAddressAttrib;
00255   attribute unsigned short XORMappedAddressPort;
00263   attribute ACString XORMappedAddress;
00270   attribute boolean hasXOROnlyAttrib;
00277   attribute boolean hasServerAttrib;
00282   attribute ACString server;
00284 };
00285 
00286 %{ C++
00287 
00288 // {90557418-0EDE-4C40-8FB8-13D009882646}
00289 #define ZAP_STUNMESSAGE_CID \
00290     { 0x90557418, 0x0ede, 0x4c40, { 0x8f, 0xb8, 0x13, 0xd0, 0x09, 0x88, 0x26, 0x46 } }
00291     
00292 #define ZAP_STUNMESSAGE_CONTRACTID "@mozilla.org/zap/stun-message;1"
00293 %}

Generated on Wed Nov 19 00:00:01 2008 for Mozilla ZAP by  doxygen 1.4.4