2 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @file BoxSchemeHandler.h
18 * @author Yunchan Cho (yunchan.cho@samsung.com)
20 #ifndef BOX_SCHEME_HANDLER_H
21 #define BOX_SCHEME_HANDLER_H
32 #define EXPORT_CLASS __attribute__ ((visibility("default"))
34 class EXPORT_CLASS BoxSchemeHandler {
36 static BoxSchemeHandler* Instance();
37 void registerBox(std::string& instanceId, Box* box);
38 void unregisterBox(std::string& instanceId);
39 bool process(std::string& instanceId, std::string& uri);
40 bool isBoxScheme(std::string& uri);
43 Box* getBox(std::string& instanceId);
44 bool handleReload(std::string& instanceId);
45 bool handleChangePeriod(std::string& instanceId, float requestedPeriod = -1.0f);
46 bool handleLaunchBrowser(std::string& instanceId, std::string& url);
47 bool handleScroll(std::string& instanceId, bool start);
48 std::string parse(std::string& uri, std::string& key);
54 typedef std::map<std::string, Box*> BoxMap;
55 typedef std::pair<std::string, Box*> BoxMapPair;
57 // members for service
58 std::shared_ptr<Service::PeriodChanger> m_periodChanger;
59 static BoxSchemeHandler* s_instance;
62 #endif // BOX_SCHEME_HANDLER_H