Back to index

lightning-sunbird  0.9+nobinonly
nsIWebDAVService.idl
Go to the documentation of this file.
00001 /* -*- Mode: idl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 // vim:expandtab:ts=4 sw=4:
00003 /* ***** BEGIN LICENSE BLOCK *****
00004  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00005  *
00006  * The contents of this file are subject to the Mozilla Public License Version
00007  * 1.1 (the "License"); you may not use this file except in compliance with
00008  * the License. You may obtain a copy of the License at
00009  * http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS" basis,
00012  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013  * for the specific language governing rights and limitations under the
00014  * License.
00015  *
00016  * The Original Code is Mozilla.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Oracle Corporation.
00020  * Portions created by the Initial Developer are Copyright (C) 2004
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   Mike Shaver <shaver@off.net> (original author)
00025  *   Dan Mosedale <dan.mosedale@oracle.com>
00026  *   Gary van der Merwe <garyvdm@gmail.com>
00027  *
00028  * Alternatively, the contents of this file may be used under the terms of
00029  * either the GNU General Public License Version 2 or later (the "GPL"), or
00030  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00031  * in which case the provisions of the GPL or the LGPL are applicable instead
00032  * of those above. If you wish to allow use of your version of this file only
00033  * under the terms of either the GPL or the LGPL, and not to allow others to
00034  * use your version of this file under the terms of the MPL, indicate your
00035  * decision by deleting the provisions above and replace them with the notice
00036  * and other provisions required by the GPL or the LGPL. If you do not delete
00037  * the provisions above, a recipient may use your version of this file under
00038  * the terms of any one of the MPL, the GPL or the LGPL.
00039  *
00040  * ***** END LICENSE BLOCK ***** */
00041 
00042 #include "nsISupports.idl"
00043 #include "nsIWebDAVListener.idl"
00044 #include "nsIWebDAVResource.idl"
00045 
00046 interface nsIStreamListener;
00047 interface nsIOutputStream;
00048 interface nsIInputStream;
00049 interface nsIDOMDocument;
00050 interface nsIInterfaceRequestor;
00051 
00052 [scriptable,uuid(173ef52e-2a2f-45ca-8f9f-abc7429163c2)]
00053 interface nsIWebDAVService : nsISupports
00054 {
00066     void lockResources(in PRUint32 count,
00067                        [array, size_is(count)]
00068                        in nsIWebDAVResource resources,
00069                        in nsIWebDAVOperationListener listener,
00070                        in nsIInterfaceRequestor notificationCallbacks,
00071                        in nsISupports closure);
00072 
00084     void unlockResources(in PRUint32 count,
00085                          [array, size_is(count)]
00086                          in nsIWebDAVResource resources,
00087                          in nsIWebDAVOperationListener listener,
00088                          in nsIInterfaceRequestor notificationCallbacks,
00089                          in nsISupports closure);
00101     void getResourcePropertyNames(in nsIWebDAVResource resource,
00102                                   in boolean withDepth,
00103                                   in nsIWebDAVOperationListener listener,
00104                                   in nsIInterfaceRequestor notificationCallbacks,
00105                                   in nsISupports closure);
00120     void getResourceProperties(in nsIWebDAVResource resource,
00121                                in PRUint32 propCount,
00122                                [array, size_is(propCount)]
00123                                in string properties, /* XXX wstring? */
00124                                in boolean withDepth,
00125                                in nsIWebDAVOperationListener listener,
00126                                in nsIInterfaceRequestor notificationCallbacks,
00127                                in nsISupports closure);
00139     void getResourceOptions(in nsIWebDAVResource resource,
00140                             in nsIWebDAVOperationListener listener,
00141                             in nsIInterfaceRequestor notificationCallbacks,
00142                             in nsISupports closure);
00143 
00155     void get(in nsIWebDAVResource resource, in nsIStreamListener listener,
00156              in nsIInterfaceRequestor notificationCallbacks);
00157 
00174     void getToOutputStream(in nsIWebDAVResource resource,
00175                            in nsIOutputStream stream,
00176                            in nsIWebDAVOperationListener listener, 
00177                            in nsIInterfaceRequestor notificationCallbacks,
00178                            in nsISupports closure);
00179 
00193     void getToString(in nsIWebDAVResource resource,
00194                      in nsIWebDAVOperationListener listener,
00195                      in nsIInterfaceRequestor notificationCallbacks,
00196                      in nsISupports closure);
00197 
00209     void put(in nsIWebDAVResource resource, in ACString contentType,
00210              in nsIInputStream data, in nsIWebDAVOperationListener listener,
00211              in nsIInterfaceRequestor notificationCallbacks,
00212              in nsISupports closure);
00213 
00225     void putFromString(in nsIWebDAVResource resource, in ACString contentType,
00226                        in AUTF8String data,
00227                        in nsIWebDAVOperationListener listener,
00228                        in nsIInterfaceRequestor notificationCallbacks,
00229                        in nsISupports closure);
00230 
00242     void remove(in nsIWebDAVResource resource,
00243                 in nsIWebDAVOperationListener listener,
00244                 in nsIInterfaceRequestor notificationCallbacks,
00245                 in nsISupports closure);
00246 
00258     void moveTo(in nsIWebDAVResource resource,
00259                 in ACString destination,
00260                 in boolean overwrite,
00261                 in nsIWebDAVOperationListener listener,
00262                 in nsIInterfaceRequestor notificationCallbacks,
00263                 in nsISupports closure);
00264 
00276     void copyTo(in nsIWebDAVResource resource,
00277                 in ACString destination,
00278                 in boolean recursive,
00279                 in boolean overwrite,
00280                 in nsIWebDAVOperationListener listener,
00281                 in nsIInterfaceRequestor notificationCallbacks,
00282                 in nsISupports closure);
00294     void makeCollection(in nsIWebDAVResource resource,
00295                         in nsIWebDAVOperationListener listener, 
00296                         in nsIInterfaceRequestor notificationCallbacks,
00297                         in nsISupports closure);
00298 
00317     void report(in nsIWebDAVResource resource,
00318                 in nsIDOMDocument query,
00319                 in boolean withDepth,
00320                 in nsIWebDAVOperationListener listener,
00321                 in nsIInterfaceRequestor notificationCallbacks,
00322                 in nsISupports closure);
00323 };
00324 
00325 [scriptable,uuid(96c8d65a-fa17-408c-8008-1aa2b95952d4)]
00326 interface nsIWebDAVResourceXXX : nsISupports
00327 {
00328   readonly attribute boolean isCollection;
00329 
00330   void setProperties([array,size_is(count)] in string propname,
00331                      [array,size_is(count)] in string propvalues,
00332                      in PRUint32 count);
00333 };