Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions extensions/curl/extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ bool CurlExt::SDK_OnLoad(char *error, size_t maxlength, bool late)
return false;
}

sharesys->AddCapabilityProvider(myself, this, "Webternet");

smutils->BuildPath(Path_SM, CABundlePath, sizeof(CABundlePath), SM_CA_BUNDLE_PATH);

return true;
Expand All @@ -78,6 +80,7 @@ bool CurlExt::SDK_OnLoad(char *error, size_t maxlength, bool late)
void CurlExt::SDK_OnUnload()
{
curl_global_cleanup();
sharesys->DropCapabilityProvider(myself, this, "Webternet");
}

const char *CurlExt::GetExtensionVerString()
Expand All @@ -90,3 +93,7 @@ const char *CurlExt::GetExtensionDateString()
return SOURCEMOD_BUILD_TIME;
}

FeatureStatus CurlExt::GetFeatureStatus(FeatureType type, const char *name)
{
return FeatureStatus_Available;
}
5 changes: 4 additions & 1 deletion extensions/curl/extension.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extern char CABundlePath[PLATFORM_MAX_PATH];
* @brief Sample implementation of the SDK Extension.
* Note: Uncomment one of the pre-defined virtual functions in order to use it.
*/
class CurlExt : public SDKExtension
class CurlExt : public SDKExtension, IFeatureProvider
{
public:
/**
Expand Down Expand Up @@ -119,6 +119,9 @@ class CurlExt : public SDKExtension
*/
//virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength);
#endif

public: // IFeatureProvider
virtual FeatureStatus GetFeatureStatus(FeatureType type, const char *name);
};

#endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_