# Dynamically load the compiled C/C++ shared library
useDynLib(gdscloud,
    gdscloud_open_http,
    gdscloud_open_s3, gdscloud_open_gcs, gdscloud_open_azure,
    gdscloud_cache_clear, gdscloud_cache_info, gdscloud_list_streams)

# gdsfmt is in Depends, ensuring its DLL is loaded before ours (LinkingTo).
# GDS C functions are called via LinkingTo; at the R level we only need
# openfn.gds() and the cloud handler registry that .onLoad()/.onUnload() use
# to make openfn.gds() dispatch cloud URLs to this package.
importFrom(gdsfmt, openfn.gds,
    gdsRegisterCloudHandler, gdsUnregisterCloudHandler)

# Export the following names
export(
    gdsCloudOpen,
    gdsCloudConfigHTTP,
    gdsCloudConfigS3,
    gdsCloudConfigGCS,
    gdsCloudConfigAzure,
    gdsCloudCacheSize,
    gdsCloudCacheClear,
    gdsCloudCacheInfo,
    gdsCloudExportCredentials,
    gdsCloudList,
    gdsCloudSchemes
)
