[
  {
    "namespace": "LegacyPrefs",
    "events": [
      {
        "name": "onChanged",
        "type": "function",
        "description": "Fired when a preference has been changed.",
        "parameters": [
          {
            "name": "name",
            "type": "string",
            "description": "Name of the preference."
          },
          {
            "name": "value",
            "type": "any",
            "description": "Value of the preference."
          }
        ],
        "extraParameters": [
          {
            "name": "branch",
            "description": "The branch to observe.",
            "type": "string"
          }
        ]
      }
    ],
    "functions": [
      {
        "name": "getUserPref",
        "type": "function",
        "async": true,
        "description": "Gets a user value from the legacy pref system.",
        "parameters": [
          {
            "name": "aName",
            "type": "string",
            "description": "Name of the preference."
          }
        ]
      },
      {
        "name": "getPref",
        "type": "function",
        "async": true,
        "description": "Gets a value from the legacy pref system.",
        "parameters": [
          {
            "name": "aName",
            "type": "string",
            "description": "Name of the preference."
          },
          {
            "name": "aFallback",
            "type": "any",
            "description": "Value to be returned, if the requested preference does not exist.",
            "optional": true,
            "default": null
          }
        ]
      },
      {
        "name": "createPref",
        "type": "function",
        "async": true,
        "description": "Creates a new entry in the legacy pref system.",
        "parameters": [
          {
            "name": "aName",
            "type": "string",
            "description": "Name of the preference."
          },
          {
            "name": "aValue",
            "choices": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "boolean"
              }
            ],
            "description": "Value to be set."
          }
        ]
      },
      {
        "name": "setPref",
        "type": "function",
        "async": true,
        "description": "Sets a value for an existing pref of the legacy pref system.",
        "parameters": [
          {
            "name": "aName",
            "type": "string",
            "description": "Name of the preference."
          },
          {
            "name": "aValue",
            "choices": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "boolean"
              }
            ],
            "description": "Value to be set."
          }
        ]
      },
      {
        "name": "setDefaultPref",
        "type": "function",
        "async": true,
        "description": "Defines the default value for pref of the legacy pref system. This defines the type of a pref and is needed for new prefs.",
        "parameters": [
          {
            "name": "aName",
            "type": "string",
            "description": "Name of the preference."
          },
          {
            "name": "aValue",
            "choices": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "boolean"
              }
            ],
            "description": "Default value to be set."
          }
        ]
      },
      {
        "name": "clearUserPref",
        "type": "function",
        "description": "Removes a user value from the legacy pref system.",
        "parameters": [
          {
            "name": "aName",
            "type": "string",
            "description": "Name of the preference."
          }
        ]
      }
    ]
  }
]