nsresult CPluginStreamPeer::QueryInterface(const nsIID& iid, void** ptr) { if (NULL == ptr) { return NS_ERROR_NULL_POINTER; } if (iid.Equals(kISeekablePluginStreamPeerIID))  { *ptr = (void*) ((nsISeekablePluginStreamPeer*)this); AddRef(); return NS_OK; } else if (iid.Equals(kIPluginStreamPeerIID) || iid.Equals(nsISupports::GetIID())) { *ptr = (void*) ((nsIPluginStreamPeer*)this); AddRef(); return NS_OK; } return NS_NOINTERFACE;
CPluginManager::QueryInterface(const nsIID& iid, void** ptr) { if (NULL == ptr) { return NS_ERROR_NULL_POINTER; }  if (iid.Equals(NS_GET_IID(nsIServiceManager))) { *ptr = (void*) (nsIServiceManager*)this; AddRef(); return NS_OK; } if (iid.Equals(NS_GET_IID(nsIAllocator))) { *ptr = (void*) (nsIAllocator*)this; AddRef(); return NS_OK; } if (iid.Equals(NS_GET_IID(nsIPluginManager)) || iid.Equals(NS_GET_IID(nsISupports))) { *ptr = (void*) ((nsIPluginManager*)this); AddRef(); return NS_OK; } return NS_NOINTERFACE;
nsresult CPluginStreamPeer::QueryInterface(const nsIID& iid, void** ptr) {    if (NULL == ptr) {        return NS_ERROR_NULL_POINTER;     }     if (iid.Equals(kISeekablePluginStreamPeerIID))  {        *ptr = (void*) ((nsISeekablePluginStreamPeer*)this);         AddRef();         return NS_OK; 	} else if (iid.Equals(kIPluginStreamPeerIID) ||			   iid.Equals(nsISupports::GetIID())) {        *ptr = (void*) ((nsIPluginStreamPeer*)this);         AddRef();         return NS_OK;     }     return NS_NOINTERFACE; } 