OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimAwsPluginInit.cpp
Go to the documentation of this file.
1 //---
2 //
3 // License: MIT
4 //
5 // Description: OSSIM Amazon Web Services (AWS) plugin initialization
6 // code.
7 //
8 //---
9 // $Id$
10 
11 #include "ossimAwsStreamFactory.h"
15 #include <aws/core/Aws.h>
16 #include "S3StreamDefaults.h"
17 
18 static void setDescription(ossimString& description)
19 {
20  description = "AWS S3 plugin\n\n";
21 }
22 
23 
24 extern "C"
25 {
28  std::vector<ossimString> awsObjList;
29 
30  const char* getAwsDescription()
31  {
32  return awsDescription.c_str();
33  }
34 
36  {
37  return (int)awsObjList.size();
38  }
39 
40  const char* getAwsClassName(int idx)
41  {
42  if(idx < (int)awsObjList.size())
43  {
44  return awsObjList[idx].c_str();
45  }
46  return (const char*)0;
47  }
48 
49  /* Note symbols need to be exported on windoze... */
51  ossimSharedObjectInfo** info, const char* /*options*/)
52  {
53  Aws::SDKOptions options;
54  Aws::InitAPI(options);
55 
59 
60  *info = &awsInfo;
61 
63  /* Register our stream factory... */
65  registerFactory( ossim::AwsStreamFactory::instance() );
66 
67  setDescription(awsDescription);
68  }
69 
70  /* Note symbols need to be exported on windoze... */
72  {
74  unregisterFactory( ossim::AwsStreamFactory::instance() );
75  }
76 }
const char * getAwsClassName(int idx)
std::vector< ossimString > awsObjList
OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize(ossimSharedObjectInfo **info, const char *)
ossimSharedLibraryGetNumberOfClassNamesPtr getNumberOfClassNames
static StreamFactoryRegistry * instance()
const char * getAwsDescription()
OSSIM_PLUGINS_DLL void ossimSharedLibraryFinalize()
ossimSharedLibraryGetDescriptionPtr getDescription
ossimString awsDescription
#define OSSIM_PLUGINS_DLL
ossimSharedLibraryGetClassNamesPtr getClassName
static AwsStreamFactory * instance()
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
int getAwsNumberOfClassNames()
ossimSharedObjectInfo awsInfo