gecko-dev/java/webclient/src_moz/wsRDFObserver.cpp
edburns%acm.org 11b7203f8f r=edburns
Author: Ron Capelli

These changes make webclient run with Mozilla 1.4.

Summary of changes:

  src_moz/rdf_util.cpp

    reason:  API change to RDFServiceImpl::GetResource()

  src_moz/RDFActionEvents.cpp

    reason:  API change to RDFServiceImpl::GetUnicodeResource()

  src_moz/wsRDFObserver.cpp

    reason:  member name changes to inherited nsIRDFObserver

  src_moz/CBrowserContainer.cpp

    reasons:
      - replaced obsolete/deleted nsFileSpec.h with nsCRT.h
        (to access only required/referenced function)
      - added new SetBlurSuppression and GetBlurSuppression methods
        required by change to inherited nsIBaseWindow (implementation
        copied from mozilla/xpfe/appshell/src/nsXULWindow.cpp).

  src_moz/CBrowserContainer.h

    reason:  added mBlurSuppressionLevel member variable for
             SetBlurSuppression and GetBlurSuppression methods.


The changes were relatively straightforward to identify from errors
attempting to build with Mozilla 1.4.  Testing so far indicates no
new problems have been introduced...
2003-07-13 04:23:49 +00:00

113 lines
3.3 KiB
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
*
* Contributor(s): Ed Burns <edburns@acm.org>
*/
#include "wsRDFObserver.h"
#include "rdf_util.h"
#include "plstr.h" // for PL_strstr
///////////////////////////////////////////////////////////////////////////////
// nsISupports implementation
NS_IMPL_ADDREF(wsRDFObserver)
NS_IMPL_RELEASE(wsRDFObserver)
NS_INTERFACE_MAP_BEGIN(wsRDFObserver)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_ENTRY(nsIRDFObserver)
NS_INTERFACE_MAP_END
wsRDFObserver::wsRDFObserver()
{
NS_INIT_ISUPPORTS();
}
wsRDFObserver::~wsRDFObserver() {}
// nsIRDFObserver implementation
NS_IMETHODIMP wsRDFObserver::OnAssert(nsIRDFDataSource *aDataSource,
nsIRDFResource *aSource,
nsIRDFResource *aProperty,
nsIRDFNode *aTarget)
{
nsresult rv;
nsCOMPtr<nsIRDFResource> nodeResource;
PRBool isContainer;
nodeResource = do_QueryInterface(aTarget);
if (nodeResource) {
rv = gRDFCU->IsContainer(gBookmarksDataSource, nodeResource,
&isContainer);
if (isContainer) {
folder = nodeResource;
}
}
return NS_OK;
}
nsIRDFResource *wsRDFObserver::getFolder()
{
return folder;
}
NS_IMETHODIMP wsRDFObserver::OnUnassert(nsIRDFDataSource *aDataSource,
nsIRDFResource *aSource,
nsIRDFResource *aProperty,
nsIRDFNode *aTarget)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP wsRDFObserver::OnChange(nsIRDFDataSource *aDataSource,
nsIRDFResource *aSource,
nsIRDFResource *aProperty,
nsIRDFNode *aOldTarget,
nsIRDFNode *aNewTarget)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP wsRDFObserver::OnMove(nsIRDFDataSource *aDataSource,
nsIRDFResource *aOldSource,
nsIRDFResource *aNewSource,
nsIRDFResource *aProperty,
nsIRDFNode *aTarget)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP wsRDFObserver::OnBeginUpdateBatch(nsIRDFDataSource *aDataSource)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP wsRDFObserver::OnEndUpdateBatch(nsIRDFDataSource *aDataSource)
{
return NS_ERROR_NOT_IMPLEMENTED;
}