|
|
Songbird Wiki > Developer Center > Articles > Style Manual > IDL File Creation
IDL File CreationFrom $1Table of contents
All interface definition files should contain the following elements:
See an example. Forward DeclarationsAll interfaces except the base interface should be forward-declared. This will speed up compilation. See the example. Interface Definition
Example/* // // BEGIN SONGBIRD GPL // // This file is part of the Songbird web player. // // Copyright(c) 2006 POTI, Inc. // http://songbirdnest.com // // This file may be licensed under the terms of of the // GNU General Public License Version 2 (the "GPL"). // // Software distributed under the License is distributed // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either // express or implied. See the GPL for the specific language // governing rights and limitations. // // You should have received a copy of the GPL along with this // program. If not, go to http://www.gnu.org/licenses/gpl.html // or write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // END SONGBIRD GPL // */ #include "nsISupports.idl" interface nsIObserver; interface nsIURI; /** * \interface sbISample * * \brief This is a sample interface. */ [scriptable, uuid(fc646e86-0974-4f51-ad8c-d5568fcf73e0)] interface sbISample : nsISupports { /** * \brief Returns the object's URI * * \throws NS_ERROR_NOT_INITIALIZED if the object isn't initialized */ readonly attribute nsIURI uri; /** * \brief Finds an nsIObserver for a type and index. * * \param aType - the type to find * \param aIndex - an index * * \throws NS_ERROR_NOT_AVAILABLE if not available * * \return an nsIObserver */ nsIObserver getObserverForType(in AString aType, in PRInt32 aIndex); };
Tags:
|
Powered by MindTouch Deki Wiki |