2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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 #ifndef ARCHIVE_ARCHIVE_INSTANCE_H_
18 #define ARCHIVE_ARCHIVE_INSTANCE_H_
20 #include "common/extension.h"
21 #include "common/platform_exception.h"
22 #include "common/platform_result.h"
27 class ArchiveInstance : public common::ParsedInstance {
30 virtual ~ArchiveInstance();
33 ArchiveInstance(ArchiveInstance const&);
34 void operator=(ArchiveInstance const&);
36 /* ArchiveManager methods */
37 void Open(const picojson::value& args, picojson::object& out);
38 void Abort(const picojson::value& args, picojson::object& out);
40 /* ArchiveFile methods */
41 void Add(const picojson::value& args, picojson::object& out);
42 void ExtractAll(const picojson::value& args, picojson::object& out);
43 void GetEntries(const picojson::value& args, picojson::object& out);
44 void GetEntryByName(const picojson::value& args, picojson::object& out);
45 void Close(const picojson::value& args, picojson::object& out);
47 /* ArchiveFileEntry methods */
48 void Extract(const picojson::value& args, picojson::object& out);
50 /* Filesystem related method */
51 void FetchStorages(const picojson::value& args, picojson::object& out);
53 void PostError(const common::PlatformException& e, double callback_id);
54 void PostError(const common::PlatformResult& e, double callback_id);
57 } // namespace archive
58 } // namespace extension
60 #endif // ARCHIVE_ARCHIVE_INSTANCE_H_