Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 3 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #include "nsISupports.idl" |
michael@0 | 6 | #include "nsIVolume.idl" |
michael@0 | 7 | #include "nsIVolumeMountLock.idl" |
michael@0 | 8 | |
michael@0 | 9 | %{C++ |
michael@0 | 10 | #include "nsTArray.h" |
michael@0 | 11 | #include "nsString.h" |
michael@0 | 12 | %} |
michael@0 | 13 | [ref] native nsStringTArrayRef(nsTArray<nsString>); |
michael@0 | 14 | |
michael@0 | 15 | [scriptable, uuid(a3b110cd-74f2-43cb-84c6-2a87713f2774)] |
michael@0 | 16 | interface nsIVolumeService : nsISupports |
michael@0 | 17 | { |
michael@0 | 18 | nsIVolume getVolumeByName(in DOMString volName); |
michael@0 | 19 | nsIVolume getVolumeByPath(in DOMString path); |
michael@0 | 20 | nsIVolume createOrGetVolumeByPath(in DOMString path); |
michael@0 | 21 | |
michael@0 | 22 | void BroadcastVolume(in DOMString volName); |
michael@0 | 23 | |
michael@0 | 24 | nsIVolumeMountLock createMountLock(in DOMString volName); |
michael@0 | 25 | |
michael@0 | 26 | [noscript] void getVolumeNames(in nsStringTArrayRef aVolNames); |
michael@0 | 27 | |
michael@0 | 28 | /* for test case only to simulate sdcard insertion/removal */ |
michael@0 | 29 | void createFakeVolume(in DOMString name, in DOMString path); |
michael@0 | 30 | void SetFakeVolumeState(in DOMString name, in long state); |
michael@0 | 31 | }; |
michael@0 | 32 | |
michael@0 | 33 | %{C++ |
michael@0 | 34 | #define NS_VOLUMESERVICE_CID \ |
michael@0 | 35 | {0x7c179fb7, 0x67a0, 0x43a3, {0x93, 0x37, 0x29, 0x4e, 0x03, 0x60, 0xb8, 0x58}} |
michael@0 | 36 | #define NS_VOLUMESERVICE_CONTRACTID "@mozilla.org/telephony/volume-service;1" |
michael@0 | 37 | %} |