Table of Contents

Wwise SDK 2018.1.11
ISourceControlUtilities.h
Go to the documentation of this file.
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Version: <VERSION> Build: <BUILDNUMBER>
25  Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc.
26 *******************************************************************************/
27 
28 /// \file
29 /// Wwise source control plug-in utilities interface, used to create custom dialogs, display the progress dialog, and get
30 /// the registry path needed to save the plug-in configuration.
31 
32 #ifndef _AK_WWISE_ISOURCECONTROLUTILITIES_H
33 #define _AK_WWISE_ISOURCECONTROLUTILITIES_H
34 
36 
39 
40 // Audiokinetic namespace
41 namespace AK
42 {
43  // Audiokinetic Wwise namespace
44  namespace Wwise
45  {
46  /// Wwise source control utilities interface. This interface is provided when the plug-in is initialized.
47  /// With this interface, you can display a progress dialog, create custom dialogs, display message boxes, and
48  /// save the plug-in configuration to the registry.
50  {
51  public:
52  /// Get a pointer to an AK::Wwise::ISourceControlOperationProgress interface, so you can display a simple progress dialog for the operation.
53  /// \warning This function is not thread-safe.
54  /// \return A pointer to an AK::Wwise::ISourceControlOperationProgress interface.
56 
57  /// This function does the same thing as the standard \c MessageBox function, except that this one will
58  /// be displayed with the Wwise UI look and feel.
59  /// \warning This function is not thread-safe.
60  /// \return The window results of the dialog
61  virtual int MessageBox(
62  HWND in_hWnd, ///< The window handle of the dialog
63  LPCWSTR in_pszText, ///< The text to be displayed in the message box
64  LPCWSTR in_pszCaption, ///< The caption of the message box
65  UINT in_uiType ///< The window message box type (e.g. MB_OK)
66  ) = 0;
67 
68  /// This function show a dialog with a edit field and allow the user enter input string
69  /// \warning This function is not thread-safe.
70  /// \return The window results of the dialog: IDOK or IDCANCEL
71  virtual int PromptMessage(
72  HWND in_hWnd, ///< The window handle of the dialog
73  LPCWSTR in_pszText, ///< The text to be displayed in the message box
74  LPCWSTR in_pszCaption, ///< The caption of the message box
75  LPWSTR out_pszInput, ///< The buffer to receive the user input
76  UINT in_uiInputSize, ///< The size of the buffer to receive input
77  bool in_bIsPassword ///< True to hide text; used for passwords
78  ) = 0;
79 
80  /// Show a browse for folder dialog.
81  /// \warning This function is not thread-safe.
82  /// \return The resulting path is set in out_pszChoosenPath
83  /// \return True if user clicked OK, false if user clicked Cancel
84  virtual bool ShowBrowseForFolderDialog(
85  LPCWSTR in_pszDialogTitle, ///< The dialog title
86  LPWSTR out_pszChoosenPath, ///< The choosen path
87  UINT in_uiChoosenPathSize, ///< The size of the buffer to receive path (out_pszChoosenPath)
88  LPCWSTR in_pszRootPath = NULL ///< The root path for the browse for folder dialog
89  ) = 0;
90 
91  /// This function does the same thing as the CDialog::DoModal function.
92  /// \warning This function is not thread-safe.
93  /// \return The window results of the dialog (e.g. IDOK)
94  virtual INT_PTR CreateModalCustomDialog(
95  ISourceControlDialogBase* in_pDialog ///< A pointer to a dialog class that implements
96  ///< AK::Wwise::ISourceControlDialogBase functions.
97  ) = 0;
98 
99  /// Get the path to the registry for the current project. This path is to be used with
100  /// the HKEY_CURRENT_USER registry key.
101  /// \warning This function is not thread-safe.
102  /// \return A string containing the registry path.
103  virtual LPCWSTR GetRegistryPath() = 0;
104 
105  /// Set DWORD value in user preferences.
106  /// \warning This function is not thread-safe.
107  virtual void SetUserPreferenceDword(
108  LPCWSTR in_pszPreference, ///< Name of preference
109  DWORD in_dwValue ///< Value to set in user preferences.
110  ) = 0;
111 
112  /// Get DWORD value in user preferences.
113  /// \warning This function is not thread-safe.
114  virtual void GetUserPreferenceDword(
115  LPCWSTR in_pszPreference, ///< Name of preference
116  DWORD& io_dwValue ///< in: value to return if preference is not set; out: changed to user preference value if set
117  ) = 0;
118 
119  /// Set string value in user preferences.
120  /// \warning This function is not thread-safe.
121  virtual void SetUserPreferenceString(
122  LPCWSTR in_pszPreference, ///< Name of preference
123  LPCWSTR in_pszValue ///< Value to set in user preferences.
124  ) = 0;
125 
126  /// Get string value from user preferences.
127  /// \warning This function is not thread-safe.
128  virtual void GetUserPreferenceString(
129  LPCWSTR in_pszPreference, ///< Name of preference
130  LPWSTR io_pszValue, ///< in: value to return if preference is not set; out: changed to user preference value if set
131  DWORD in_dwSize ///< Size of out_pszValue buffer.
132  ) = 0;
133 
134  /// Get the root path for a move operation.
135  /// The input file can either be a work unit or a source file
136  /// \warning This function is not thread-safe.
137  /// \return Nothing as return value. The out_pszRootPath will contain the path.
138  virtual void GetMoveRootPath(
139  LPCWSTR in_pszFullPath, ///< The full path of an audio source or work unit file
140  LPWSTR out_pszRootPath, ///< A pointer to the array that receives the root path
141  UINT in_uiRootPathSize ///< The size of the array that receives the root path
142  ) = 0;
143 
144  /// Create a AK style list control with 3 columns:
145  /// - Filename
146  /// - Status
147  /// - Owner
148  /// You must create a static control in the resources delimitating the region of the list control and
149  /// pass the control ID of it.
150  /// \note DestroyFileStatusListControl must be called when handling WM_DESTROY in WindowProc
151  /// \warning This function is not thread-safe.
152  virtual void CreateFileStatusListControl(
153  HWND in_hWndParent, ///< The parent dialog to create the list control
154  UINT in_idStatic, ///< The ID of the placeholder static control, which will also be the ID of the list control after the creation
155  const WCHAR** in_ppFilenameList, ///< The list of files to show in the list
156  unsigned int in_uiFilenameListCount ///< the number of files in the in_ppFilenameList array
157  ) = 0;
158  };
159  }
160 }
161 
162 #endif // _AK_WWISE_ISOURCECONTROLUTILITIES_H
virtual ISourceControlOperationProgress * GetProgressDialog()=0
virtual void SetUserPreferenceDword(LPCWSTR in_pszPreference, DWORD in_dwValue)=0
virtual void CreateFileStatusListControl(HWND in_hWndParent, UINT in_idStatic, const WCHAR **in_ppFilenameList, unsigned int in_uiFilenameListCount)=0
virtual void GetUserPreferenceDword(LPCWSTR in_pszPreference, DWORD &io_dwValue)=0
virtual bool ShowBrowseForFolderDialog(LPCWSTR in_pszDialogTitle, LPWSTR out_pszChoosenPath, UINT in_uiChoosenPathSize, LPCWSTR in_pszRootPath=NULL)=0
Audiokinetic namespace.
virtual int MessageBox(HWND in_hWnd, LPCWSTR in_pszText, LPCWSTR in_pszCaption, UINT in_uiType)=0
virtual void GetUserPreferenceString(LPCWSTR in_pszPreference, LPWSTR io_pszValue, DWORD in_dwSize)=0
virtual int PromptMessage(HWND in_hWnd, LPCWSTR in_pszText, LPCWSTR in_pszCaption, LPWSTR out_pszInput, UINT in_uiInputSize, bool in_bIsPassword)=0
virtual INT_PTR CreateModalCustomDialog(ISourceControlDialogBase *in_pDialog)=0
virtual LPCWSTR GetRegistryPath()=0
#define NULL
Definition: AkTypes.h:49
virtual void SetUserPreferenceString(LPCWSTR in_pszPreference, LPCWSTR in_pszValue)=0
virtual void GetMoveRootPath(LPCWSTR in_pszFullPath, LPWSTR out_pszRootPath, UINT in_uiRootPathSize)=0