Version
menu_open
link

include/AK/Wwise/SourceControl/ISourceControl.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
00003 released in source code form as part of the SDK installer package.
00004 
00005 Commercial License Usage
00006 
00007 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
00008 may use this file in accordance with the end user license agreement provided 
00009 with the software or, alternatively, in accordance with the terms contained in a
00010 written agreement between you and Audiokinetic Inc.
00011 
00012 Apache License Usage
00013 
00014 Alternatively, this file may be used under the Apache License, Version 2.0 (the 
00015 "Apache License"); you may not use this file except in compliance with the 
00016 Apache License. You may obtain a copy of the Apache License at 
00017 http://www.apache.org/licenses/LICENSE-2.0.
00018 
00019 Unless required by applicable law or agreed to in writing, software distributed
00020 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
00021 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
00022 the specific language governing permissions and limitations under the License.
00023 
00024   Version: <VERSION>  Build: <BUILDNUMBER>
00025   Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc.
00026 *******************************************************************************/
00027 
00030 
00031 #ifndef _AK_WWISE_ISOURCECONTROL_H
00032 #define _AK_WWISE_ISOURCECONTROL_H
00033 
00034 // Include the header file that defines the BSTR type.
00035 #include <wtypes.h>
00036 
00037 #include "ISourceControlUtilities.h"
00038 #include "SourceControlContainers.h"
00039 
00040 // Audiokinetic namespace
00041 namespace AK
00042 {
00043     // Audiokinetic Wwise namespace
00044     namespace Wwise
00045     {
00047         class SourceControlConstant
00048         {
00049         public: 
00051             static const unsigned int s_uiMaxWorkUnitName = 128;
00053             static const DWORD s_dwInvalidOperationID = (DWORD)-1;
00054         };
00055 
00061         class ISourceControl
00062         {
00063         public: 
00064             
00066 
00067 
00070             enum OperationResult
00071             {
00072                 OperationResult_Succeed = 0,    
00073                 OperationResult_Failed,         
00074                 OperationResult_TimedOut,       
00075                 OperationResult_NotImplemented  
00076             };
00077 
00080             enum OperationMenuType
00081             {
00082                 OperationMenuType_WorkUnits = 0,
00083                 OperationMenuType_Sources,      
00084                 OperationMenuType_Explorer      
00085             };
00086 
00088             enum CreateOrModifyOperation
00089             {
00090                 CreateOrModifyOperation_Create = 1 << 0,    
00091                 CreateOrModifyOperation_Modify = 1 << 1,    
00092             };
00093 
00095             enum OperationEffect
00096             {
00097                 OperationEffect_LocalContentModification = 1 << 0,  
00098                 OperationEffect_ServerContentModification = 1 << 1, 
00099             };
00100 
00102 
00104             class IOperationResult
00105             {
00106             public:
00108                 virtual OperationResult GetOperationResult() = 0;
00109 
00111                 virtual void Destroy() = 0;
00112             };
00113 
00120             class IFileOperationResult : public IOperationResult
00121             {
00122             public:
00124                 virtual void GetMovedFile( 
00125                     unsigned int in_uiIndex,    
00126                     LPWSTR out_szFrom,          
00127                     LPWSTR out_szTo,            
00128                     unsigned int in_uiArraySize 
00129                     ) = 0;
00130                 
00132                 virtual void GetFile( 
00133                     unsigned int in_uiIndex,    
00134                     LPWSTR out_szPath,          
00135                     unsigned int in_uiArraySize 
00136                     ) = 0;
00137 
00139                 virtual unsigned int GetFileCount() = 0;
00140             };
00141 
00144             struct FilenameToStatusMapItem
00145             {
00146                 BSTR m_bstrStatus;              
00147                 BSTR m_bstrOwner;               
00148             };
00149 
00151             struct OperationListItem
00152             {
00153                 DWORD m_dwOperationID;          
00154                 bool m_bEnabled;                
00155             };
00156 
00159             struct FilenameToIconMapItem
00160             {
00161                 HICON m_hIcon;                  
00162                 BSTR m_bstrToolTip;             
00163             };
00164 
00166 
00167 
00171             typedef SourceControlContainers::IAkList<LPCWSTR, LPCWSTR> StringList;
00172             
00175             typedef SourceControlContainers::IAkList<GUID> PluginIDList;
00176 
00183             typedef SourceControlContainers::IAkList<OperationListItem> OperationList;
00184 
00186 
00188 
00189 
00195             typedef SourceControlContainers::IAkMap<LPCWSTR, LPCWSTR, FilenameToIconMapItem, const FilenameToIconMapItem&> FilenameToIconMap;
00196         
00203             typedef SourceControlContainers::IAkMap<LPCWSTR, LPCWSTR, FilenameToStatusMapItem, const FilenameToStatusMapItem&> FilenameToStatusMap;
00204 
00206 
00208             class PluginInfo
00209             {
00210             public:
00211                 BSTR m_bstrName;                
00212                 unsigned int m_uiVersion;       
00213 
00214                 bool m_bShowConfigDlgAvailable; 
00215                 DWORD m_dwUpdateCommandID;      
00216                 DWORD m_dwCommitCommandID;      
00217                 DWORD m_dwRenameCommandID;      
00218                 DWORD m_dwMoveCommandID;        
00219                 DWORD m_dwAddCommandID;         
00220                 DWORD m_dwDeleteCommandID;      
00221                 DWORD m_dwRevertCommandID;      
00222                 DWORD m_dwDiffCommandID;        
00223                 DWORD m_dwCheckOutCommandID;    
00224                 DWORD m_dwRenameNoUICommandID;  
00225                 DWORD m_dwMoveNoUICommandID;    
00226                 DWORD m_dwDeleteNoUICommandID;  
00227                 bool m_bStatusIconAvailable;    
00228             };
00229 
00231             virtual void Init( 
00232                 AK::Wwise::ISourceControlUtilities* in_pUtilities,  
00233 
00234                 bool in_bAutoAccept                                 
00235                 ) = 0;
00236 
00238             virtual void Term() = 0;
00239 
00241             virtual void Destroy() = 0;
00242 
00247             virtual bool ShowConfigDlg() = 0;
00248 
00251             virtual AK::Wwise::ISourceControl::OperationResult GetOperationList( 
00252                 OperationMenuType in_menuType,      
00253                 const StringList& in_rFilenameList, 
00254                 OperationList& out_rOperationList   
00255                 ) = 0;
00256 
00258             // \return A mask of all the applicable OperationEffect enum values
00259             virtual LPCWSTR GetOperationName(
00260                 DWORD in_dwOperationID  
00261                 ) = 0;
00262 
00264             // \return A mask of all the applicable OperationEffect enum values
00265             virtual DWORD GetOperationEffect(
00266                 DWORD in_dwOperationID  
00267                 ) = 0;
00268 
00271             virtual AK::Wwise::ISourceControl::OperationResult GetFileStatus( 
00272                 const StringList& in_rFilenameList,     
00273                 FilenameToStatusMap& out_rFileStatusMap,
00274                 DWORD in_dwTimeoutMs = INFINITE         
00275                 ) = 0;
00276 
00280             virtual AK::Wwise::ISourceControl::OperationResult GetFileStatusIcons( 
00281                 const StringList& in_rFilenameList,     
00282                 FilenameToIconMap& out_rFileIconsMap,   
00283                 DWORD in_dwTimeoutMs = INFINITE         
00284                 ) = 0;
00285 
00289             virtual AK::Wwise::ISourceControl::OperationResult GetMissingFilesInDirectories( 
00290                 const StringList& in_rDirectoryList,    
00291                 StringList& out_rFilenameList           
00292                 ) = 0;
00293 
00297             virtual IOperationResult* DoOperation( 
00298                 DWORD in_dwOperationID,                         
00299                 const StringList& in_rFilenameList,             
00300                 const StringList* in_pTargetFilenameList = NULL 
00301                 ) = 0;
00302 
00307             virtual AK::Wwise::ISourceControl::OperationResult PreCreateOrModify(
00308                 const StringList& in_rFilenameList,     
00309                 CreateOrModifyOperation in_eOperation,  
00310                 bool& out_rContinue                     
00311                 ) = 0;
00312 
00317             virtual AK::Wwise::ISourceControl::OperationResult PostCreateOrModify(
00318                 const StringList& in_rFilenameList,     
00319                 CreateOrModifyOperation in_eOperation,  
00320                 bool& out_rContinue                     
00321                 ) = 0;
00322 
00325             virtual AK::Wwise::ISourceControl::OperationResult GetFilesForOperation( 
00326                 DWORD in_dwOperationID,                     
00327                 const StringList& in_rFilenameList,         
00328                 StringList& out_rFilenameList,              
00329                 FilenameToStatusMap& out_rFileStatusMap     
00330                 ) = 0;
00331 
00333 
00335 
00336 
00338             typedef void (__stdcall* GetSourceControlIDListFuncPtr)( 
00339                 PluginIDList& out_rPluginIDList     
00340                 );
00341 
00343             typedef void (__stdcall* GetSourceControlPluginInfoFuncPtr)( 
00344                 const GUID& in_rguidPluginID,       
00345                 PluginInfo& out_rPluginInfo         
00346                 );
00347 
00350             typedef ISourceControl* (__stdcall* GetSourceControlInstanceFuncPtr)( 
00351                 const GUID& in_guidPluginID         
00352                 );
00353         };
00354     }
00355 }
00356 
00357 #endif // _AK_WWISE_ISOURCECONTROL_H

Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise