User:Poona/reading understanding prerequisite/interfaces: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:




'''--'''  Interfaces are basically used to define the interfaces of a xpcom
'''--'''  Interfaces are basically used to define the interfaces of a xpcom  component in a language independent fashion.  They use IDL(Interface  Description Language) to define the interfaces, which can then be implemented by a component.
  component in a language independent fashion.  They use IDL(Interface  
  Description Language) to define the interfaces, which can then be
implemented by a component.


'''--'''  Interfaces are defined in an *.idl file.
'''--'''  Interfaces are defined in an *.idl file.


'''--'''  The UUID(Unique Identfier) for an interface is stored in xpti.dat file
'''--'''  The UUID(Unique Identfier) for an interface is stored in xpti.dat file in the user's profile directory.
  in the user's profile directory.


'''--'''  When a profile is created, the xpti.dat file is updated with all the
'''--'''  When a profile is created, the xpti.dat file is updated with all the    interface names along with their IIDs from *.xpt file of each of the *.idl       files.  These *.xpt files are basically CROSS PLATFORM TYPE files.  These *.xpt files are used to describe an interface which has been defined in an *.idl file.  A single *.xpt file can either be created for each interface defined in a *.idl file or only one *.xpt file can be created to describe all he interfaces defined in an *.idl file.  It depends on xpt_link which can combine multiple files into one.
   interface names along with their IIDs from *.xpt file of each of the *.idl  
    files.  These *.xpt files are basically CROSS PLATFORM TYPE files.  These  
    *.xpt files are used to describe an interface which has been defined in an  
    *.idl file.  A single *.xpt file can either be created for each interface  
    defined in a *.idl file or only one *.xpt file can be created to describe  
    all he interfaces defined in an *.idl file.  It depends on xpt_link which  
    can combine multiple files into one.


'''--'''  This is how the xpti.dat is generated ::  
'''--'''  This is how the xpti.dat is generated ::  
Line 41: Line 30:




'''--'''  One thing that I want to specify from my discussion at the top incase  
'''--'''  One thing that I want to specify from my discussion at the top incase    you have failed to notice is that, the xpti.dat file holds all the details    about interfaces along with the interfaces' IID.
     you have failed to notice is that, the xpti.dat file holds all the details  
     about interfaces along with the interfaces' IID.

Latest revision as of 11:56, 19 May 2008

A couple of things that would briefly give you some information on Interfaces


-- Interfaces are basically used to define the interfaces of a xpcom component in a language independent fashion. They use IDL(Interface Description Language) to define the interfaces, which can then be implemented by a component.

-- Interfaces are defined in an *.idl file.

-- The UUID(Unique Identfier) for an interface is stored in xpti.dat file in the user's profile directory.

-- When a profile is created, the xpti.dat file is updated with all the interface names along with their IIDs from *.xpt file of each of the *.idl files. These *.xpt files are basically CROSS PLATFORM TYPE files. These *.xpt files are used to describe an interface which has been defined in an *.idl file. A single *.xpt file can either be created for each interface defined in a *.idl file or only one *.xpt file can be created to describe all he interfaces defined in an *.idl file. It depends on xpt_link which can combine multiple files into one.

-- This is how the xpti.dat is generated ::

   1.  Assume you have created a brand new extension.
   2.  While creating this extension you have created a brand new custom   
       interface which you have defined in this file nsIExample.idl.  The 
       interface that you defined in nsIExample.idl then can be implemented by 
       your xpcom component that your extension needs.
   3.  As specified above you define interfaces in a *.idl file.
   4.  Then you generate the *.xpt file for the interfaces defined in the 
       nsiExample.idl file using a tool called xpidl.  You can either generate 
       one *.xpt file for each interface in *.idl file or you can have one 
       *.xpt file for all the interfaces defined in the *.idl file.
   5.  The tool specified at the top, i.e. xpidl are used generated the *.xpt 
       file for the *.idl files.  They describe interfaces.  The *.xpt can also 
       be used to represent a lot of other data.
   6.  Then when the extension is installed, the extension manager(the 
       extension installer) picks details about all the interface details from 
       all the *.xpt files and updated the xpti.dat file with all the interface
       details along with the interfaces' IIDs.


-- One thing that I want to specify from my discussion at the top incase you have failed to notice is that, the xpti.dat file holds all the details about interfaces along with the interfaces' IID.