Skip to end of metadata
Go to start of metadata

FB::scoped_zonelock Class Reference

Provides a helper class for locking. More...

#include <JSAPI.h>

Collaboration diagram for FB::scoped_zonelock:
Collaboration graph

List of all members.

Public Member Functions

 scoped_zonelock (const JSAPIPtr &api, const SecurityZone &zone)
 Accepts a FB::JSAPIPtr and pushes the specified security zone to be used until this object goes out of scope.
 scoped_zonelock (JSAPI *api, const SecurityZone &zone)
 ~scoped_zonelock ()
 Unlocks/pops the zone.

Detailed Description

Provides a helper class for locking.

This class will call pushZone on the provided JSAPI object when instantiated and popZone when it goes out of scope.

      // In the constructor
      // Register protected members
      {
          FB::scoped_zonelock _l(this, SecurityScope_Protected);
          registerMethod("start", make_method(this, &MyPluginAPI::start));
      } // Zone automatically popped off
      // Register private members
      {
          FB::scoped_zonelock _l(this, SecurityScope_Protected);
          registerMethod("getDirectoryListing", make_method(this, &MyPluginAPI::getDirectoryListing));
      } // Zone automatically popped off
Since:
1.4a3
See also:
FB::JSAPI::pushZone
FB::JSAPI::popZone

Definition at line 548 of file JSAPI.h.


The documentation for this class was generated from the following file:

Generated on 20 May 2013 for FireBreath by  doxygen 1.6.1
Labels
  • None