Here are the files need to register besides the WebLock.cpp. I couldn't find anything wrong with it.

Adele
        CXX   = c++ 

        CPPFLAGS +=      \
         -fno-rtti       \
         -fno-exceptions \
         -shared         
# Change this to point at your Gecko SDK directory. 
        GECKO_SDK_PATH = /home/adele/gecko-sdk
# GCC only define which allows us to not have to #include mozilla-config 
# in every .cpp file.  If your not using GCC remove this line and add 
# #include "mozilla-config.h" to each of your .cpp files. 
        GECKO_CONFIG_INCLUDE = -include mozilla-config.h 
 
        GECKO_DEFINES  = -DXPCOM_GLUE -DMOZILLA_STRICT_API 

        GECKO_INCLUDES = -I $(GECKO_SDK_PATH)                    \
        -I $(GECKO_SDK_PATH)/xpcom/include      \
        -I $(GECKO_SDK_PATH)/nspr/include       \
        -I $(GECKO_SDK_PATH)/string/include     \
        -I $(GECKO_SDK_PATH)/embedstring/include \
        -I $(GECKO_SDK_PATH)/unfrozen           \
        -I $(GECKO_SDK_PATH)/necko/include      \
        -I .

        GECKO_LDFLAGS =                            \
        -L $(GECKO_SDK_PATH)/xpcom/bin -lxpcomglue \
        -L $(GECKO_SDK_PATH)/nspr/bin -lnspr4      \
        -L $(GECKO_SDK_PATH)/nspr/bin -lplds4      \
        -L $(GECKO_SDK_PATH)/embedstring/bin/ -lembedstring 
 
build: 
        $(CXX) -o WebLock.so $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) 
$(GECKO_INCLUDES) $(GECKO_LDFLAGS) $(CPPFLAGS) $(CXXFLAGS) WebLock.cpp 
        chmod +x WebLock.so
 
clean: 
        rm WebLock.so

Attachment: WebLock.so
Description: Binary data

#include "nsISupports.idl" 
interface nsISimpleEnumerator; 
[scriptable, uuid(ea54eee4-9548-4b63-b94d-c519ffc91d09)] 
interface iWeblock : nsISupports 
{ 
  void lock(); 
  void unlock(); 
   
  // assume strings are UTF-8 
  void addSite(in string url); 
  void removeSite(in string url); 
  attribute nsISimpleEnumerator sites; 
}; 

Attachment: weblock.xpt
Description: application/vnd.mozilla.guess-from-ext

Reply via email to