Table of Contents

Wwise SDK 2021.1.2
FirstTimeCreationMessage.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: v2021.1.2 Build: 7629
25  Copyright (c) 2006-2021 Audiokinetic Inc.
26 *******************************************************************************/
27 
28 /**
29  * \brief Wwise Authoring Plug-ins - Plug-in that provides a special usage message when first instantiated.
30  * \file AK/Wwise/Plugin/FirstTimeCreationMessage.h
31  */
32 
33 #pragma once
34 
35 #include "PluginInfoGenerator.h"
36 
37 
38 /**
39  * \brief Plug-in that provides a special usage message when first instantiated.
40  */
42 #ifdef __cplusplus
44 #endif
45 {
46 #ifndef __cplusplus
47  ak_wwise_plugin_base_interface m_baseInterface;
48 #endif
49 
50 #ifdef __cplusplus
51  /// Base instance type for providing a message shown the first time an instance is created.
53 
56  {}
57 #endif
58 
59  /**
60  * \brief Returns a unique key used in the .wproj to indicate whether the licensing message was shown.
61  *
62  * The key should be representative of the plug-in or plug-in family, as well as user readable. Even if a GUID
63  * would be unique, it would not be helpful to the user.
64  *
65  * \param[in] in_this Current instance of this interface.
66  * \return Null-terminated string uniquely representing this plug-in or plug-in family.
67  */
68  const char*(*GetKey)(const struct ak_wwise_plugin_first_time_creation_message_instance_v1* in_this);
69 
70  /**
71  * \brief Returns a unique creation message shown to the user.
72  *
73  * Shown when the plug-in is first created and the key is not present in the .wproj yet.
74  *
75  * \param[in] in_this Current instance of this interface.
76  * \return Null-terminated string containing the text to show to the end user.
77  */
78  const char*(*GetCreationMessage)(const struct ak_wwise_plugin_first_time_creation_message_instance_v1* in_this);
79 };
80 
81 
82 #define AK_WWISE_PLUGIN_FIRST_TIME_CREATION_MESSAGE_V1_ID() \
83  AK_WWISE_PLUGIN_BASE_INTERFACE_FROM_ID(AK_WWISE_PLUGIN_INTERFACE_TYPE_FIRST_TIME_CREATION_MESSAGE, 1)
84 #define AK_WWISE_PLUGIN_FIRST_TIME_CREATION_MESSAGE_V1_CTOR(/* ak_wwise_plugin_info* */ in_pluginInfo, /* void* */ in_data) \
85 { \
86  .m_baseInterface = AK_WWISE_PLUGIN_BASE_INTERFACE_CTOR(AK_WWISE_PLUGIN_FIRST_TIME_CREATION_MESSAGE_V1_ID(), in_pluginInfo, in_data) \
87 }
88 
89 
90 #ifdef __cplusplus
91 namespace AK::Wwise::Plugin
92 {
93  namespace V1
94  {
97  {
98  public:
99  /**
100  * \copydoc CFirstTimeCreationMessage::Instance
101  */
103 
104  /**
105  * \brief The interface type, as provided by this plug-in.
106  */
107  enum : InterfaceTypeValue
108  {
109  /**
110  * \brief The interface type, as provided by this plug-in.
111  */
113  };
114  /**
115  * \brief The interface version, as provided by this plug-in.
116  */
117  enum : InterfaceVersion
118  {
119  /**
120  * \brief The interface version, as provided by this plug-in.
121  */
123  };
124 
125  /**
126  * \brief The C interface, fulfilled by your plug-in.
127  */
129  {
132  {
133  CFirstTimeCreationMessage::GetKey = [](const struct ak_wwise_plugin_first_time_creation_message_instance_v1* in_this) { return static_cast<const Instance*>(in_this)->GetKey(); };
135  }
136  };
137 
139  static Interface g_interface;
140  return &g_interface;
141  }
143  return this;
144  }
146  return this;
147  }
148 
151  {
152  }
153 
155 
156  /**
157  * \brief Returns a unique key used in the .wproj to indicate whether the licensing message was shown.
158  *
159  * The key should be representative of the plug-in or plug-in family, as well as user readable. Even if a GUID
160  * would be unique, it would not be helpful to the user.
161  *
162  * \return Null-terminated string uniquely representing this plug-in or plug-in family.
163  */
164  virtual const char* GetKey() const = 0;
165 
166  /**
167  * \brief Returns a unique creation message shown to the user.
168  *
169  * Shown when the plug-in is first created and the key is not present in the .wproj yet.
170  *
171  * \return Null-terminated string containing the text to show to the end user.
172  */
173  virtual const char* GetCreationMessage() const = 0;
174  };
175  } // of namespace V1
176 
177  /// Latest version of the C FirstTimeCreationMessage interface.
179  /// Latest version of the C++ FirstTimeCreationMessage interface.
181 
184 } // of namespace AK::Wwise::Plugin
185 
186 #endif
V1::FirstTimeCreationMessage FirstTimeCreationMessage
Latest version of the C++ FirstTimeCreationMessage interface.
const char *(* GetCreationMessage)(const struct ak_wwise_plugin_first_time_creation_message_instance_v1 *in_this)
Returns a unique creation message shown to the user.
const char *(* GetKey)(const struct ak_wwise_plugin_first_time_creation_message_instance_v1 *in_this)
Returns a unique key used in the .wproj to indicate whether the licensing message was shown.
@ k_interfaceType
The interface type, as provided by this plug-in.
decltype(BaseInterface::m_version) InterfaceVersion
PluginInfoGenerator: Type for the m_version value in BaseInterface.
Base instance type for providing a message shown the first time an instance is created through ak_wwi...
Definition: PluginDef.h:887
Plug-in that provides a special usage message when first instantiated.
Wwise Authoring Plug-ins - C++ class helper to automatically determine the plug-in interfaces used in...
ak_wwise_plugin_first_time_creation_message_v1 CFirstTimeCreationMessage
CInterfacePtr InterfacePtr
Definition: PluginDef.h:968
The C interface, fulfilled by your plug-in.
CFirstTimeCreationMessage::Instance * GetInstancePointer()
virtual const char * GetKey() const =0
Returns a unique key used in the .wproj to indicate whether the licensing message was shown.
std::underlying_type< InterfaceType >::type InterfaceTypeValue
PluginInfoGenerator: Underlying storage type for the m_interface value in BaseInterface.
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_FIRST_TIME_CREATION_MESSAGE
2021.1 First Time Creation Message plug-in. ak_wwise_plugin_first_time_creation_message_v1
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(AudioPlugin)
Interface description and base class for every Wwise Authoring plug-in interface.
const CFirstTimeCreationMessage::Instance * GetInstancePointer() const
@ k_interfaceVersion
The interface version, as provided by this plug-in.
virtual const char * GetCreationMessage() const =0
Returns a unique creation message shown to the user.
ak_wwise_plugin_first_time_creation_message_instance_v1 Instance
Base instance type for providing a message shown the first time an instance is created.
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(AudioPlugin)