1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/system/gonk/nsIVolumeService.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,37 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include "nsISupports.idl" 1.9 +#include "nsIVolume.idl" 1.10 +#include "nsIVolumeMountLock.idl" 1.11 + 1.12 +%{C++ 1.13 +#include "nsTArray.h" 1.14 +#include "nsString.h" 1.15 +%} 1.16 +[ref] native nsStringTArrayRef(nsTArray<nsString>); 1.17 + 1.18 +[scriptable, uuid(a3b110cd-74f2-43cb-84c6-2a87713f2774)] 1.19 +interface nsIVolumeService : nsISupports 1.20 +{ 1.21 + nsIVolume getVolumeByName(in DOMString volName); 1.22 + nsIVolume getVolumeByPath(in DOMString path); 1.23 + nsIVolume createOrGetVolumeByPath(in DOMString path); 1.24 + 1.25 + void BroadcastVolume(in DOMString volName); 1.26 + 1.27 + nsIVolumeMountLock createMountLock(in DOMString volName); 1.28 + 1.29 + [noscript] void getVolumeNames(in nsStringTArrayRef aVolNames); 1.30 + 1.31 + /* for test case only to simulate sdcard insertion/removal */ 1.32 + void createFakeVolume(in DOMString name, in DOMString path); 1.33 + void SetFakeVolumeState(in DOMString name, in long state); 1.34 +}; 1.35 + 1.36 +%{C++ 1.37 +#define NS_VOLUMESERVICE_CID \ 1.38 + {0x7c179fb7, 0x67a0, 0x43a3, {0x93, 0x37, 0x29, 0x4e, 0x03, 0x60, 0xb8, 0x58}} 1.39 +#define NS_VOLUMESERVICE_CONTRACTID "@mozilla.org/telephony/volume-service;1" 1.40 +%}