michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: #include "nsIVolume.idl" michael@0: #include "nsIVolumeMountLock.idl" michael@0: michael@0: %{C++ michael@0: #include "nsTArray.h" michael@0: #include "nsString.h" michael@0: %} michael@0: [ref] native nsStringTArrayRef(nsTArray); michael@0: michael@0: [scriptable, uuid(a3b110cd-74f2-43cb-84c6-2a87713f2774)] michael@0: interface nsIVolumeService : nsISupports michael@0: { michael@0: nsIVolume getVolumeByName(in DOMString volName); michael@0: nsIVolume getVolumeByPath(in DOMString path); michael@0: nsIVolume createOrGetVolumeByPath(in DOMString path); michael@0: michael@0: void BroadcastVolume(in DOMString volName); michael@0: michael@0: nsIVolumeMountLock createMountLock(in DOMString volName); michael@0: michael@0: [noscript] void getVolumeNames(in nsStringTArrayRef aVolNames); michael@0: michael@0: /* for test case only to simulate sdcard insertion/removal */ michael@0: void createFakeVolume(in DOMString name, in DOMString path); michael@0: void SetFakeVolumeState(in DOMString name, in long state); michael@0: }; michael@0: michael@0: %{C++ michael@0: #define NS_VOLUMESERVICE_CID \ michael@0: {0x7c179fb7, 0x67a0, 0x43a3, {0x93, 0x37, 0x29, 0x4e, 0x03, 0x60, 0xb8, 0x58}} michael@0: #define NS_VOLUMESERVICE_CONTRACTID "@mozilla.org/telephony/volume-service;1" michael@0: %}