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
|
|
|
|
2013-04-02 12:52:17 -07:00
|
|
|
%{C++
|
|
|
|
#include "nsTArray.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
%}
|
|
|
|
[ref] native nsStringTArrayRef(nsTArray<nsString>);
|
|
|
|
|
2013-07-08 23:37:47 -07:00
|
|
|
[scriptable, uuid(a3b110cd-74f2-43cb-84c6-2a87713f2774)]
|
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
|
|
|
|
|
|
|
void BroadcastVolume(in DOMString volName);
|
|
|
|
|
|
|
|
nsIVolumeMountLock createMountLock(in DOMString volName);
|
2013-04-02 12:52:17 -07:00
|
|
|
|
|
|
|
[noscript] void getVolumeNames(in nsStringTArrayRef aVolNames);
|
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"
|
|
|
|
%}
|