Back to index

lightning-sunbird  0.9+nobinonly
nsIWSPProxyTest.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 2001
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   John Bandhauer (jband@netscape.com)
00024  *   Vidur Apparao (vidur@netscape.com)
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either the GNU General Public License Version 2 or later (the "GPL"), or
00028  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 #include "nsISupports.idl"
00041 #include "nsIWebServiceProxy.idl"
00042 
00043 [scriptable, uuid(f8127804-529d-4f9f-90cc-e7447491ed42)]
00044 interface nsIWSPProxyTestListener : nsISupports {
00045   void onIsPrimeProxyTestComplete(in AString result);
00046 };
00047 
00048 [scriptable, uuid(fd25b392-f435-4aea-bbbc-0886f8239dce)]
00049 interface nsIWSPProxyTest : nsISupports {
00050   AString testComplexTypeWrapper();
00051   AString testPropertyBagWrapper();
00052   void testIsPrimeProxy(in nsIWSPProxyTestListener aListener);
00053 };
00054 
00055 [uuid(6de70ec8-46fb-49d5-8dac-9d2eae42ea5a)]
00056 interface nsIWSPTestComplexType : nsISupports {
00057   readonly attribute PRUint8 i8;
00058   readonly attribute PRInt16 i16;
00059   readonly attribute PRInt32 i32;
00060   readonly attribute PRInt64 i64;
00061   readonly attribute PRUint8 u8;
00062   readonly attribute PRUint16 u16;
00063   readonly attribute PRUint32 u32;
00064   readonly attribute PRUint64 u64;
00065   readonly attribute PRBool b;
00066   readonly attribute float f;
00067   readonly attribute double d;
00068   readonly attribute char c;
00069   readonly attribute wchar wc;
00070   readonly attribute AString s;
00071   readonly attribute nsIWSPTestComplexType p;
00072   readonly attribute nsIWSPTestComplexType p2;
00073   void array1(out PRUint32 length, [array, retval, size_is(length)] out PRUint32 array1);
00074   void array2(out PRUint32 length, [array, retval, size_is(length)] out double array2);
00075   void array3(out PRUint32 length, [array, retval, size_is(length)] out nsIWSPTestComplexType array3);
00076 };
00077 
00078 %{ C++
00079 #define NS_WSPPROXYTEST_CONTRACTID "@mozilla.org/xmlextras/proxy/webserviceproxytest;1"
00080 #define NS_WSPPROXYTEST_CID                        \
00081 { /* cdb03ec6-4a5e-4461-996e-16f517e53b87 */       \
00082   0xcdb03ec6, 0x4a5e, 0x4461,                      \
00083  {0x99, 0x6e, 0x16, 0xf5, 0x17, 0xe5, 0x3b, 0x87} }
00084 %} 
00085 
00086 [scriptable, uuid(5d557963-b082-4f93-b96d-8e4d6b7cd5cd)]
00087 interface statisticStruct : nsISupports {
00088   readonly attribute double average;
00089   readonly attribute double standardDeviation;
00090 };
00091 
00092 [scriptable, uuid(4814fb14-d081-4cb9-995d-fd6472913c6c)]
00093 interface SpheonJSAOPStatisticsPortType : nsISupports {
00094   statisticStruct getStatistics(in PRUint32 valsLength, [array, size_is(valsLength)] in double vals);
00095   boolean isPrimeNumber(in PRInt32 prime);
00096   PRInt32 crossSum(in PRInt32 sum);
00097 };
00098 
00099 [scriptable, uuid(7b7b9508-8a0a-4b41-bf35-167804376c40)]
00100 interface SpheonJSAOPStatisticsPortTypeListener : nsISupports {
00101   void onError(in nsIException error, in nsIWebServiceCallContext cx);
00102   void getStatisticsCallback(in statisticStruct retval, in nsIWebServiceCallContext cx);
00103   void isPrimeNumberCallback(in boolean retval, in nsIWebServiceCallContext cx);
00104   void crossSumCallback(in PRInt32 retval, in nsIWebServiceCallContext cx);
00105 };
00106 
00107 [scriptable, uuid(bbae3748-d7eb-453c-8b48-7b760f7075f6)]
00108 interface SpheonJSAOPStatisticsPortTypeAsync : nsISupports {
00109   void setListener(in SpheonJSAOPStatisticsPortTypeListener listener);
00110   nsIWebServiceCallContext getStatistics(in PRUint32 valsLength,
00111             [array, size_is(valsLength)] in double vals);
00112   nsIWebServiceCallContext isPrimeNumber(in PRInt32 prime);
00113   nsIWebServiceCallContext crossSum(in PRInt32 sum);
00114 };
00115