]> git.sesse.net Git - vlc/blobdiff - activex/objectsafety.cpp
Removes trailing spaces. Removes tabs.
[vlc] / activex / objectsafety.cpp
index 0cfc678b6645537fcd700c408c772af90cc3412e..3806d36ca2763ccfb993203891d81bd29e64b441 100644 (file)
@@ -1,92 +1,94 @@
-/*****************************************************************************\r
- * objectsafety.cpp: ActiveX control for VLC\r
- *****************************************************************************\r
- * Copyright (C) 2005 VideoLAN\r
- *\r
- * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>\r
- *\r
- * This program is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 2 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program; if not, write to the Free Software\r
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.\r
- *****************************************************************************/\r
-\r
-#include "plugin.h"\r
-#include "objectsafety.h"\r
-\r
-#include "axvlc_idl.h"\r
-\r
-#if 0\r
-const GUID IID_IObjectSafety = \r
-    {0xCB5BDC81,0x93C1,0x11cf,{0x8F,0x20,0x00,0x80,0x5F,0x2C,0xD0,0x64}}; \r
-#endif\r
-\r
-STDMETHODIMP VLCObjectSafety::GetInterfaceSafetyOptions(      \r
-    REFIID riid,\r
-    DWORD *pdwSupportedOptions,\r
-    DWORD *pdwEnabledOptions\r
-)\r
-{\r
-    if( (NULL == pdwSupportedOptions) || (NULL == pdwEnabledOptions) )\r
-        return E_POINTER;\r
-\r
-    *pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACESAFE_FOR_UNTRUSTED_CALLER;\r
-\r
-    if( (IID_IDispatch == riid)\r
-     || (IID_IVLCControl == riid) )\r
-    {\r
-        *pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_CALLER;\r
-        return NOERROR;\r
-    }\r
-    else if( (IID_IPersist == riid)\r
-          || (IID_IPersistStreamInit == riid)\r
-          || (IID_IPersistStorage == riid)\r
-          || (IID_IPersistPropertyBag == riid) )\r
-    {\r
-        *pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA;\r
-        return NOERROR;\r
-    }\r
-    *pdwEnabledOptions = 0;\r
-    return E_NOINTERFACE;\r
-};\r
-\r
-STDMETHODIMP VLCObjectSafety::SetInterfaceSafetyOptions(      \r
-    REFIID riid,\r
-    DWORD dwOptionSetMask,\r
-    DWORD dwEnabledOptions\r
-)\r
-{\r
-    if( (IID_IDispatch == riid)\r
-     || (IID_IVLCControl == riid) )\r
-    {\r
-        if( (INTERFACESAFE_FOR_UNTRUSTED_CALLER == dwOptionSetMask)\r
-         && (INTERFACESAFE_FOR_UNTRUSTED_CALLER == dwEnabledOptions) )\r
-        {\r
-            return NOERROR;\r
-        }\r
-        return E_FAIL;\r
-    }\r
-    else if( (IID_IPersist == riid)\r
-          || (IID_IPersistStreamInit == riid)\r
-          || (IID_IPersistStorage == riid)\r
-          || (IID_IPersistPropertyBag == riid) )\r
-    {\r
-        if( (INTERFACESAFE_FOR_UNTRUSTED_DATA == dwOptionSetMask)\r
-         && (INTERFACESAFE_FOR_UNTRUSTED_DATA == dwEnabledOptions) )\r
-        {\r
-            return NOERROR;\r
-        }\r
-        return E_FAIL;\r
-    }\r
-    return E_FAIL;\r
-};\r
-\r
+/*****************************************************************************
+ * objectsafety.cpp: ActiveX control for VLC
+ *****************************************************************************
+ * Copyright (C) 2005 the VideoLAN team
+ *
+ * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#include "plugin.h"
+#include "objectsafety.h"
+
+#include "axvlc_idl.h"
+
+#if 0
+const GUID IID_IObjectSafety =
+    {0xCB5BDC81,0x93C1,0x11cf,{0x8F,0x20,0x00,0x80,0x5F,0x2C,0xD0,0x64}};
+#endif
+
+using namespace std;
+
+STDMETHODIMP VLCObjectSafety::GetInterfaceSafetyOptions(
+    REFIID riid,
+    DWORD *pdwSupportedOptions,
+    DWORD *pdwEnabledOptions
+)
+{
+    if( (NULL == pdwSupportedOptions) || (NULL == pdwEnabledOptions) )
+        return E_POINTER;
+
+    *pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACESAFE_FOR_UNTRUSTED_CALLER;
+
+    if( (IID_IDispatch == riid)
+     || (IID_IVLCControl == riid) )
+    {
+        *pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_CALLER;
+        return NOERROR;
+    }
+    else if( (IID_IPersist == riid)
+          || (IID_IPersistStreamInit == riid)
+          || (IID_IPersistStorage == riid)
+          || (IID_IPersistPropertyBag == riid) )
+    {
+        *pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA;
+        return NOERROR;
+    }
+    *pdwEnabledOptions = 0;
+    return E_NOINTERFACE;
+};
+
+STDMETHODIMP VLCObjectSafety::SetInterfaceSafetyOptions(
+    REFIID riid,
+    DWORD dwOptionSetMask,
+    DWORD dwEnabledOptions
+)
+{
+    if( (IID_IDispatch == riid)
+     || (IID_IVLCControl == riid) )
+    {
+        if( (INTERFACESAFE_FOR_UNTRUSTED_CALLER == dwOptionSetMask)
+         && (INTERFACESAFE_FOR_UNTRUSTED_CALLER == dwEnabledOptions) )
+        {
+            return NOERROR;
+        }
+        return E_FAIL;
+    }
+    else if( (IID_IPersist == riid)
+          || (IID_IPersistStreamInit == riid)
+          || (IID_IPersistStorage == riid)
+          || (IID_IPersistPropertyBag == riid) )
+    {
+        if( (INTERFACESAFE_FOR_UNTRUSTED_DATA == dwOptionSetMask)
+         && (INTERFACESAFE_FOR_UNTRUSTED_DATA == dwEnabledOptions) )
+        {
+            return NOERROR;
+        }
+        return E_FAIL;
+    }
+    return E_FAIL;
+};
+