All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SearchServiceCredentials.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include <sstream>
7 #include <string>
8 
9 namespace Eegeo
10 {
11  namespace Search
12  {
13  namespace Service
14  {
16  {
17  std::string m_appKey;
18  std::string m_appCode;
19 
20  public:
21  SearchServiceCredentials(const std::string& appKey, const std::string& appCode)
22  :m_appKey(appKey)
23  ,m_appCode(appCode)
24  {
25  }
26 
27  const std::string& key() const { return m_appKey; }
28  const std::string& code() const { return m_appCode; }
29  };
30 
31  inline void AppendQueryStringCredentialsToStringStream(const SearchServiceCredentials& credentials,
32  std::stringstream& ss)
33  {
34  ss << "app_id=" << credentials.key() << "&app_code=" << credentials.code();
35  }
36  }
37  }
38 }