NEC mBaaS Embedded SDK  6.2.0
 全て クラス ネームスペース ファイル 関数 変数 列挙型 列挙型の値
nb_object_bucket.h
説明を見る。
1 /*
2  * COPYRIGHT (C) 2017 NEC CORPORATION
3  *
4  * ALL RIGHTS RESERVED BY NEC CORPORATION, THIS PROGRAM
5  * MUST BE USED SOLELY FOR THE PURPOSE FOR WHICH IT WAS
6  * FURNISHED BY NEC CORPORATION, NO PART OF THIS PROGRAM
7  * MAY BE REPRODUCED OR DISCLOSED TO OTHERS, IN ANY FORM
8  * WITHOUT THE PRIOR WRITTEN PERMISSION OF NEC CORPORATION.
9  *
10  * NEC CONFIDENTIAL AND PROPRIETARY
11  */
12 
13 #ifndef NECBAAS_NBOBJECTBUCKET_H
14 #define NECBAAS_NBOBJECTBUCKET_H
15 
16 #include <string>
17 #include <vector>
18 #include <map>
19 #include <memory>
20 #include "necbaas/nb_service.h"
21 #include "necbaas/nb_result.h"
22 #include "necbaas/nb_object.h"
23 #include "necbaas/nb_query.h"
24 
25 namespace necbaas {
26 
34  public:
40  NbObjectBucket(const std::shared_ptr<NbService> &service, const std::string &bucket_name);
41 
46 
56  NbResult<NbObject> GetObject(const std::string &object_id, bool delete_mark = false);
57 
67  NbResult<std::vector<NbObject>> Query(const NbQuery &query, int *count = nullptr);
68 
73  int GetTimeout() const;
74 
81  void SetTimeout(int timeout);
82 
88 
93  const std::string &GetBucketName() const;
94 
95  private:
96  std::shared_ptr<NbService> service_;
97  int timeout_{kRestTimeoutDefault};
98  std::string bucket_name_;
107  std::multimap<std::string, std::string> GetParams(const NbQuery &query, int *count);
108 };
109 } // namespace necbaas
110 #endif // NECBAAS_NBOBJECTBUCKET_H
オブジェクト管理クラス.
Definition: nb_object.h:34
~NbObjectBucket()
デストラクタ.
オブジェクト検索クラス.
Definition: nb_query.h:41
NbObjectBucket(const std::shared_ptr< NbService > &service, const std::string &bucket_name)
コンストラクタ.
void SetTimeout(int timeout)
RESTタイムアウト設定.
const std::string & GetBucketName() const
バケット名取得.
オブジェクトバケット.
Definition: nb_object_bucket.h:33
REST API処理結果クラス.
Definition: nb_result.h:32
int GetTimeout() const
RESTタイムアウト取得.
NbResult< std::vector< NbObject > > Query(const NbQuery &query, int *count=nullptr)
オブジェクトのクエリ.
NbObject NewObject()
オブジェクト生成する.
NbResult< NbObject > GetObject(const std::string &object_id, bool delete_mark=false)
オブジェクトID検索.