Module: wine
Branch: master
Commit: ffbefc6e04f61629ba2ba4725af871d6dafd9395
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ffbefc6e04f61629ba2ba4725…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com>
Date: Tue Nov 10 09:16:33 2009 +0100
include: Add audiosessiontypes header.
---
include/Makefile.in | 1 +
include/audiosessiontypes.h | 48 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/include/Makefile.in b/include/Makefile.in
index 83e4358..f8c2b3d 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -106,6 +106,7 @@ SRCDIR_INCLUDES = \
af_irda.h \
appmgmt.h \
audevcod.h \
+ audiosessiontypes.h \
aviriff.h \
axcore.idl \
axextend.idl \
diff --git a/include/audiosessiontypes.h b/include/audiosessiontypes.h
new file mode 100644
index 0000000..b9435f1
--- /dev/null
+++ b/include/audiosessiontypes.h
@@ -0,0 +1,48 @@
+
+/*
+ * Core Audio audio session types definitions
+ *
+ * Copyright 2009 Maarten Lankhorst
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ *
+ */
+
+#ifndef __AUDIOSESSIONTYPES__
+#define __AUDIOSESSIONTYPES__
+
+typedef enum _AUDCLNT_SHAREMODE
+{
+ AUDCLNT_SHAREMODE_SHARED,
+ AUDCLNT_SHAREMODE_EXCLUSIVE,
+} AUDCLNT_SHAREMODE;
+
+#define AUDCLNT_STREAMFLAGS_CROSSPROCESS 0x00010000
+#define AUDCLNT_STREAMFLAGS_LOOPBACK 0x00020000
+#define AUDCLNT_STREAMFLAGS_EVENTCALLBACK 0x00040000
+#define AUDCLNT_STREAMFLAGS_NOPERSIST 0x00080000
+#define AUDCLNT_STREAMFLAGS_RATEADJUST 0x00100000
+#define AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED 0x10000000
+#define AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE 0x20000000
+#define AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED 0x40000000
+
+typedef enum _AudioSessionState
+{
+ AudioSessionStateInactive = 0,
+ AudioSessionStateActive,
+ AudioSessionStateExpired,
+} AudioSessionState;
+
+#endif
Module: wine
Branch: master
Commit: 87ed7d9b8b3c73a42e5583372975805089b6c070
URL: http://source.winehq.org/git/wine.git/?a=commit;h=87ed7d9b8b3c73a42e5583372…
Author: Vincent Povirk <vincent(a)codeweavers.com>
Date: Mon Nov 2 12:48:02 2009 -0600
ole32: Simplify RenameElement by using the same entry in the file.
---
dlls/ole32/storage32.c | 86 +++++------------------------------------------
1 files changed, 10 insertions(+), 76 deletions(-)
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 1a4ac90..e5b0717 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -686,10 +686,6 @@ end:
* This method will rename the specified element.
*
* See Windows documentation for more details on IStorage methods.
- *
- * Implementation notes: The method used to rename consists of creating a clone
- * of the deleted StgProperty object setting it with the new name and to
- * perform a DestroyElement of the old StgProperty.
*/
static HRESULT WINAPI StorageBaseImpl_RenameElement(
IStorage* iface,
@@ -726,81 +722,19 @@ static HRESULT WINAPI StorageBaseImpl_RenameElement(
if (foundPropertyIndex != PROPERTY_NULL)
{
- StgProperty renamedProperty;
- ULONG renamedPropertyIndex;
-
- /*
- * Setup a new property for the renamed property
- */
- renamedProperty.sizeOfNameString =
- ( lstrlenW(pwcsNewName)+1 ) * sizeof(WCHAR);
-
- if (renamedProperty.sizeOfNameString > PROPERTY_NAME_BUFFER_LEN)
- return STG_E_INVALIDNAME;
-
- strcpyW(renamedProperty.name, pwcsNewName);
-
- renamedProperty.propertyType = currentProperty.propertyType;
- renamedProperty.startingBlock = currentProperty.startingBlock;
- renamedProperty.size.u.LowPart = currentProperty.size.u.LowPart;
- renamedProperty.size.u.HighPart = currentProperty.size.u.HighPart;
-
- renamedProperty.leftChild = PROPERTY_NULL;
- renamedProperty.rightChild = PROPERTY_NULL;
-
- /*
- * Bring the dirProperty link in case it is a storage and in which
- * case the renamed storage elements don't require to be reorganized.
- */
- renamedProperty.dirProperty = currentProperty.dirProperty;
-
- /* call CoFileTime to get the current time
- renamedProperty.ctime
- renamedProperty.mtime
- renamedProperty.propertyUniqueID
- */
+ /* Remove the element from its current position in the tree */
+ removeFromTree(This->ancestorStorage, This->rootPropertySetIndex,
+ foundPropertyIndex);
- /*
- * Save the new property into a new property spot
- */
- createDirEntry(This->ancestorStorage, &renamedProperty, &renamedPropertyIndex);
+ /* Change the name of the element */
+ strcpyW(currentProperty.name, pwcsNewName);
- /*
- * Find a spot in the property chain for our newly created property.
- */
- insertIntoTree(
- This->ancestorStorage,
- This->rootPropertySetIndex,
- renamedPropertyIndex);
-
- /*
- * At this point the renamed property has been inserted in the tree,
- * now, before Destroying the old property we must zero its dirProperty
- * otherwise the DestroyProperty below will zap it all and we do not want
- * this to happen.
- * Also, we fake that the old property is a storage so the DestroyProperty
- * will not do a SetSize(0) on the stream data.
- *
- * This means that we need to tweak the StgProperty if it is a stream or a
- * non empty storage.
- */
- StorageImpl_ReadProperty(This->ancestorStorage,
- foundPropertyIndex,
- ¤tProperty);
-
- currentProperty.dirProperty = PROPERTY_NULL;
- currentProperty.propertyType = PROPTYPE_STORAGE;
- StorageImpl_WriteProperty(
- This->ancestorStorage,
- foundPropertyIndex,
- ¤tProperty);
-
- /*
- * Invoke Destroy to get rid of the ole property and automatically redo
- * the linking of its previous and next members...
- */
- IStorage_DestroyElement(iface, pwcsOldName);
+ StorageImpl_WriteProperty(This->ancestorStorage, foundPropertyIndex,
+ ¤tProperty);
+ /* Insert the element in a new position in the tree */
+ insertIntoTree(This->ancestorStorage, This->rootPropertySetIndex,
+ foundPropertyIndex);
}
else
{