1
0
Fork 0

Merge branch 'master' of github.com:fceller/ArangoDB

This commit is contained in:
Frank Celler 2012-06-06 13:46:07 +02:00
commit 089d57c175
2 changed files with 89 additions and 28 deletions

89
Actions/actions.h Normal file
View File

@ -0,0 +1,89 @@
////////////////////////////////////////////////////////////////////////////////
/// @brief vocbase
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2010-2011 triagens GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
/// Copyright holder is triAGENS GmbH, Cologne, Germany
///
/// @author Dr. Frank Celler
/// @author Copyright 2011, triagens GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
#ifndef TRIAGENS_DURHAM_VOC_BASE_VOCBASE_H
#define TRIAGENS_DURHAM_VOC_BASE_VOCBASE_H 1
#include <Basics/Common.h>
// -----------------------------------------------------------------------------
// --SECTION-- forward declarations
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// --SECTION-- public types
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup VocBase
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief parameter type
////////////////////////////////////////////////////////////////////////////////
typedef enum {
TRI_ACT_STRING,
TRI_ACT_NUMBER,
TRI_ACT_COLLECTION,
TRI_ACT_COLLECTION_NAME,
TRI_ACT_COLLECTION_ID
}
TRI_action_parameter_type_e;
////////////////////////////////////////////////////////////////////////////////
/// @brief action descriptor
////////////////////////////////////////////////////////////////////////////////
typedef struct TRI_action_s {
void execute (rest::HttpRequest const&
std::string _url;
size_t _urlParts;
bool _isPrefix;
map<std::string, TRI_action_parameter_type_e> _parameter;
}
TRI_action_t;
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- END-OF-LINE
// -----------------------------------------------------------------------------
#ifdef __cplusplus
}
#endif
#endif
// Local Variables:
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)"
// End:

View File

@ -149,34 +149,6 @@ namespace triagens {
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief parameter type
////////////////////////////////////////////////////////////////////////////////
typedef enum {
TRI_ACT_STRING,
TRI_ACT_NUMBER,
TRI_ACT_COLLECTION,
TRI_ACT_COLLECTION_NAME,
TRI_ACT_COLLECTION_ID
}
TRI_action_parameter_type_e;
////////////////////////////////////////////////////////////////////////////////
/// @brief parameter definition
////////////////////////////////////////////////////////////////////////////////
typedef struct TRI_action_parameter_s {
TRI_action_parameter_s ()
: _name(),
_type(TRI_ACT_NUMBER) {
}
std::string _name;
TRI_action_parameter_type_e _type;
}
TRI_action_parameter_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief action options definition
////////////////////////////////////////////////////////////////////////////////