-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathviews_module.hpp
More file actions
49 lines (41 loc) · 1.12 KB
/
views_module.hpp
File metadata and controls
49 lines (41 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef VIEWS_MODULE_HPP_
#define VIEWS_MODULE_HPP_
#include <map>
#include <memory>
#include <string>
#include "countly/configuration_provider.hpp"
#include "countly/constants.hpp"
#include "countly/logger_module.hpp"
namespace cly {
class ViewsModule {
public:
~ViewsModule();
ViewsModule(cly::CountlyDelegates *cly, std::shared_ptr<cly::LoggerModule> logger);
/**
* Close view with id.
*
* @param viewId: id of the view.
*/
void closeViewWithID(const std::string &viewId);
/**
* Close view with name.
*
* @param name: name of the view.
*/
void closeViewWithName(const std::string &name);
/**
* Open view with name.
*
* @param name: name of the view.
* @param segmentation: custom data you want to set.
*/
std::string openView(const std::string &name, const std::map<std::string, std::string> &segmentation = {});
private:
friend class Countly;
void _recordView(std::string eventID);
class ViewModuleImpl;
std::unique_ptr<ViewModuleImpl> impl;
void setConfigurationProvider(std::weak_ptr<ConfigurationProvider> provider); // try injecting
};
} // namespace cly
#endif