Diff for /chimera/BookmarksService.h between versions 1.2 and 1.7

version 1.2, 2002/02/09 01:24:11 version 1.7, 2002/02/10 00:29:08
Line 11 Line 11
 #include <Carbon/Carbon.h>  #include <Carbon/Carbon.h>
 #include "nsCOMPtr.h"  #include "nsCOMPtr.h"
 #include "nsIDocument.h"  #include "nsIDocument.h"
   #include "nsIDocumentObserver.h"
   #include "nsVoidArray.h"
   #import "MainController.h"
   
 class nsIDocumentObserver;  
 class BookmarksService;  class BookmarksService;
 class nsIAtom;  class nsIAtom;
   
Line 27  class nsIAtom; Line 29  class nsIAtom;
   
 -(id) init;  -(id) init;
 -(void) dealloc;  -(void) dealloc;
   -(void) windowClosing;
   
 -(void) ensureBookmarks;  -(void) ensureBookmarks;
   
Line 40  class nsIAtom; Line 43  class nsIAtom;
 - (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item;  - (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item;
 - (void)outlineView:(NSOutlineView *)outlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item;  - (void)outlineView:(NSOutlineView *)outlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item;
   
   - (void)reloadDataForItem:(id)item reloadChildren: (BOOL)aReloadChildren;
   
 @end  @end
   
 @interface BookmarkItem : NSObject  @interface BookmarkItem : NSObject
Line 49  class nsIAtom; Line 54  class nsIAtom;
   
 -(nsIContent*)contentNode;  -(nsIContent*)contentNode;
 -(void)setContentNode: (nsIContent*)aContentNode;  -(void)setContentNode: (nsIContent*)aContentNode;
   - (id)copyWithZone:(NSZone *)aZone;
 @end  @end
   
 class BookmarksService  class BookmarksService
 {  {
 public:  public:
    BookmarksService();    BookmarksService(BookmarksDataSource* aDataSource);
    ~BookmarksService();    virtual ~BookmarksService();
           
    static BookmarksService* AddObserver(nsIDocumentObserver* aObserver);    void AddObserver();
    static void RemoveObserver(nsIDocumentObserver* aObserver);    void RemoveObserver();
 
     void NotifyObserver(nsIContent* aContainer, PRBool aReloadChildren);
     static void NotifyObservers(nsIContent* aContainer, PRBool aReloadChildren);
 
 public:
     static void GetRootContent(nsIContent** aResult);
     static BookmarkItem* GetWrapperFor(nsIContent* aItem);
     static void FlushBookmarks();
           
    void GetRootContent(nsIContent** aResult);    static void ConstructBookmarksMenu(NSMenu* aMenu, nsIContent* aContent);
    BookmarkItem* GetWrapperFor(nsIContent* aItem);    static void OpenMenuBookmark(BrowserWindowController* aController, id aMenuItem);
           
 private:  private:
    // Global counter and pointer to our singleton.    // Global counter and pointers to our singletons.
     static PRUint32 gRefCnt;      static PRUint32 gRefCnt;
    static BookmarksService* gSingleton;    
    // A dictionary that maps from content IDs (which uniquely identify content nodes)
     // to Obj-C bookmarkItem objects.  These objects are handed back to UI elements like
     // the outline view.
     static NSMutableDictionary* gDictionary;
         
 public:  public:
       static MainController* gMainController;
     static nsIAtom* gFolderAtom;      static nsIAtom* gFolderAtom;
     static nsIAtom* gNameAtom;      static nsIAtom* gNameAtom;
     static nsIAtom* gHrefAtom;      static nsIAtom* gHrefAtom;
     static nsIAtom* gBookmarkAtom;      static nsIAtom* gBookmarkAtom;
    static nsIDocument* gBookmarks;
private: // Singleton members.    static nsVoidArray* gInstances;
    nsCOMPtr<nsIDocument> mBookmarks;        
    NSMutableDictionary* mDictionary;private:
     BookmarksDataSource* mDataSource;
 };  };

Removed from v.1.2  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>