버전
menu_open
link
Wwise SDK 2023.1.2
License.h
이 파일의 문서화 페이지로 가기
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  Copyright (c) 2024 Audiokinetic Inc.
25 *******************************************************************************/
26 
27 /**
28  * \brief Wwise Authoring Plug-ins - Plug-in API for licensing.
29  * \file AK/Wwise/Plugin/License.h
30  */
31 
32 #pragma once
33 
34 #include "PluginInfoGenerator.h"
35 
36 /**
37  * \brief Backend API to specify licensing requirements
38  */
40 #ifdef __cplusplus
42 #endif
43 {
44 #ifndef __cplusplus
45  ak_wwise_plugin_base_interface m_baseInterface;
46 #endif
47 
48 #ifdef __cplusplus
49  /// Base instance type for providing licensing information.
51 
54  {}
55 #endif
56 
57  /**
58  * \brief Retrieve the licensing status of the plug-in for the given platform.
59  *
60  * \param[in] in_this Current instance of this interface.
61  * \param[in] in_guidPlatform GUID of the platform.
62  * \param[out] out_eSeverity (Optional) If set, the string placed in out_pszMessage will be shown
63  * in the log with the corresponding severity.
64  * \param[out] out_pszMessage Pointer to the buffer of size in_uiBufferSize that will hold the
65  * message string.
66  * \param[in] in_uiBufferSize Null-terminated size of the buffer pointed by out_pszMessage.
67 
68  * \return Licensing status of the plug-in; LicenseStatus_Unlicensed or LicenseStatus_Expired
69  * will prevent the plug-in from being included in a SoundBank.
70  *
71  * \sa
72  * - \ref AK::Wwise::Plugin::Host::GetLicenseStatus
73  * - \ref AK::Wwise::Plugin::Host::GetAssetLicenseStatus
74  * - \ref wwiseplugin_dll_license
75  */
77  const struct ak_wwise_plugin_license_instance_v1* in_this,
78  const GUID* in_guidPlatform, ///< GUID of the platform
79  AK::Wwise::Plugin::Severity* out_eSeverity, ///< (Optional) If set, the string placed in out_pszMessage will be shown in the log with the corresponding severity.
80  char * out_pszMessage, ///< Pointer to the buffer that will hold the message string
81  unsigned int in_uiBufferSize ///< Size of the buffer pointed by out_pszMessage (in number of WCHAR, including null terminator)
82  );
83 
84 };
85 #define AK_WWISE_PLUGIN_LICENSE_V1_ID() \
86  AK_WWISE_PLUGIN_BASE_INTERFACE_FROM_ID(AK_WWISE_PLUGIN_INTERFACE_TYPE_LICENSE, 1)
87 #define AK_WWISE_PLUGIN_LICENSE_V1_CTOR(/* ak_wwise_plugin_info* */ in_pluginInfo, /* void* */ in_data) \
88 { \
89  .m_baseInterface = AK_WWISE_PLUGIN_BASE_INTERFACE_CTOR(AK_WWISE_PLUGIN_LICENSE_V1_ID(), in_pluginInfo, in_data) \
90 }
91 
92 #ifdef __cplusplus
93 namespace AK::Wwise::Plugin
94 {
95  namespace V1
96  {
98  class License : public CLicense::Instance
99  {
100  public:
101  /**
102  * \brief The interface type, as provided by this plug-in.
103  */
104  enum : InterfaceTypeValue
105  {
106  /**
107  * \brief The interface type, as provided by this plug-in.
108  */
110  };
111  /**
112  * \brief The interface version, as provided by this plug-in.
113  */
114  enum : InterfaceVersion
115  {
116  /**
117  * \brief The interface version, as provided by this plug-in.
118  */
120  };
121 
122  /**
123  * \brief The C interface, fulfilled by your plug-in.
124  */
125  struct Interface : public CLicense
126  {
127  using Instance = License;
129  {
131  const struct ak_wwise_plugin_license_instance_v1* in_this,
132  const GUID* in_guidPlatform,
133  Severity* out_eSeverity,
134  char * out_pszMessage,
135  unsigned int in_uiBufferSize)
136  {
137  return (LicenseStatus)static_cast<const Instance*>(in_this)->GetLicenseStatus(
138  *in_guidPlatform,
139  *out_eSeverity,
140  out_pszMessage,
141  in_uiBufferSize);
142  };
143  }
144  };
145 
147  static Interface g_interface;
148  return &g_interface;
149  }
151  return this;
152  }
154  return this;
155  }
156 
158  CLicense::Instance()
159  {
160  }
161 
162  virtual ~License() {}
163 
164  /**
165  * \brief Retrieve the licensing status of the plug-in for the given platform.
166  *
167  * \param[in] in_guidPlatform GUID of the platform.
168  * \param[out] out_eSeverity (Optional) If set, the string placed in out_pszMessage will be shown
169  * in the log with the corresponding severity.
170  * \param[out] out_pszMessage Pointer to the buffer of size in_uiBufferSize that will hold the
171  * message string.
172  * \param[in] in_uiBufferSize Null-terminated size of the buffer pointed by out_pszMessage.
173 
174  * \return Licensing status of the plug-in; LicenseStatus_Unlicensed or LicenseStatus_Expired
175  * will prevent the plug-in from being included in a SoundBank.
176  *
177  * \sa
178  * - \ref AK::Wwise::Plugin::Host::GetLicenseStatus
179  * - \ref AK::Wwise::Plugin::Host::GetAssetLicenseStatus
180  * - \ref wwiseplugin_dll_license
181  */
183  const GUID & in_guidPlatform,
184  Severity & out_eSeverity,
185  char * out_pszMessage,
186  unsigned int in_uiBufferSize
187  ) const { return LicenseStatus::LicenseStatus_Valid; }
188  };
189  } // of namespace V1
190 
191  /// Latest version of the C License interface.
193  /// Latest version of the C++ License interface.
195 
198 } // of namespace AK::Wwise::Plugin
199 
200 #endif
InterfacePtr GetInterfacePointer()
Definition: License.h:146
@ k_interfaceType
The interface type, as provided by this plug-in.
Definition: License.h:109
virtual LicenseStatus GetLicenseStatus(const GUID &in_guidPlatform, Severity &out_eSeverity, char *out_pszMessage, unsigned int in_uiBufferSize) const
Retrieve the licensing status of the plug-in for the given platform.
Definition: License.h:182
decltype(BaseInterface::m_version) InterfaceVersion
PluginInfoGenerator: Type for the m_version value in BaseInterface
@ LicenseStatus_Valid
A license is found and is valid
Definition: Utilities.h:96
const CLicense::Instance * GetInstancePointer() const
Definition: License.h:153
Wwise Authoring Plug-ins - C++ class helper to automatically determine the plug-in interfaces used in...
The C interface, fulfilled by your plug-in.
Definition: License.h:126
CInterfacePtr InterfacePtr
Definition: PluginDef.h:995
Base instance type for providing licensing information, through ak_wwise_plugin_license_v1.
Definition: PluginDef.h:893
std::underlying_type< InterfaceType >::type InterfaceTypeValue
PluginInfoGenerator: Underlying storage type for the m_interface value in BaseInterface
AK::Wwise::Plugin::LicenseStatus(* GetLicenseStatus)(const struct ak_wwise_plugin_license_instance_v1 *in_this, const GUID *in_guidPlatform, AK::Wwise::Plugin::Severity *out_eSeverity, char *out_pszMessage, unsigned int in_uiBufferSize)
Retrieve the licensing status of the plug-in for the given platform.
Definition: License.h:76
Severity
Log message severity.
Definition: PluginDef.h:109
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(AudioPlugin)
ak_wwise_plugin_license_v1 CLicense
Definition: License.h:97
CLicense::Instance * GetInstancePointer()
Definition: License.h:150
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_LICENSE
2021.1 Licensing. ak_wwise_plugin_license_v1
Interface description and base class for every Wwise Authoring plug-in interface.
V1::License License
Latest version of the C++ License interface.
Definition: License.h:194
LicenseStatus
License status.
Definition: PluginDef.h:67
Backend API to specify licensing requirements
Definition: License.h:43
@ k_interfaceVersion
The interface version, as provided by this plug-in.
Definition: License.h:119
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(AudioPlugin)

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요