Backed out changeset 88fbb17e3c20 (bug 1865637) for causing animation related mochite...
[gecko.git] / netwerk / socket / nsINamedPipeService.idl
blob9db557577d1add9178fb01dd5515dce20a94393d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
7 #include "nsrootidl.idl"
9 /**
10 * nsINamedPipeDataObserver
12 * This is the callback interface for nsINamedPipeService.
13 * The functions are called by the internal thread in the nsINamedPipeService.
15 [scriptable, uuid(de4f460b-94fd-442c-9002-1637beb2185a)]
16 interface nsINamedPipeDataObserver : nsISupports
18 /**
19 * onDataAvailable
21 * @param aBytesTransferred
22 * Transfered bytes during last transmission.
23 * @param aOverlapped
24 * Corresponding overlapped structure used by the async I/O
26 void onDataAvailable(in unsigned long aBytesTransferred,
27 in voidPtr aOverlapped);
29 /**
30 * onError
32 * @param aError
33 * Error code of the error.
34 * @param aOverlapped
35 * Corresponding overlapped structure used by the async I/O
37 void onError(in unsigned long aError,
38 in voidPtr aOverlapped);
41 /**
42 * nsINamedPipeService
44 [scriptable, uuid(1bf19133-5625-4ac8-836a-80b1c215f72b)]
45 interface nsINamedPipeService : nsISupports
47 /**
48 * addDataObserver
50 * @param aHandle
51 * The handle that is going to be monitored for read/write operations.
52 * Only handles that are opened with overlapped IO are supported.
53 * @param aObserver
54 * The observer of the handle, the service strong-refs of the observer.
56 void addDataObserver(in voidPtr aHandle,
57 in nsINamedPipeDataObserver aObserver);
59 /**
60 * removeDataObserver
62 * @param aHandle
63 The handle associated to the observer, and will be closed by the
64 service.
65 * @param aObserver
66 * The observer to be removed.
68 void removeDataObserver(in voidPtr aHandle,
69 in nsINamedPipeDataObserver aObserver);
71 /**
72 * isOnCurrentThread
74 * @return the caller runs within the internal thread.
76 boolean isOnCurrentThread();