2012-07-16 09:38:18 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsIVolume.idl"
|
2012-12-14 16:01:34 -08:00
|
|
|
#include "nsIVolumeMountLock.idl"
|
2012-07-16 09:38:18 -07:00
|
|
|
|
2014-07-17 18:30:47 -07:00
|
|
|
interface nsIArray;
|
2013-04-02 12:52:17 -07:00
|
|
|
|
2014-09-15 11:51:25 -07:00
|
|
|
[scriptable, uuid(c31b182c-61a3-449c-bba8-fd45044499c2)]
|
2012-07-16 09:38:18 -07:00
|
|
|
interface nsIVolumeService : nsISupports
|
|
|
|
{
|
|
|
|
nsIVolume getVolumeByName(in DOMString volName);
|
|
|
|
nsIVolume getVolumeByPath(in DOMString path);
|
2013-04-18 07:13:23 -07:00
|
|
|
nsIVolume createOrGetVolumeByPath(in DOMString path);
|
2012-12-14 16:01:34 -08:00
|
|
|
|
|
|
|
nsIVolumeMountLock createMountLock(in DOMString volName);
|
2013-04-02 12:52:17 -07:00
|
|
|
|
2014-07-17 18:30:47 -07:00
|
|
|
nsIArray getVolumeNames();
|
2013-07-08 23:37:47 -07:00
|
|
|
|
|
|
|
/* for test case only to simulate sdcard insertion/removal */
|
|
|
|
void createFakeVolume(in DOMString name, in DOMString path);
|
|
|
|
void SetFakeVolumeState(in DOMString name, in long state);
|
2012-07-16 09:38:18 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
%{C++
|
|
|
|
#define NS_VOLUMESERVICE_CID \
|
2013-04-18 07:13:23 -07:00
|
|
|
{0x7c179fb7, 0x67a0, 0x43a3, {0x93, 0x37, 0x29, 0x4e, 0x03, 0x60, 0xb8, 0x58}}
|
2012-07-16 09:38:18 -07:00
|
|
|
#define NS_VOLUMESERVICE_CONTRACTID "@mozilla.org/telephony/volume-service;1"
|
|
|
|
%}
|