AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/ast AST_GEN_SOURCES)
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/gen GEN_SOURCES)
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/gen/version2 GEN_VERSION2_SOURCES)
-AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/gen_aitt_plugin GEN_AITT_PLUGIN_SOURCES)
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/gen_mqtt_plugin GEN_MQTT_PLUGIN_SOURCES)
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/gen_cion GEN_CION_SOURCES)
BISON_TARGET(TIDLC ${CMAKE_CURRENT_SOURCE_DIR}/ast/tidlc.yy ${CMAKE_CURRENT_SOURCE_DIR}/ast/tidlc_y.cpp)
${AST_GEN_SOURCES}
${BISON_TIDLC_OUTPUTS}
${FLEX_TIDLC_OUTPUTS}
- ${GEN_AITT_PLUGIN_SOURCES}
+ ${GEN_MQTT_PLUGIN_SOURCES}
${GEN_CION_SOURCES}
${GEN_SOURCES}
${SOURCES}
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIBPKGS_LIBRARIES} ${EXE_STATIC})
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
-
-// A Bison parser, made by GNU Bison 3.5.1.
+// A Bison parser, made by GNU Bison 3.0.4.
// Locations for Bison parsers in C++
-// Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015 Free Software Foundation, Inc.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// version 2.2 of Bison.
/**
- ** \file /home/upple/tizen/appfw/tidl/idlc/ast/location.hh
+ ** \file /home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/location.hh
** Define the yy::location class.
*/
-#ifndef YY_YY_HOME_UPPLE_TIZEN_APPFW_TIDL_IDLC_AST_LOCATION_HH_INCLUDED
-# define YY_YY_HOME_UPPLE_TIZEN_APPFW_TIDL_IDLC_AST_LOCATION_HH_INCLUDED
+#ifndef YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_LOCATION_HH_INCLUDED
+# define YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_LOCATION_HH_INCLUDED
-# include <iostream>
-# include <string>
+# include "position.hh"
-# ifndef YY_NULLPTR
-# if defined __cplusplus
-# if 201103L <= __cplusplus
-# define YY_NULLPTR nullptr
-# else
-# define YY_NULLPTR 0
-# endif
-# else
-# define YY_NULLPTR ((void*)0)
-# endif
-# endif
namespace yy {
-#line 58 "/home/upple/tizen/appfw/tidl/idlc/ast/location.hh"
-
- /// A point in a source file.
- class position
- {
- public:
- /// Type for line and column numbers.
- typedef int counter_type;
-
- /// Initialization.
- void initialize (std::string* fn = YY_NULLPTR,
- counter_type l = 1,
- counter_type c = 1)
- {
- filename = fn;
- line = l;
- column = c;
- }
-
- /** \name Line and Column related manipulators
- ** \{ */
- /// (line related) Advance to the COUNT next lines.
- void lines (counter_type count = 1)
- {
- if (count)
- {
- column = 1;
- line = add_ (line, count, 1);
- }
- }
-
- /// (column related) Advance to the COUNT next columns.
- void columns (counter_type count = 1)
- {
- column = add_ (column, count, 1);
- }
- /** \} */
-
- /// File name to which this position refers.
- std::string* filename;
- /// Current line number.
- counter_type line;
- /// Current column number.
- counter_type column;
-
- private:
- /// Compute max (min, lhs+rhs).
- static counter_type add_ (counter_type lhs, counter_type rhs, counter_type min)
- {
- return lhs + rhs < min ? min : lhs + rhs;
- }
- };
-
- /// Add \a width columns, in place.
- inline position&
- operator+= (position& res, position::counter_type width)
- {
- res.columns (width);
- return res;
- }
-
- /// Add \a width columns.
- inline position
- operator+ (position res, position::counter_type width)
- {
- return res += width;
- }
-
- /// Subtract \a width columns, in place.
- inline position&
- operator-= (position& res, position::counter_type width)
- {
- return res += -width;
- }
-
- /// Subtract \a width columns.
- inline position
- operator- (position res, position::counter_type width)
- {
- return res -= width;
- }
-
- /// Compare two position objects.
- inline bool
- operator== (const position& pos1, const position& pos2)
- {
- return (pos1.line == pos2.line
- && pos1.column == pos2.column
- && (pos1.filename == pos2.filename
- || (pos1.filename && pos2.filename
- && *pos1.filename == *pos2.filename)));
- }
-
- /// Compare two position objects.
- inline bool
- operator!= (const position& pos1, const position& pos2)
- {
- return !(pos1 == pos2);
- }
-
- /** \brief Intercept output stream redirection.
- ** \param ostr the destination output stream
- ** \param pos a reference to the position to redirect
- */
- template <typename YYChar>
- std::basic_ostream<YYChar>&
- operator<< (std::basic_ostream<YYChar>& ostr, const position& pos)
- {
- if (pos.filename)
- ostr << *pos.filename << ':';
- return ostr << pos.line << '.' << pos.column;
- }
-
- /// Two points in a source file.
+#line 46 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/location.hh" // location.cc:296
+ /// Abstract a location.
class location
{
public:
- /// Type for line and column numbers.
- typedef position::counter_type counter_type;
/// Initialization.
void initialize (std::string* f = YY_NULLPTR,
- counter_type l = 1,
- counter_type c = 1)
+ unsigned int l = 1u,
+ unsigned int c = 1u)
{
begin.initialize (f, l, c);
end = begin;
}
/// Extend the current location to the COUNT next columns.
- void columns (counter_type count = 1)
+ void columns (int count = 1)
{
end += count;
}
/// Extend the current location to the COUNT next lines.
- void lines (counter_type count = 1)
+ void lines (int count = 1)
{
end.lines (count);
}
};
/// Join two locations, in place.
- inline location&
- operator+= (location& res, const location& end)
+ inline location& operator+= (location& res, const location& end)
{
res.end = end.end;
return res;
}
/// Join two locations.
- inline location
- operator+ (location res, const location& end)
+ inline location operator+ (location res, const location& end)
{
return res += end;
}
/// Add \a width columns to the end position, in place.
- inline location&
- operator+= (location& res, location::counter_type width)
+ inline location& operator+= (location& res, int width)
{
res.columns (width);
return res;
}
/// Add \a width columns to the end position.
- inline location
- operator+ (location res, location::counter_type width)
+ inline location operator+ (location res, int width)
{
return res += width;
}
/// Subtract \a width columns to the end position, in place.
- inline location&
- operator-= (location& res, location::counter_type width)
+ inline location& operator-= (location& res, int width)
{
return res += -width;
}
/// Subtract \a width columns to the end position.
- inline location
- operator- (location res, location::counter_type width)
+ inline location operator- (location res, int width)
{
return res -= width;
}
** Avoid duplicate information.
*/
template <typename YYChar>
- std::basic_ostream<YYChar>&
+ inline std::basic_ostream<YYChar>&
operator<< (std::basic_ostream<YYChar>& ostr, const location& loc)
{
- location::counter_type end_col
- = 0 < loc.end.column ? loc.end.column - 1 : 0;
+ unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0;
ostr << loc.begin;
if (loc.end.filename
&& (!loc.begin.filename
return ostr;
}
-} // yy
-#line 300 "/home/upple/tizen/appfw/tidl/idlc/ast/location.hh"
-#endif // !YY_YY_HOME_UPPLE_TIZEN_APPFW_TIDL_IDLC_AST_LOCATION_HH_INCLUDED
+} // yy
+#line 168 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/location.hh" // location.cc:296
+#endif // !YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_LOCATION_HH_INCLUDED
namespace tidl {
-Parser::Parser(bool beta_enable, bool cion_enable, bool aitt_enable,
+Parser::Parser(bool beta_enable, bool cion_enable, bool mqtt_enable,
bool group_enable)
: scanner_(nullptr), error_(false), beta_enable_(beta_enable),
- cion_enable_(cion_enable), aitt_enable_(aitt_enable),
+ cion_enable_(cion_enable), mqtt_enable_(mqtt_enable),
group_enable_(group_enable), ver_(1) {
yylex_init(&scanner_);
}
return cion_enable_;
}
-bool Parser::IsAittEnabled() const {
- return aitt_enable_;
+bool Parser::IsMqttEnabled() const {
+ return mqtt_enable_;
}
bool Parser::IsGroupEnabled() const {
class Parser {
public:
Parser(bool beta_enable = false, bool cion_enable = false,
- bool aitt_enable = false, bool group_enable = false);
+ bool mqtt_enable = false, bool group_enable = false);
~Parser();
void* Scanner() const { return scanner_; }
void ReportError(const std::string& err, unsigned line);
bool IsBetaEnabled() const;
bool IsCionEnabled() const;
- bool IsAittEnabled() const;
+ bool IsMqttEnabled() const;
bool IsGroupEnabled() const;
void SetVersion(int ver);
int GetVersion() const;
bool error_;
bool beta_enable_;
bool cion_enable_;
- bool aitt_enable_;
+ bool mqtt_enable_;
bool group_enable_;
int ver_;
};
-// A Bison parser, made by GNU Bison 3.5.1.
+// A Bison parser, made by GNU Bison 3.0.4.
-// Starting with Bison 3.2, this file is useless: the structure it
-// used to define is now defined in "location.hh".
-//
-// To get rid of this file:
-// 1. add '%require "3.2"' (or newer) to your grammar file
-// 2. remove references to this file from your build system
-// 3. if you used to include it, include "location.hh" instead.
+// Positions for Bison parsers in C++
-#include "location.hh"
+// Copyright (C) 2002-2015 Free Software Foundation, Inc.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// As a special exception, you may create a larger work that contains
+// part or all of the Bison parser skeleton and distribute that work
+// under terms of your choice, so long as that work isn't itself a
+// parser generator using the skeleton or a modified version thereof
+// as a parser skeleton. Alternatively, if you modify or redistribute
+// the parser skeleton itself, you may (at your option) remove this
+// special exception, which will cause the skeleton and the resulting
+// Bison output files to be licensed under the GNU General Public
+// License without this special exception.
+
+// This special exception was added by the Free Software Foundation in
+// version 2.2 of Bison.
+
+/**
+ ** \file /home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/position.hh
+ ** Define the yy::position class.
+ */
+
+#ifndef YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_POSITION_HH_INCLUDED
+# define YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_POSITION_HH_INCLUDED
+
+# include <algorithm> // std::max
+# include <iostream>
+# include <string>
+
+# ifndef YY_NULLPTR
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# endif
+
+
+namespace yy {
+#line 56 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/position.hh" // location.cc:296
+ /// Abstract a position.
+ class position
+ {
+ public:
+ /// Initialization.
+ void initialize (std::string* fn = YY_NULLPTR,
+ unsigned int l = 1u,
+ unsigned int c = 1u)
+ {
+ filename = fn;
+ line = l;
+ column = c;
+ }
+
+ /** \name Line and Column related manipulators
+ ** \{ */
+ /// (line related) Advance to the COUNT next lines.
+ void lines (int count = 1)
+ {
+ if (count)
+ {
+ column = 1u;
+ line = add_ (line, count, 1);
+ }
+ }
+
+ /// (column related) Advance to the COUNT next columns.
+ void columns (int count = 1)
+ {
+ column = add_ (column, count, 1);
+ }
+ /** \} */
+
+ /// File name to which this position refers.
+ std::string* filename;
+ /// Current line number.
+ unsigned int line;
+ /// Current column number.
+ unsigned int column;
+
+ private:
+ /// Compute max(min, lhs+rhs) (provided min <= lhs).
+ static unsigned int add_ (unsigned int lhs, int rhs, unsigned int min)
+ {
+ return (0 < rhs || -static_cast<unsigned int>(rhs) < lhs
+ ? rhs + lhs
+ : min);
+ }
+ };
+
+ /// Add \a width columns, in place.
+ inline position&
+ operator+= (position& res, int width)
+ {
+ res.columns (width);
+ return res;
+ }
+
+ /// Add \a width columns.
+ inline position
+ operator+ (position res, int width)
+ {
+ return res += width;
+ }
+
+ /// Subtract \a width columns, in place.
+ inline position&
+ operator-= (position& res, int width)
+ {
+ return res += -width;
+ }
+
+ /// Subtract \a width columns.
+ inline position
+ operator- (position res, int width)
+ {
+ return res -= width;
+ }
+
+ /// Compare two position objects.
+ inline bool
+ operator== (const position& pos1, const position& pos2)
+ {
+ return (pos1.line == pos2.line
+ && pos1.column == pos2.column
+ && (pos1.filename == pos2.filename
+ || (pos1.filename && pos2.filename
+ && *pos1.filename == *pos2.filename)));
+ }
+
+ /// Compare two position objects.
+ inline bool
+ operator!= (const position& pos1, const position& pos2)
+ {
+ return !(pos1 == pos2);
+ }
+
+ /** \brief Intercept output stream redirection.
+ ** \param ostr the destination output stream
+ ** \param pos a reference to the position to redirect
+ */
+ template <typename YYChar>
+ inline std::basic_ostream<YYChar>&
+ operator<< (std::basic_ostream<YYChar>& ostr, const position& pos)
+ {
+ if (pos.filename)
+ ostr << *pos.filename << ':';
+ return ostr << pos.line << '.' << pos.column;
+ }
+
+
+} // yy
+#line 169 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/position.hh" // location.cc:296
+#endif // !YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_POSITION_HH_INCLUDED
-#line 2 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_l.cpp"
+#line 2 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_l.cpp"
-#line 4 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_l.cpp"
+#line 4 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_l.cpp"
#define YY_INT_ALIGNED short int
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-#define YY_NUM_RULES 46
-#define YY_END_OF_BUFFER 47
+#define YY_NUM_RULES 48
+#define YY_END_OF_BUFFER 49
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static const flex_int16_t yy_accept[132] =
+static const flex_int16_t yy_accept[142] =
{ 0,
- 0, 0, 0, 0, 0, 0, 47, 45, 12, 11,
- 8, 16, 17, 13, 45, 18, 35, 44, 36, 41,
- 42, 43, 41, 41, 41, 41, 41, 41, 41, 41,
- 41, 41, 41, 14, 15, 6, 5, 6, 10, 46,
- 9, 10, 11, 1, 0, 41, 41, 41, 41, 41,
- 41, 41, 41, 41, 41, 30, 41, 41, 41, 41,
- 41, 41, 41, 6, 5, 3, 10, 0, 7, 41,
- 41, 41, 41, 41, 41, 41, 41, 41, 22, 41,
- 41, 31, 32, 41, 41, 41, 0, 5, 4, 0,
- 2, 0, 41, 41, 29, 41, 20, 41, 41, 27,
-
- 41, 41, 37, 23, 41, 41, 41, 19, 0, 38,
- 33, 41, 41, 41, 24, 41, 21, 41, 41, 26,
- 41, 25, 41, 28, 39, 41, 41, 34, 41, 40,
+ 0, 0, 0, 0, 0, 0, 49, 47, 12, 11,
+ 8, 16, 17, 13, 47, 43, 18, 36, 46, 37,
+ 42, 44, 45, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 14, 15, 6, 5, 6,
+ 10, 48, 9, 10, 11, 1, 0, 43, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 31, 42,
+ 42, 42, 42, 42, 42, 42, 42, 6, 5, 3,
+ 10, 0, 7, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 22, 42, 42, 32, 42, 33, 42, 42,
+ 42, 0, 5, 4, 0, 2, 0, 42, 42, 29,
+
+ 42, 20, 42, 42, 27, 42, 42, 38, 23, 42,
+ 42, 42, 42, 19, 0, 39, 34, 42, 42, 42,
+ 24, 42, 42, 21, 42, 42, 26, 42, 25, 42,
+ 42, 28, 40, 42, 42, 42, 35, 42, 30, 41,
0
} ;
16, 1, 17, 1, 15, 1, 18, 19, 20, 21,
22, 23, 24, 25, 26, 15, 15, 27, 15, 28,
- 29, 15, 15, 30, 31, 32, 33, 34, 15, 15,
- 35, 15, 36, 1, 37, 1, 1, 1, 1, 1,
+ 29, 30, 15, 31, 32, 33, 34, 35, 15, 15,
+ 36, 15, 37, 1, 38, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
-static const YY_CHAR yy_meta[38] =
+static const YY_CHAR yy_meta[39] =
{ 0,
1, 1, 1, 1, 1, 1, 2, 1, 1, 3,
1, 1, 1, 1, 3, 1, 1, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 1, 1
+ 3, 3, 3, 3, 3, 3, 1, 1
} ;
-static const flex_int16_t yy_base[138] =
+static const flex_int16_t yy_base[148] =
{ 0,
- 0, 0, 35, 36, 37, 42, 156, 157, 157, 152,
- 157, 157, 157, 157, 41, 157, 157, 157, 157, 0,
- 157, 157, 21, 24, 129, 25, 29, 125, 32, 119,
- 129, 34, 121, 157, 157, 146, 145, 138, 143, 142,
- 141, 157, 140, 157, 139, 0, 111, 105, 110, 110,
- 119, 109, 102, 107, 104, 100, 100, 102, 97, 105,
- 98, 96, 99, 0, 121, 60, 0, 120, 157, 104,
- 93, 93, 98, 88, 95, 97, 93, 96, 91, 80,
- 87, 0, 0, 80, 38, 88, 105, 104, 103, 96,
- 157, 101, 68, 82, 0, 74, 0, 76, 72, 0,
-
- 66, 67, 0, 0, 64, 67, 74, 0, 53, 0,
- 0, 71, 74, 69, 0, 67, 0, 65, 56, 0,
- 55, 0, 67, 0, 0, 60, 50, 0, 46, 0,
- 157, 71, 74, 62, 77, 80, 83
+ 0, 0, 36, 37, 38, 43, 166, 167, 167, 162,
+ 167, 167, 167, 167, 42, 154, 167, 167, 167, 167,
+ 0, 167, 167, 21, 25, 138, 26, 30, 134, 32,
+ 127, 129, 137, 35, 129, 167, 167, 154, 153, 146,
+ 151, 150, 149, 167, 148, 167, 147, 139, 0, 117,
+ 111, 117, 117, 126, 116, 108, 114, 111, 106, 106,
+ 109, 103, 106, 111, 104, 101, 105, 0, 127, 60,
+ 0, 126, 167, 110, 99, 99, 104, 93, 101, 103,
+ 99, 102, 97, 85, 93, 0, 83, 0, 84, 36,
+ 93, 110, 109, 108, 101, 167, 106, 72, 87, 0,
+
+ 79, 0, 81, 77, 0, 70, 71, 0, 0, 72,
+ 67, 71, 78, 0, 57, 0, 0, 75, 78, 73,
+ 0, 71, 73, 0, 68, 58, 0, 57, 0, 71,
+ 59, 0, 0, 65, 66, 57, 0, 59, 0, 0,
+ 167, 70, 73, 62, 76, 79, 82
} ;
-static const flex_int16_t yy_def[138] =
+static const flex_int16_t yy_def[148] =
{ 0,
- 131, 1, 132, 132, 133, 133, 131, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 134,
- 131, 131, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131, 135, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 136, 136, 131, 137, 135, 131, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 131, 131, 131, 131,
- 131, 131, 134, 134, 134, 134, 134, 134, 134, 134,
-
- 134, 134, 134, 134, 134, 134, 134, 134, 131, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 0, 131, 131, 131, 131, 131, 131
+ 141, 1, 142, 142, 143, 143, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 144, 141, 141, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 145, 141, 144, 144,
+ 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 144, 146, 146, 141,
+ 147, 145, 141, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
+ 144, 141, 141, 141, 141, 141, 141, 144, 144, 144,
+
+ 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 141, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
+ 0, 141, 141, 141, 141, 141, 141
} ;
-static const flex_int16_t yy_nxt[195] =
+static const flex_int16_t yy_nxt[206] =
{ 0,
- 8, 9, 10, 11, 12, 13, 8, 14, 15, 8,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 20, 27, 20, 20, 28, 29, 20, 30, 31,
- 32, 20, 20, 33, 20, 34, 35, 37, 37, 40,
- 41, 38, 38, 42, 40, 41, 52, 44, 42, 45,
- 47, 48, 49, 53, 54, 55, 50, 57, 61, 90,
- 58, 91, 89, 106, 46, 62, 90, 130, 91, 129,
- 107, 36, 36, 36, 39, 39, 39, 68, 68, 68,
- 87, 128, 87, 92, 127, 92, 126, 125, 124, 123,
- 122, 121, 120, 119, 118, 117, 116, 115, 114, 113,
-
- 112, 111, 110, 67, 109, 89, 65, 64, 108, 105,
- 104, 103, 102, 101, 100, 99, 98, 97, 96, 95,
- 94, 93, 69, 88, 86, 85, 84, 83, 82, 81,
- 80, 79, 78, 77, 76, 75, 74, 73, 72, 71,
- 70, 69, 43, 67, 67, 67, 66, 65, 64, 63,
- 60, 59, 56, 51, 43, 131, 7, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131
-
+ 8, 9, 10, 11, 12, 13, 8, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 21, 28, 21, 21, 29, 30, 21, 31, 32,
+ 33, 34, 21, 21, 35, 21, 36, 37, 39, 39,
+ 42, 43, 40, 40, 44, 42, 43, 55, 46, 44,
+ 47, 50, 51, 52, 56, 57, 58, 60, 53, 65,
+ 61, 112, 94, 95, 49, 96, 95, 66, 96, 113,
+ 38, 38, 38, 41, 41, 41, 72, 72, 72, 92,
+ 140, 92, 97, 139, 97, 138, 137, 136, 135, 134,
+ 133, 132, 131, 130, 129, 128, 127, 126, 125, 124,
+
+ 123, 122, 121, 120, 119, 118, 117, 116, 71, 115,
+ 94, 69, 68, 114, 111, 110, 109, 108, 107, 106,
+ 105, 104, 103, 102, 101, 100, 99, 98, 73, 93,
+ 91, 90, 89, 88, 87, 86, 85, 84, 83, 82,
+ 81, 80, 79, 78, 77, 76, 75, 74, 48, 73,
+ 45, 71, 71, 71, 70, 69, 68, 67, 64, 63,
+ 62, 59, 54, 48, 45, 141, 7, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+
+ 141, 141, 141, 141, 141
} ;
-static const flex_int16_t yy_chk[195] =
+static const flex_int16_t yy_chk[206] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 4, 5,
- 5, 3, 4, 5, 6, 6, 26, 15, 6, 15,
- 23, 23, 24, 26, 27, 27, 24, 29, 32, 109,
- 29, 109, 66, 85, 134, 32, 66, 129, 66, 127,
- 85, 132, 132, 132, 133, 133, 133, 135, 135, 135,
- 136, 126, 136, 137, 123, 137, 121, 119, 118, 116,
- 114, 113, 112, 107, 106, 105, 102, 101, 99, 98,
-
- 96, 94, 93, 92, 90, 89, 88, 87, 86, 84,
- 81, 80, 79, 78, 77, 76, 75, 74, 73, 72,
- 71, 70, 68, 65, 63, 62, 61, 60, 59, 58,
- 57, 56, 55, 54, 53, 52, 51, 50, 49, 48,
- 47, 45, 43, 41, 40, 39, 38, 37, 36, 33,
- 31, 30, 28, 25, 10, 7, 131, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131
-
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 4,
+ 5, 5, 3, 4, 5, 6, 6, 27, 15, 6,
+ 15, 24, 24, 25, 27, 28, 28, 30, 25, 34,
+ 30, 90, 70, 115, 144, 115, 70, 34, 70, 90,
+ 142, 142, 142, 143, 143, 143, 145, 145, 145, 146,
+ 138, 146, 147, 136, 147, 135, 134, 131, 130, 128,
+ 126, 125, 123, 122, 120, 119, 118, 113, 112, 111,
+
+ 110, 107, 106, 104, 103, 101, 99, 98, 97, 95,
+ 94, 93, 92, 91, 89, 87, 85, 84, 83, 82,
+ 81, 80, 79, 78, 77, 76, 75, 74, 72, 69,
+ 67, 66, 65, 64, 63, 62, 61, 60, 59, 58,
+ 57, 56, 55, 54, 53, 52, 51, 50, 48, 47,
+ 45, 43, 42, 41, 40, 39, 38, 35, 33, 32,
+ 31, 29, 26, 16, 10, 7, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+
+ 141, 141, 141, 141, 141
} ;
/* Table of booleans, true if rule could match eol. */
-static const flex_int32_t yy_rule_can_match_eol[47] =
+static const flex_int32_t yy_rule_can_match_eol[49] =
{ 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, };
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, };
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-#line 1 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
-#line 2 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 1 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+#line 2 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
#include <stdio.h>
#include <string>
#include "idlc/ast/tidlc_y.hpp"
#define YY_USER_ACTION yylloc->columns(yyleng);
-#line 576 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_l.cpp"
+#line 581 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_l.cpp"
-#line 578 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_l.cpp"
+#line 583 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_l.cpp"
#define INITIAL 0
#define COMMENT 1
}
{
-#line 28 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 28 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
-#line 31 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 31 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
std::string comments;
std::string values;
-#line 872 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_l.cpp"
+#line 877 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_l.cpp"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 132 )
+ if ( yy_current_state >= 142 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 157 );
+ while ( yy_base[yy_current_state] != 167 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
case 1:
YY_RULE_SETUP
-#line 35 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 35 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; BEGIN(COMMENT); }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 36 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 36 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; yylloc->step(); BEGIN(INITIAL); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 37 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 37 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; comments += "\n"; BEGIN(INITIAL); }
YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 38 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 38 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; yylloc->step(); BEGIN(INITIAL); }
YY_BREAK
case 5:
/* rule 5 can match eol */
YY_RULE_SETUP
-#line 39 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 39 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; yylloc->lines(yyleng); }
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 40 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 40 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; yylloc->step(); }
YY_BREAK
case YY_STATE_EOF(COMMENT):
-#line 41 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 41 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ return 0; }
YY_BREAK
case 7:
/* rule 7 can match eol */
YY_RULE_SETUP
-#line 43 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 43 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ comments += yytext; yylloc->step(); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 45 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 45 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ BEGIN(VALUE); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 46 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 46 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
BEGIN(INITIAL);
yylval->token = new tidl::Token(values, comments);
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
-#line 51 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 51 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ values += yytext; yylloc->step(); }
YY_BREAK
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
-#line 53 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 53 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ yylloc->lines(yyleng); yylloc->step(); }
YY_BREAK
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
-#line 55 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 55 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
; // ignore all whitespace
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 56 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 56 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_COMMA; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 57 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 57 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_BRACE_OPEN; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 58 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 58 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_BRACE_CLOSE; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 59 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 59 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_LEFT; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 60 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 60 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_RIGHT; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 61 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 61 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_SEMICOLON; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 62 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 62 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_VOID;
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 66 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 66 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_CHAR;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 70 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 70 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_SHORT;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 74 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 74 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_INT;
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 78 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 78 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_LONG;
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 82 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 82 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_FLOAT;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 86 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 86 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_DOUBLE;
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 90 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 90 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_BUNDLE;
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 94 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 94 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_FILE;
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 98 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 98 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_STRING;
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 102 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 102 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_BOOL;
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 106 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
-{ return yy::parser::token::T_IN; }
+#line 106 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+{
+ yylval->token = new tidl::Token(yytext, comments);
+ return yy::parser::token::T_PROTOCOL;
+ }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 107 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
-{ return yy::parser::token::T_OUT; }
+#line 110 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+{ return yy::parser::token::T_IN; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 108 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
-{ return yy::parser::token::T_REF; }
+#line 111 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+{ return yy::parser::token::T_OUT; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 109 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
-{ return yy::parser::token::T_ASYNC; }
+#line 112 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+{ return yy::parser::token::T_REF; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 110 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
-{ return yy::parser::token::T_DELEGATE; }
+#line 113 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+{ return yy::parser::token::T_ASYNC; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 111 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
-{ return yy::parser::token::T_META_OPEN; }
+#line 114 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+{ return yy::parser::token::T_DELEGATE; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 112 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
-{ return yy::parser::token::T_META_CLOSE; }
+#line 115 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+{ return yy::parser::token::T_META_OPEN; }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 113 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 116 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+{ return yy::parser::token::T_META_CLOSE; }
+ YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 117 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_LIST;
}
YY_BREAK
-case 38:
+case 39:
YY_RULE_SETUP
-#line 117 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 121 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_ARRAY;
}
YY_BREAK
-case 39:
+case 40:
YY_RULE_SETUP
-#line 121 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 125 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_STRUCTURE;
}
YY_BREAK
-case 40:
+case 41:
YY_RULE_SETUP
-#line 125 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 129 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_INTERFACE;
}
YY_BREAK
-case 41:
+case 42:
YY_RULE_SETUP
-#line 129 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 133 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_ID;
}
YY_BREAK
-case 42:
+case 43:
+YY_RULE_SETUP
+#line 137 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
+{
+ yylval->token = new tidl::Token(yytext, comments);
+ return yy::parser::token::T_NUMBER;
+ }
+ YY_BREAK
+case 44:
YY_RULE_SETUP
-#line 133 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 141 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ // Square Bracket
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_SB_OPEN;
}
YY_BREAK
-case 43:
+case 45:
YY_RULE_SETUP
-#line 137 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 145 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ // Square Bracket
yylval->token = new tidl::Token(yytext, comments);
return yy::parser::token::T_SB_CLOSE;
}
YY_BREAK
-case 44:
+case 46:
YY_RULE_SETUP
-#line 141 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 149 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_EQUAL; }
YY_BREAK
-case 45:
+case 47:
YY_RULE_SETUP
-#line 142 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 150 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
{ return yy::parser::token::T_UNKNOWN; }
YY_BREAK
-case 46:
+case 48:
YY_RULE_SETUP
-#line 144 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 152 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
ECHO;
YY_BREAK
-#line 1240 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_l.cpp"
+#line 1261 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_l.cpp"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(VALUE):
yyterminate();
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 132 )
+ if ( yy_current_state >= 142 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 132 )
+ if ( yy_current_state >= 142 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
- yy_is_jam = (yy_current_state == 131);
+ yy_is_jam = (yy_current_state == 141);
(void)yyg;
return yy_is_jam ? 0 : yy_current_state;
#define YYTABLES_NAME "yytables"
-#line 144 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.ll"
+#line 152 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.ll"
-// A Bison parser, made by GNU Bison 3.5.1.
+// A Bison parser, made by GNU Bison 3.0.4.
// Skeleton implementation for Bison GLR parsers in C
-// Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015 Free Software Foundation, Inc.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
/* C GLR parser skeleton written by Paul Hilfinger. */
-// Undocumented macros, especially those whose name start with YY_,
-// are private implementation details. Do not rely on them.
-
/* Identify Bison output. */
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "3.5.1"
+#define YYBISON_VERSION "3.0.4"
/* Skeleton name. */
#define YYSKELETON_NAME "glr.cc"
-// First part of user prologue.
-#line 1 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
+/* First part of user declarations. */
+#line 1 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:240
#include <stdio.h>
#include <stdlib.h>
#define lex_scanner ps->Scanner()
-#line 80 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 77 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:240
-# ifndef YY_CAST
-# ifdef __cplusplus
-# define YY_CAST(Type, Val) static_cast<Type> (Val)
-# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
-# else
-# define YY_CAST(Type, Val) ((Type) (Val))
-# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
-# endif
-# endif
# ifndef YY_NULLPTR
-# if defined __cplusplus
-# if 201103L <= __cplusplus
-# define YY_NULLPTR nullptr
-# else
-# define YY_NULLPTR 0
-# endif
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
# else
-# define YY_NULLPTR ((void*)0)
+# define YY_NULLPTR 0
# endif
# endif
# endif
;
-// Second part of user prologue.
-#line 125 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
-static void yyerror (const yy::parser::location_type *yylocationp, yy::parser& yyparser, tidl::Parser* ps, const char* msg);
-#line 127 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+/* Copy the second part of user declarations. */
+#line 109 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:263
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+# ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (N) \
+ { \
+ (Current).begin = YYRHSLOC (Rhs, 1).begin; \
+ (Current).end = YYRHSLOC (Rhs, N).end; \
+ } \
+ else \
+ { \
+ (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
+ } \
+ while (/*CONSTCOND*/ false)
+# endif
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc)
+static void yyerror (const yy::parser::location_type *yylocationp, yy::parser& yyparser, tidl::Parser* ps, const char* msg);
+#line 131 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:263
-#include <stddef.h>
-#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
- <limits.h> and (if available) <stdint.h> are included
- so that the code can choose integer types of a good width. */
-
-#ifndef __PTRDIFF_MAX__
-# include <limits.h> /* INFRINGES ON USER NAME SPACE */
-# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
-# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_STDINT_H
-# endif
-#endif
-
-/* Narrow types that promote to a signed type and that can represent a
- signed or unsigned integer of at least N bits. In tables they can
- save space and decrease cache pressure. Promoting to a signed type
- helps avoid bugs in integer arithmetic. */
-
-#ifdef __INT_LEAST8_MAX__
-typedef __INT_LEAST8_TYPE__ yytype_int8;
-#elif defined YY_STDINT_H
-typedef int_least8_t yytype_int8;
-#else
-typedef signed char yytype_int8;
-#endif
-
-#ifdef __INT_LEAST16_MAX__
-typedef __INT_LEAST16_TYPE__ yytype_int16;
-#elif defined YY_STDINT_H
-typedef int_least16_t yytype_int16;
-#else
-typedef short yytype_int16;
-#endif
-
-#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST8_TYPE__ yytype_uint8;
-#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
- && UINT_LEAST8_MAX <= INT_MAX)
-typedef uint_least8_t yytype_uint8;
-#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
-typedef unsigned char yytype_uint8;
-#else
-typedef short yytype_uint8;
-#endif
-
-#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST16_TYPE__ yytype_uint16;
-#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
- && UINT_LEAST16_MAX <= INT_MAX)
-typedef uint_least16_t yytype_uint16;
-#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
-typedef unsigned short yytype_uint16;
-#else
-typedef int yytype_uint16;
-#endif
-
#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# define YYREALLOC realloc
#endif
-#define YYSIZEMAX \
- (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : YY_CAST (ptrdiff_t, SIZE_MAX))
+#define YYSIZEMAX ((size_t) -1)
#ifdef __cplusplus
- typedef bool yybool;
-# define yytrue true
-# define yyfalse false
+ typedef bool yybool;
#else
- /* When we move to stdbool, get rid of the various casts to yybool. */
- typedef signed char yybool;
-# define yytrue 1
-# define yyfalse 0
+ typedef unsigned char yybool;
#endif
+#define yytrue 1
+#define yyfalse 0
#ifndef YYSETJMP
# include <setjmp.h>
# define YYJMP_BUF jmp_buf
# define YYSETJMP(Env) setjmp (Env)
-/* Pacify Clang and ICC. */
-# define YYLONGJMP(Env, Val) \
- do { \
- longjmp (Env, Val); \
- YY_ASSERT (0); \
- } while (yyfalse)
+/* Pacify clang. */
+# define YYLONGJMP(Env, Val) (longjmp (Env, Val), YYASSERT (0))
#endif
-#ifndef YY_ATTRIBUTE_PURE
-# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
-# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
# else
-# define YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE(Spec) /* empty */
# endif
#endif
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
#ifndef YY_ATTRIBUTE_UNUSED
-# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
-# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-# else
-# define YY_ATTRIBUTE_UNUSED
-# endif
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
#endif
-/* The _Noreturn keyword of C11. */
-#ifndef _Noreturn
-# if (defined __cplusplus \
- && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
- || (defined _MSC_VER && 1900 <= _MSC_VER)))
-# define _Noreturn [[noreturn]]
-# elif ((!defined __cplusplus || defined __clang__) \
- && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
- || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)))
- /* _Noreturn works as-is. */
-# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
-# define _Noreturn __attribute__ ((__noreturn__))
-# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
# define _Noreturn __declspec (noreturn)
# else
-# define _Noreturn
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif
# define YYUSE(E) /* empty */
#endif
-#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
-#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
-# define YY_IGNORE_USELESS_CAST_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
-# define YY_IGNORE_USELESS_CAST_END \
- _Pragma ("GCC diagnostic pop")
-#endif
-#ifndef YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_END
-#endif
-
-#define YY_ASSERT(E) ((void) (0 && (E)))
+#ifndef YYASSERT
+# define YYASSERT(Condition) ((void) ((Condition) || (abort (), 0)))
+#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 19
+#define YYFINAL 23
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 388
+#define YYLAST 396
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 37
+#define YYNTOKENS 39
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 20
+#define YYNNTS 21
/* YYNRULES -- Number of rules. */
-#define YYNRULES 70
-/* YYNSTATES -- Number of states. */
-#define YYNSTATES 135
+#define YYNRULES 73
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 139
/* YYMAXRHS -- Maximum number of symbols on right-hand side of rule. */
#define YYMAXRHS 8
/* YYMAXLEFT -- Maximum number of symbols to the left of a handle
accessed by $0, $-1, etc., in any rule. */
#define YYMAXLEFT 0
-/* YYMAXUTOK -- Last valid token number (for yychar). */
-#define YYMAXUTOK 291
-/* YYFAULTYTOK -- Token number (for yychar) that denotes a
- syntax_error thrown from the scanner. */
-#define YYFAULTYTOK (YYMAXUTOK + 1)
-/* YYUNDEFTOK -- Symbol number (for yytoken) that denotes an unknown
- token. */
+/* YYTRANSLATE(X) -- Bison symbol number corresponding to X. */
#define YYUNDEFTOK 2
+#define YYMAXUTOK 293
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex, with out-of-bounds checking. */
-#define YYTRANSLATE(YYX) \
- (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex. */
-static const yytype_int8 yytranslate[] =
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const unsigned char yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
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
+ 35, 36, 37, 38
};
#if YYDEBUG
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const yytype_int16 yyrline[] =
-{
- 0, 96, 96, 101, 106, 120, 123, 128, 134, 139,
- 145, 152, 160, 171, 177, 182, 186, 190, 196, 204,
- 215, 221, 226, 232, 239, 245, 253, 258, 263, 270,
- 278, 289, 295, 308, 316, 331, 336, 341, 346, 350,
- 354, 358, 362, 368, 376, 387, 393, 396, 399, 404,
- 407, 411, 417, 420, 426, 429, 446, 449, 453, 457,
- 461, 465, 469, 473, 477, 487, 491, 495, 501, 508,
- 512
+static const unsigned short int yyrline[] =
+{
+ 0, 100, 100, 105, 110, 124, 127, 130, 135, 148,
+ 157, 163, 168, 174, 181, 189, 200, 206, 211, 215,
+ 219, 225, 233, 244, 250, 255, 261, 268, 274, 282,
+ 287, 292, 299, 307, 318, 324, 337, 345, 360, 365,
+ 370, 375, 379, 383, 387, 391, 397, 405, 416, 422,
+ 425, 428, 433, 436, 440, 446, 449, 455, 458, 475,
+ 478, 482, 486, 490, 494, 498, 502, 506, 516, 520,
+ 524, 530, 537, 541
};
#endif
"$end", "error", "$undefined", "T_LEFT", "T_RIGHT", "T_COMMA",
"T_SEMICOLON", "T_BRACE_OPEN", "T_BRACE_CLOSE", "T_IN", "T_OUT", "T_REF",
"T_ASYNC", "T_META_OPEN", "T_META_CLOSE", "T_EQUAL", "T_DELEGATE",
- "T_UNKNOWN", "T_ID", "T_STRUCTURE", "T_INTERFACE", "T_CHAR", "T_SHORT",
- "T_INT", "T_LONG", "T_FLOAT", "T_DOUBLE", "T_VOID", "T_BUNDLE",
- "T_STRING", "T_BOOL", "T_LIST", "T_ARRAY", "T_VALUE", "T_SB_OPEN",
- "T_SB_CLOSE", "T_FILE", "$accept", "start", "blocks", "block",
- "structure_block", "elements", "element", "attributes", "attribute",
- "interface_block", "declarations", "declaration", "parameter_list",
- "direction_specifier", "parameter", "parameter_type", "base_type",
- "raw_type", "container_type", "container_type_name", YY_NULLPTR
+ "T_UNKNOWN", "T_ID", "T_NUMBER", "T_STRUCTURE", "T_INTERFACE", "T_CHAR",
+ "T_SHORT", "T_INT", "T_LONG", "T_FLOAT", "T_DOUBLE", "T_VOID",
+ "T_BUNDLE", "T_STRING", "T_BOOL", "T_LIST", "T_ARRAY", "T_VALUE",
+ "T_SB_OPEN", "T_SB_CLOSE", "T_FILE", "T_PROTOCOL", "$accept", "start",
+ "blocks", "block", "protocol_block", "structure_block", "elements",
+ "element", "attributes", "attribute", "interface_block", "declarations",
+ "declaration", "parameter_list", "direction_specifier", "parameter",
+ "parameter_type", "base_type", "raw_type", "container_type",
+ "container_type_name", YY_NULLPTR
};
#endif
-#define YYPACT_NINF (-67)
-#define YYTABLE_NINF (-58)
+#define YYPACT_NINF -70
+#define YYTABLE_NINF -61
// YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
// STATE-NUM.
-static const yytype_int16 yypact[] =
-{
- -4, 24, 45, 21, 10, -4, -67, -67, -67, 69,
- 296, 5, 87, 336, 13, -67, 49, 6, -67, -67,
- -67, 296, -67, -67, -67, -67, -67, -67, -67, -67,
- -67, -67, -67, -67, -67, -67, -67, 217, -67, 20,
- -67, 4, 296, 336, -67, 42, -67, 89, -67, 52,
- -67, 336, 14, 2, 33, 34, 249, 51, -67, -67,
- 65, -67, 67, 352, 281, 121, 85, 57, 93, 117,
- -67, -67, 118, 57, 98, 153, -67, -67, -67, -67,
- 108, -67, -67, -67, -67, 113, -67, -67, -67, -67,
- -67, -67, -67, 110, 95, 352, -67, 112, -67, 57,
- -67, -67, 99, 57, -67, 124, -67, 7, 320, -67,
- -67, 101, 126, 104, 336, 127, 128, -67, 53, -67,
- 86, 185, -67, -67, -67, 129, 130, -67, 131, 132,
- -67, -67, -67, -67, -67
+static const short int yypact[] =
+{
+ -9, 15, 39, 43, 2, 14, -9, -70, -70, -70,
+ -70, 47, 302, 10, 62, 343, 45, -70, 48, 5,
+ -70, -70, -70, -70, -70, 302, -70, -70, -70, -70,
+ -70, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, 220, -70, 24, -70, 54, 302, 343, -70, 44,
+ -70, 88, -70, 50, -70, 343, 37, 3, 72, 77,
+ 253, 94, -70, -70, 96, -70, 117, 359, 286, 121,
+ 118, 55, 106, 120, -70, -70, 122, 55, 124, 154,
+ -70, -70, -70, -70, 112, -70, -70, -70, -70, 119,
+ -70, -70, -70, -70, -70, -70, -70, 113, 71, 359,
+ -70, 114, -70, 55, -70, -70, 90, 55, -70, 127,
+ -70, 7, 327, -70, -70, 100, 129, 103, 343, 130,
+ 131, -70, 85, -70, 87, 187, -70, -70, -70, 132,
+ 134, -70, 135, 136, -70, -70, -70, -70, -70
};
// YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
// Performed when YYTABLE does not specify something else to do. Zero
// means the default is an error.
-static const yytype_int8 yydefact[] =
-{
- 0, 0, 0, 0, 0, 2, 3, 6, 5, 0,
- 0, 0, 0, 0, 0, 20, 0, 0, 18, 1,
- 4, 0, 10, 17, 67, 58, 59, 60, 61, 62,
- 63, 57, 64, 65, 66, 69, 70, 0, 11, 0,
- 56, 0, 0, 0, 28, 0, 55, 0, 29, 0,
- 54, 0, 0, 0, 0, 0, 0, 17, 8, 12,
- 0, 15, 0, 0, 0, 0, 0, 0, 0, 0,
- 26, 30, 0, 0, 0, 0, 22, 23, 21, 19,
- 0, 9, 13, 16, 14, 0, 7, 27, 42, 45,
- 46, 47, 48, 50, 0, 0, 43, 0, 52, 0,
- 31, 41, 0, 0, 24, 0, 68, 0, 49, 53,
- 51, 0, 0, 0, 0, 0, 0, 44, 0, 38,
- 0, 0, 39, 40, 37, 0, 0, 32, 0, 0,
- 25, 33, 34, 35, 36
+static const unsigned char yydefact[] =
+{
+ 0, 0, 0, 0, 0, 0, 2, 3, 7, 6,
+ 5, 0, 0, 0, 0, 0, 0, 23, 0, 0,
+ 21, 9, 8, 1, 4, 0, 13, 20, 70, 61,
+ 62, 63, 64, 65, 66, 60, 67, 68, 69, 72,
+ 73, 0, 14, 0, 59, 0, 0, 0, 31, 0,
+ 58, 0, 32, 0, 57, 0, 0, 0, 0, 0,
+ 0, 20, 11, 15, 0, 18, 0, 0, 0, 0,
+ 0, 0, 0, 0, 29, 33, 0, 0, 0, 0,
+ 25, 26, 24, 22, 0, 12, 16, 19, 17, 0,
+ 10, 30, 45, 48, 49, 50, 51, 53, 0, 0,
+ 46, 0, 55, 0, 34, 44, 0, 0, 27, 0,
+ 71, 0, 52, 56, 54, 0, 0, 0, 0, 0,
+ 0, 47, 0, 41, 0, 0, 42, 43, 40, 0,
+ 0, 35, 0, 0, 28, 36, 37, 38, 39
};
// YYPGOTO[NTERM-NUM].
-static const yytype_int16 yypgoto[] =
+static const short int yypgoto[] =
{
- -67, -67, -67, 135, -67, -15, -32, -67, 102, -67,
- -42, -47, -66, -67, 47, -67, -59, -8, -67, -67
+ -70, -70, -70, 150, -70, -70, -19, -36, -70, 99,
+ -70, -46, -51, -69, -70, 49, -70, -64, -10, -70,
+ -70
};
// YYDEFGOTO[NTERM-NUM].
-static const yytype_int8 yydefgoto[] =
+static const signed char yydefgoto[] =
{
- -1, 4, 5, 6, 7, 37, 38, 17, 18, 8,
- 47, 48, 94, 95, 96, 97, 49, 50, 40, 41
+ -1, 5, 6, 7, 8, 9, 41, 42, 19, 20,
+ 10, 51, 52, 98, 99, 100, 101, 53, 54, 44,
+ 45
};
// YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
// positive, shift that token. If negative, reduce the rule whose
// number is the opposite. If YYTABLE_NINF, syntax error.
-static const yytype_int16 yytable[] =
-{
- 71, 65, 39, 77, 85, 59, 56, 102, 98, 75,
- 19, 54, 42, 39, 98, 1, 2, 63, 71, 115,
- 51, 60, 15, 116, 59, 9, 61, 64, 71, 39,
- 3, 10, 59, 111, 39, 78, 109, 113, 62, 16,
- 98, 55, 11, 66, 98, 67, 12, 76, 39, 98,
- 52, 16, 13, 72, 80, 73, 39, 82, 89, 124,
- 68, -49, -49, 14, 53, 125, 90, 91, 92, 126,
- 74, 83, 121, 84, 71, 24, 21, 22, 25, 26,
- 27, 28, 29, 30, 93, 32, 33, 34, 35, 36,
- 69, 88, 127, 46, 43, 44, 99, 70, 128, 107,
- 108, 103, 129, 112, 108, 118, 108, 24, 120, 108,
- 25, 26, 27, 28, 29, 30, 45, 32, 33, 34,
- 35, 36, 69, 100, 101, 46, 105, 106, -57, 87,
- 110, 114, 119, 122, 123, 131, 132, 133, 134, 24,
- 20, 0, 25, 26, 27, 28, 29, 30, 45, 32,
- 33, 34, 35, 36, 69, 117, 79, 46, 0, 0,
- 0, 104, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 24, 0, 0, 25, 26, 27, 28, 29, 30,
- 45, 32, 33, 34, 35, 36, 69, 0, 0, 46,
- 0, 0, 0, 130, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 24, 0, 0, 25, 26, 27, 28,
- 29, 30, 45, 32, 33, 34, 35, 36, 57, 0,
- 0, 46, 0, 0, 0, 58, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 24, 0, 0, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 57, 0, 0, 0, 0, 0, 0, 81, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 24, 0, 0,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 57, 0, 0, 0, 0, 0, 0, 86,
- 0, 0, 0, 0, 0, 0, 0, 23, 0, 24,
- 0, 0, 25, 26, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, 36, 24, 0, 0, 25, 26, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 90,
- 91, 92, 0, 0, 0, 0, 0, 0, 24, 0,
- 0, 25, 26, 27, 28, 29, 30, 93, 32, 33,
- 34, 35, 36, 0, 24, 0, 46, 25, 26, 27,
- 28, 29, 30, 45, 32, 33, 34, 35, 36, 0,
- 24, 0, 46, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 0, 0, 0, 46
+static const short int yytable[] =
+{
+ 75, 69, 43, 89, 81, 63, 60, 102, 106, 79,
+ 58, 1, 2, 102, 23, 43, 11, 46, 75, 119,
+ 21, 22, 12, 120, 63, 64, 3, 68, 75, 4,
+ 65, 43, 63, 13, 115, 113, 43, 82, 117, 102,
+ 14, 59, 66, 102, 17, 70, 15, 71, 102, 56,
+ 43, 76, 55, 77, 25, 26, 93, 16, 43, -52,
+ -52, 18, 72, 57, 94, 95, 96, 67, 78, 47,
+ 48, 80, 125, 28, 75, 111, 112, 29, 30, 31,
+ 32, 33, 34, 97, 36, 37, 38, 39, 40, 73,
+ 18, 128, 50, 131, 116, 112, 74, 129, 84, 132,
+ 86, 130, 87, 133, 122, 112, 28, 124, 112, 103,
+ 29, 30, 31, 32, 33, 34, 49, 36, 37, 38,
+ 39, 40, 73, 88, 92, 50, 104, 107, 105, 91,
+ 109, -60, 114, 110, 118, 123, 126, 127, 135, 28,
+ 136, 137, 138, 29, 30, 31, 32, 33, 34, 49,
+ 36, 37, 38, 39, 40, 73, 24, 83, 50, 0,
+ 0, 121, 108, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 28, 0, 0, 0, 29, 30, 31, 32,
+ 33, 34, 49, 36, 37, 38, 39, 40, 73, 0,
+ 0, 50, 0, 0, 0, 134, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 28, 0, 0, 0, 29,
+ 30, 31, 32, 33, 34, 49, 36, 37, 38, 39,
+ 40, 61, 0, 0, 50, 0, 0, 0, 62, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 28, 0,
+ 0, 0, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 61, 0, 0, 0, 0, 0,
+ 0, 85, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 28, 0, 0, 0, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 61, 0, 0,
+ 0, 0, 0, 0, 90, 0, 0, 0, 0, 0,
+ 0, 0, 0, 27, 28, 0, 0, 0, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 28, 0, 0, 0, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 94, 95, 96, 0,
+ 0, 0, 0, 0, 0, 28, 0, 0, 0, 29,
+ 30, 31, 32, 33, 34, 97, 36, 37, 38, 39,
+ 40, 28, 0, 0, 50, 29, 30, 31, 32, 33,
+ 34, 49, 36, 37, 38, 39, 40, 28, 0, 0,
+ 50, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 0, 0, 0, 50
};
-static const yytype_int8 yycheck[] =
-{
- 47, 43, 10, 1, 63, 37, 21, 73, 67, 51,
- 0, 5, 7, 21, 73, 19, 20, 13, 65, 12,
- 7, 1, 1, 16, 56, 1, 6, 42, 75, 37,
- 34, 7, 64, 99, 42, 33, 95, 103, 18, 18,
- 99, 35, 18, 1, 103, 3, 1, 33, 56, 108,
- 1, 18, 7, 1, 20, 3, 64, 6, 1, 6,
- 18, 4, 5, 18, 15, 12, 9, 10, 11, 16,
- 18, 6, 114, 6, 121, 18, 7, 8, 21, 22,
+static const signed char yycheck[] =
+{
+ 51, 47, 12, 67, 1, 41, 25, 71, 77, 55,
+ 5, 20, 21, 77, 0, 25, 1, 7, 69, 12,
+ 18, 19, 7, 16, 60, 1, 35, 46, 79, 38,
+ 6, 41, 68, 18, 103, 99, 46, 34, 107, 103,
+ 1, 36, 18, 107, 1, 1, 7, 3, 112, 1,
+ 60, 1, 7, 3, 7, 8, 1, 18, 68, 4,
+ 5, 18, 18, 15, 9, 10, 11, 13, 18, 7,
+ 8, 34, 118, 18, 125, 4, 5, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 1,
+ 18, 6, 37, 6, 4, 5, 8, 12, 21, 12,
+ 6, 16, 6, 16, 4, 5, 18, 4, 5, 3,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 1, 6, 6, 37, 6, 3, 6, 8,
+ 18, 18, 18, 14, 7, 6, 6, 6, 6, 18,
+ 6, 6, 6, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 1, 6, 58, 37, -1,
+ -1, 112, 8, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 18, -1, -1, -1, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 1, -1,
+ -1, 37, -1, -1, -1, 8, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 18, -1, -1, -1, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 1, 6, 6, 36, 7, 8, 3, 8, 12, 4,
- 5, 3, 16, 4, 5, 4, 5, 18, 4, 5,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 31, 32, 1, 6, 6, 36, 18, 14, 18, 8,
- 18, 7, 6, 6, 6, 6, 6, 6, 6, 18,
- 5, -1, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 1, 108, 54, 36, -1, -1,
+ 33, 1, -1, -1, 37, -1, -1, -1, 8, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 18, -1,
+ -1, -1, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 1, -1, -1, -1, -1, -1,
-1, 8, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 18, -1, -1, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 1, -1, -1, 36,
- -1, -1, -1, 8, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 18, -1, -1, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 1, -1,
- -1, 36, -1, -1, -1, 8, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 18, -1, -1, 21, 22,
+ -1, 18, -1, -1, -1, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 1, -1, -1,
+ -1, -1, -1, -1, 8, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1, 18, -1, -1, -1, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 18, -1, -1, -1, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 9, 10, 11, -1,
+ -1, -1, -1, -1, -1, 18, -1, -1, -1, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 1, -1, -1, -1, -1, -1, -1, 8, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 18, -1, -1,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 31, 32, 1, -1, -1, -1, -1, -1, -1, 8,
- -1, -1, -1, -1, -1, -1, -1, 1, -1, 18,
- -1, -1, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 18, -1, -1, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31, 32, 9,
- 10, 11, -1, -1, -1, -1, -1, -1, 18, -1,
- -1, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, -1, 18, -1, 36, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
- 18, -1, 36, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 32, -1, -1, -1, 36
+ 33, 18, -1, -1, 37, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 18, -1, -1,
+ 37, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, -1, -1, -1, 37
};
// YYSTOS[STATE-NUM] -- The (internal number of the) accessing
// symbol of state STATE-NUM.
-static const yytype_int8 yystos[] =
-{
- 0, 19, 20, 34, 38, 39, 40, 41, 46, 1,
- 7, 18, 1, 7, 18, 1, 18, 44, 45, 0,
- 40, 7, 8, 1, 18, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 42, 43, 54,
- 55, 56, 7, 7, 8, 27, 36, 47, 48, 53,
- 54, 7, 1, 15, 5, 35, 42, 1, 8, 43,
- 1, 6, 18, 13, 42, 47, 1, 3, 18, 1,
- 8, 48, 1, 3, 18, 47, 33, 1, 33, 45,
- 20, 8, 6, 6, 6, 53, 8, 8, 6, 1,
- 9, 10, 11, 27, 49, 50, 51, 52, 53, 3,
- 6, 6, 49, 3, 8, 18, 14, 4, 5, 53,
- 18, 49, 4, 49, 7, 12, 16, 51, 4, 6,
- 4, 47, 6, 6, 6, 12, 16, 6, 12, 16,
- 8, 6, 6, 6, 6
+static const unsigned char yystos[] =
+{
+ 0, 20, 21, 35, 38, 40, 41, 42, 43, 44,
+ 49, 1, 7, 18, 1, 7, 18, 1, 18, 47,
+ 48, 18, 19, 0, 42, 7, 8, 1, 18, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 45, 46, 57, 58, 59, 7, 7, 8, 28,
+ 37, 50, 51, 56, 57, 7, 1, 15, 5, 36,
+ 45, 1, 8, 46, 1, 6, 18, 13, 45, 50,
+ 1, 3, 18, 1, 8, 51, 1, 3, 18, 50,
+ 34, 1, 34, 48, 21, 8, 6, 6, 6, 56,
+ 8, 8, 6, 1, 9, 10, 11, 28, 52, 53,
+ 54, 55, 56, 3, 6, 6, 52, 3, 8, 18,
+ 14, 4, 5, 56, 18, 52, 4, 52, 7, 12,
+ 16, 54, 4, 6, 4, 50, 6, 6, 6, 12,
+ 16, 6, 12, 16, 8, 6, 6, 6, 6
};
// YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
-static const yytype_int8 yyr1[] =
-{
- 0, 37, 38, 39, 39, 40, 40, 41, 41, 41,
- 41, 42, 42, 42, 43, 43, 43, 43, 44, 44,
- 44, 45, 45, 45, 46, 46, 46, 46, 46, 47,
- 47, 47, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 49, 49, 49, 50, 50, 50, 51,
- 51, 51, 52, 52, 53, 53, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 55, 56,
- 56
+static const unsigned char yyr1[] =
+{
+ 0, 39, 40, 41, 41, 42, 42, 42, 43, 43,
+ 44, 44, 44, 44, 45, 45, 45, 46, 46, 46,
+ 46, 47, 47, 47, 48, 48, 48, 49, 49, 49,
+ 49, 49, 50, 50, 50, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 52, 52, 52, 53,
+ 53, 53, 54, 54, 54, 55, 55, 56, 56, 57,
+ 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
+ 57, 58, 59, 59
};
// YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
-static const yytype_int8 yyr2[] =
-{
- 0, 2, 1, 1, 2, 1, 1, 5, 4, 5,
- 3, 1, 2, 3, 3, 2, 3, 1, 1, 3,
- 1, 3, 3, 3, 5, 8, 4, 5, 3, 1,
- 2, 3, 6, 7, 7, 7, 7, 6, 5, 6,
- 6, 3, 3, 1, 3, 1, 1, 1, 1, 0,
- 1, 2, 1, 2, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 4, 1,
- 1
+static const unsigned char yyr2[] =
+{
+ 0, 2, 1, 1, 2, 1, 1, 1, 2, 2,
+ 5, 4, 5, 3, 1, 2, 3, 3, 2, 3,
+ 1, 1, 3, 1, 3, 3, 3, 5, 8, 4,
+ 5, 3, 1, 2, 3, 6, 7, 7, 7, 7,
+ 6, 5, 6, 6, 3, 3, 1, 3, 1, 1,
+ 1, 1, 0, 1, 2, 1, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 4, 1, 1
};
/* YYDPREC[RULE-NUM] -- Dynamic precedence of rule #RULE-NUM (0 if none). */
-static const yytype_int8 yydprec[] =
+static const unsigned char yydprec[] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0
+ 0, 0, 0, 0
};
/* YYMERGER[RULE-NUM] -- Index of merging function for rule #RULE-NUM. */
-static const yytype_int8 yymerger[] =
+static const unsigned char yymerger[] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0
+ 0, 0, 0, 0
};
/* YYIMMEDIATE[RULE-NUM] -- True iff rule #RULE-NUM is not to be deferred, as
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0
+ 0, 0, 0, 0
};
/* YYCONFLP[YYPACT[STATE-NUM]] -- Pointer into YYCONFL of start of
list of conflicting reductions corresponding to action entry for
state STATE-NUM in yytable. 0 means no conflicts. The list in
yyconfl is terminated by a rule number of 0. */
-static const yytype_int8 yyconflp[] =
+static const unsigned char yyconflp[] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0
};
/* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by
0, pointed into by YYCONFLP. */
-static const short yyconfl[] =
+static const short int yyconfl[] =
{
0
};
{ \
(Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
} \
- while (false)
+ while (/*CONSTCOND*/ false)
# endif
# define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc)
# define YYFPRINTF fprintf
# endif
-# define YY_FPRINTF \
- YY_IGNORE_USELESS_CAST_BEGIN YY_FPRINTF_
-
-# define YY_FPRINTF_(Args) \
- do { \
- YYFPRINTF Args; \
- YY_IGNORE_USELESS_CAST_END \
- } while (0)
-
-# define YY_DPRINTF \
- YY_IGNORE_USELESS_CAST_BEGIN YY_DPRINTF_
-
-# define YY_DPRINTF_(Args) \
- do { \
- if (yydebug) \
- YYFPRINTF Args; \
- YY_IGNORE_USELESS_CAST_END \
- } while (0)
-
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
YY_ATTRIBUTE_UNUSED
-static int
+static unsigned
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
{
- int res = 0;
+ unsigned res = 0;
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
if (0 <= yylocp->first_line)
{
#endif
+# define YYDPRINTF(Args) \
+ do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+ } while (0)
+
/*--------------------.
| Print this symbol. |
do { \
if (yydebug) \
{ \
- YY_FPRINTF ((stderr, "%s ", Title)); \
+ YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, Type, Value, Location, yyparser, ps); \
- YY_FPRINTF ((stderr, "\n")); \
+ YYFPRINTF (stderr, "\n"); \
} \
} while (0)
int yydebug;
struct yyGLRStack;
-static void yypstack (struct yyGLRStack* yystackp, ptrdiff_t yyk)
+static void yypstack (struct yyGLRStack* yystackp, size_t yyk)
YY_ATTRIBUTE_UNUSED;
static void yypdumpstack (struct yyGLRStack* yystackp)
YY_ATTRIBUTE_UNUSED;
#else /* !YYDEBUG */
-# define YY_DPRINTF(Args) do {} while (yyfalse)
+# define YYDPRINTF(Args)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#endif /* !YYDEBUG */
backslash-backslash). YYSTR is taken from yytname. If YYRES is
null, do not copy; instead, return the length of what the result
would have been. */
-static ptrdiff_t
+static size_t
yytnamerr (char *yyres, const char *yystr)
{
if (*yystr == '"')
{
- ptrdiff_t yyn = 0;
+ size_t yyn = 0;
char const *yyp = yystr;
for (;;)
case '\\':
if (*++yyp != '\\')
goto do_not_strip_quotes;
- else
- goto append;
-
- append:
+ /* Fall through. */
default:
if (yyres)
yyres[yyn] = *yyp;
do_not_strip_quotes: ;
}
- if (yyres)
- return yystpcpy (yyres, yystr) - yyres;
- else
- return YY_CAST (ptrdiff_t, strlen (yystr));
+ if (! yyres)
+ return strlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
}
# endif
#endif /* !YYERROR_VERBOSE */
-/** State numbers. */
+/** State numbers, as in LALR(1) machine */
typedef int yyStateNum;
-/** Rule numbers. */
+/** Rule numbers, as in LALR(1) machine */
typedef int yyRuleNum;
-/** Grammar symbol. */
+/** Grammar symbol */
typedef int yySymbol;
-/** Item references. */
-typedef short yyItemNum;
+/** Item references, as in LALR(1) machine */
+typedef short int yyItemNum;
typedef struct yyGLRState yyGLRState;
typedef struct yyGLRStateSet yyGLRStateSet;
/** Preceding state in this stack */
yyGLRState* yypred;
/** Source position of the last token produced by my symbol */
- ptrdiff_t yyposn;
+ size_t yyposn;
union {
/** First in a chain of alternative reductions producing the
- * nonterminal corresponding to this state, threaded through
+ * non-terminal corresponding to this state, threaded through
* yynext. */
yySemanticOption* yyfirstVal;
/** Semantic value for this state. */
* operation, yylookaheadNeeds[0] is not maintained since it would merely
* duplicate yychar != YYEMPTY. */
yybool* yylookaheadNeeds;
- ptrdiff_t yysize;
- ptrdiff_t yycapacity;
+ size_t yysize, yycapacity;
};
struct yySemanticOption {
YYJMP_BUF yyexception_buffer;
yyGLRStackItem* yyitems;
yyGLRStackItem* yynextFree;
- ptrdiff_t yyspaceLeft;
+ size_t yyspaceLeft;
yyGLRState* yysplitPoint;
yyGLRState* yylastDeleted;
yyGLRStateSet yytops;
static void yyexpandGLRStack (yyGLRStack* yystackp);
#endif
-_Noreturn static void
+static _Noreturn void
yyFail (yyGLRStack* yystackp, YYLTYPE *yylocp, yy::parser& yyparser, tidl::Parser* ps, const char* yymsg)
{
if (yymsg != YY_NULLPTR)
YYLONGJMP (yystackp->yyexception_buffer, 1);
}
-_Noreturn static void
+static _Noreturn void
yyMemoryExhausted (yyGLRStack* yystackp)
{
YYLONGJMP (yystackp->yyexception_buffer, 2);
static inline const char*
yytokenName (yySymbol yytoken)
{
- return yytoken == YYEMPTY ? "" : yytname[yytoken];
+ if (yytoken == YYEMPTY)
+ return "";
+
+ return yytname[yytoken];
}
#endif
}
}
-
-/** If yychar is empty, fetch the next token. */
-static inline yySymbol
-yygetToken (int *yycharp, yyGLRStack* yystackp, yy::parser& yyparser, tidl::Parser* ps)
-{
- yySymbol yytoken;
- YYUSE (yyparser);
- YYUSE (ps);
- if (*yycharp == YYEMPTY)
- {
- YY_DPRINTF ((stderr, "Reading a token: "));
-#if YY_EXCEPTIONS
- try
- {
-#endif // YY_EXCEPTIONS
- *yycharp = yylex (&yylval, &yylloc, lex_scanner);
-#if YY_EXCEPTIONS
- }
- catch (const yy::parser::syntax_error& yyexc)
- {
- YY_DPRINTF ((stderr, "Caught exception: %s\n", yyexc.what()));
- yylloc = yyexc.location;
- yyerror (&yylloc, yyparser, ps, yyexc.what ());
- // Map errors caught in the scanner to the undefined token
- // (YYUNDEFTOK), so that error handling is started.
- // However, record this with this special value of yychar.
- *yycharp = YYFAULTYTOK;
- }
-#endif // YY_EXCEPTIONS
- }
- if (*yycharp <= YYEOF)
- {
- *yycharp = yytoken = YYEOF;
- YY_DPRINTF ((stderr, "Now at end of input.\n"));
- }
- else
- {
- yytoken = YYTRANSLATE (*yycharp);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
- }
- return yytoken;
-}
-
/* Do nothing if YYNORMAL or if *YYLOW <= YYLOW1. Otherwise, fill in
* YYVSP[YYLOW1 .. *YYLOW-1] as in yyfillin and set *YYLOW = YYLOW1.
* For convenience, always return YYLOW1. */
* (@$). Returns yyok for normal return, yyaccept for YYACCEPT,
* yyerr for YYERROR, yyabort for YYABORT. */
static YYRESULTTAG
-yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
+yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp,
yyGLRStack* yystackp,
YYSTYPE* yyvalp, YYLTYPE *yylocp, yy::parser& yyparser, tidl::Parser* ps)
{
- yybool yynormal YY_ATTRIBUTE_UNUSED = yystackp->yysplitPoint == YY_NULLPTR;
+ yybool yynormal YY_ATTRIBUTE_UNUSED = (yystackp->yysplitPoint == YY_NULLPTR);
int yylow;
YYUSE (yyvalp);
YYUSE (yylocp);
# undef yyclearin
# define yyclearin (yychar = YYEMPTY)
# undef YYFILL
-# define YYFILL(N) yyfill (yyvsp, &yylow, (N), yynormal)
+# define YYFILL(N) yyfill (yyvsp, &yylow, N, yynormal)
# undef YYBACKUP
# define YYBACKUP(Token, Value) \
return yyerror (yylocp, yyparser, ps, YY_("syntax error: cannot back up")), \
*yyvalp = yyval_default;
else
*yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yysval;
- /* Default location. */
YYLLOC_DEFAULT ((*yylocp), (yyvsp - yyrhslen), yyrhslen);
yystackp->yyerror_range[1].yystate.yyloc = *yylocp;
-#if YY_EXCEPTIONS
- typedef yy::parser::syntax_error syntax_error;
- try
- {
-#endif // YY_EXCEPTIONS
switch (yyn)
{
- case 2:
-#line 96 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->SetDoc((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.doc));
+ case 2:
+#line 100 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->SetDoc((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.doc));
}
-#line 1247 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1102 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 3:
-#line 101 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+#line 105 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
((*yyvalp).doc) = new tidl::Document();
- if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk) != NULL)
- ((*yyvalp).doc)->AddBlock((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk));
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk) != NULL)
+ ((*yyvalp).doc)->AddBlock((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk));
}
-#line 1257 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1112 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 4:
-#line 106 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).doc) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.doc);
-
- if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk) != NULL) {
- if (((*yyvalp).doc)->ExistBlock((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk))) {
- ps->ReportError("syntax error. \"Already Exists\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk)->GetLine());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk);
+#line 110 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).doc) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.doc);
+
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk) != NULL) {
+ if (((*yyvalp).doc)->ExistBlock((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk))) {
+ ps->ReportError("syntax error. \"Already Exists\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk)->GetLine());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk);
} else {
- ((*yyvalp).doc)->AddBlock((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk));
+ ((*yyvalp).doc)->AddBlock((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk));
}
}
}
-#line 1274 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1129 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 5:
-#line 120 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).blk) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.interf);
+#line 124 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).blk) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.interf);
}
-#line 1282 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1137 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 6:
-#line 123 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).blk) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.structure);
+#line 127 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).blk) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.structure);
}
-#line 1290 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1145 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 7:
-#line 128 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).structure) = new tidl::Structure((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.elms), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->GetComments(),
- (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+#line 130 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).blk) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.blk);
}
-#line 1301 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1153 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 8:
-#line 134 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error. \"No identifier\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
- ((*yyvalp).structure) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+#line 135 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ int ver = atoi((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString().c_str());
+
+ if (ver < 1) {
+ ps->ReportError("syntax error in protocol version : " + (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
+ } else {
+ ps->SetVersion(ver);
+ }
+ ((*yyvalp).blk) = NULL;
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1311 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1171 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 9:
-#line 139 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+#line 148 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in protocol version : " + (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
+ ((*yyvalp).blk) = NULL;
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ }
+#line 1183 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 10:
+#line 157 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).structure) = new tidl::Structure((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.elms), (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->GetComments(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+ }
+#line 1194 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 11:
+#line 163 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
+ ((*yyvalp).structure) = NULL;
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+ }
+#line 1204 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 12:
+#line 168 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
ps->ReportError("syntax error. \"Please check it before an open brace.\"",
- (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
((*yyvalp).structure) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
}
-#line 1322 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1215 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 10:
-#line 145 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in structure declaration.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
+ case 13:
+#line 174 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in structure declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).structure) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
}
-#line 1332 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1225 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 11:
-#line 152 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+ case 14:
+#line 181 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
((*yyvalp).elms) = new (std::nothrow) tidl::Elements();
if (((*yyvalp).elms) != nullptr) {
- if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm) != nullptr) {
- ((*yyvalp).elms)->Add(std::unique_ptr<tidl::Element>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm)));
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm) != nullptr) {
+ ((*yyvalp).elms)->Add(std::unique_ptr<tidl::Element>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm)));
}
}
}
-#line 1345 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1238 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 12:
-#line 160 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).elms) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.elms);
- if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm) != nullptr) {
- if (((*yyvalp).elms)->Exist(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm))) {
- ps->ReportError("syntax error. \"Already Exists\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm)->GetLine());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm);
+ case 15:
+#line 189 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).elms) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.elms);
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm) != nullptr) {
+ if (((*yyvalp).elms)->Exist(*(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm))) {
+ ps->ReportError("syntax error. \"Already Exists\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm)->GetLine());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm);
} else {
- ((*yyvalp).elms)->Add(std::unique_ptr<tidl::Element>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm)));
+ ((*yyvalp).elms)->Add(std::unique_ptr<tidl::Element>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.elm)));
}
}
}
-#line 1361 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1254 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 13:
-#line 171 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in elements declarations.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line);
- ((*yyvalp).elms) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.elms);
+ case 16:
+#line 200 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in elements declarations.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line);
+ ((*yyvalp).elms) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.elms);
}
-#line 1370 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1263 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 14:
-#line 177 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).elm) = new tidl::Element((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token)->ToString(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.b_type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.b_type)->GetComments(),
- (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token);
+ case 17:
+#line 206 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).elm) = new tidl::Element((((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.b_type), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.b_type)->GetComments(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.token);
}
-#line 1380 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1273 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 15:
-#line 182 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error. \"No identifier\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ case 18:
+#line 211 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).elm) = NULL;
}
-#line 1389 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1282 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 16:
-#line 186 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in element declaration.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
+ case 19:
+#line 215 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in element declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).elm) = NULL;
}
-#line 1398 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1291 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 17:
-#line 190 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in element declaration.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ case 20:
+#line 219 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in element declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).elm) = NULL;
}
-#line 1407 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1300 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 18:
-#line 196 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+ case 21:
+#line 225 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
((*yyvalp).attrs) = new (std::nothrow) tidl::Attributes();
if (((*yyvalp).attrs) != nullptr) {
- if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr) != nullptr) {
- ((*yyvalp).attrs)->Add(std::unique_ptr<tidl::Attribute>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr)));
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr) != nullptr) {
+ ((*yyvalp).attrs)->Add(std::unique_ptr<tidl::Attribute>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr)));
}
}
}
-#line 1420 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1313 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 19:
-#line 204 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).attrs) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.attrs);
- if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr) != nullptr) {
- if (((*yyvalp).attrs)->Exist(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr))) {
- ps->ReportError("syntax error. \"Already Exist\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr)->GetLine());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr);
+ case 22:
+#line 233 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).attrs) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.attrs);
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr) != nullptr) {
+ if (((*yyvalp).attrs)->Exist(*(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr))) {
+ ps->ReportError("syntax error. \"Already Exist\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr)->GetLine());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr);
} else {
- ((*yyvalp).attrs)->Add(std::unique_ptr<tidl::Attribute>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr)));
+ ((*yyvalp).attrs)->Add(std::unique_ptr<tidl::Attribute>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.attr)));
}
}
}
-#line 1436 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1329 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 20:
-#line 215 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in attributes", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ case 23:
+#line 244 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in attributes", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).attrs) = new tidl::Attributes();
}
-#line 1445 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1338 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 21:
-#line 221 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).attr) = new tidl::Attribute((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token)->ToString(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ case 24:
+#line 250 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).attr) = new tidl::Attribute((((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1455 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1348 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 22:
-#line 226 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in attribute declaration.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
+ case 25:
+#line 255 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in attribute declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).attr) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1466 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1359 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 23:
-#line 232 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in attribute declaration.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ case 26:
+#line 261 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in attribute declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).attr) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
}
-#line 1476 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1369 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 24:
-#line 239 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).interf) = new tidl::Interface((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->GetComments(),
- new tidl::Attributes(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+ case 27:
+#line 268 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).interf) = new tidl::Interface((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls), (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->GetComments(),
+ new tidl::Attributes(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
}
-#line 1487 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1380 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 25:
-#line 245 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).interf) = new tidl::Interface((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.token)->GetComments(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.attrs),
- (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yyloc).begin.line);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.token);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+ case 28:
+#line 274 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).interf) = new tidl::Interface((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls), (((yyGLRStackItem const *)yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.token)->GetComments(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.attrs),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-7)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-7)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
}
-#line 1500 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1393 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 26:
-#line 253 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error. \"No identifier\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
+ case 29:
+#line 282 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
((*yyvalp).interf) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
}
-#line 1510 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1403 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 27:
-#line 258 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in interface declaration.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
+ case 30:
+#line 287 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in interface declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
((*yyvalp).interf) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
}
-#line 1520 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1413 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 28:
-#line 263 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in interface declaration.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
+ case 31:
+#line 292 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in interface declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).interf) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.token);
}
-#line 1530 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1423 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 29:
-#line 270 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+ case 32:
+#line 299 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
((*yyvalp).decls) = new (std::nothrow) tidl::Declarations();
if (((*yyvalp).decls) != nullptr) {
- if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl) != nullptr) {
- ((*yyvalp).decls)->Add(std::unique_ptr<tidl::Declaration>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl)));
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl) != nullptr) {
+ ((*yyvalp).decls)->Add(std::unique_ptr<tidl::Declaration>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl)));
}
}
}
-#line 1543 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1436 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 30:
-#line 278 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).decls) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls);
- if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl) != nullptr) {
- if (((*yyvalp).decls)->Exist(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl))) {
- ps->ReportError("syntax error. \"Already Exists\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl)->GetLine());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl);
+ case 33:
+#line 307 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).decls) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.decls);
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl) != nullptr) {
+ if (((*yyvalp).decls)->Exist(*(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl))) {
+ ps->ReportError("syntax error. \"Already Exists\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl)->GetLine());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl);
} else {
- ((*yyvalp).decls)->Add(std::unique_ptr<tidl::Declaration>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl)));
+ ((*yyvalp).decls)->Add(std::unique_ptr<tidl::Declaration>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.decl)));
}
}
}
-#line 1559 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1452 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 31:
-#line 289 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in methods declaration.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
- ((*yyvalp).decls) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.decls);
+ case 34:
+#line 318 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in methods declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
+ ((*yyvalp).decls) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.decls);
}
-#line 1568 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1461 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 32:
-#line 295 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+ case 35:
+#line 324 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
if (ps->IsGroupEnabled()) {
- ps->ReportError("Group does not support 'sync' method type", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line);
+ ps->ReportError("Group does not support 'sync' method type", (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
} else {
- ((*yyvalp).decl) = new tidl::Declaration((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->ToString(),
- std::unique_ptr<tidl::BaseType>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.b_type)),
- std::unique_ptr<tidl::Parameters>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.params)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.b_type)->GetComments(),
- (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line, tidl::Declaration::MethodType::SYNC);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
+ ((*yyvalp).decl) = new tidl::Declaration((((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token)->ToString(),
+ std::unique_ptr<tidl::BaseType>((((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.b_type)),
+ std::unique_ptr<tidl::Parameters>((((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.params)), (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.b_type)->GetComments(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line, tidl::Declaration::MethodType::SYNC);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
}
}
-#line 1586 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1479 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 33:
-#line 308 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).decl) = new tidl::Declaration((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token)->ToString(),
- std::unique_ptr<tidl::BaseType>(new tidl::BaseType("void", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token)->GetComments())),
- std::unique_ptr<tidl::Parameters>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.params)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token)->GetComments(),
- (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yyloc).begin.line, tidl::Declaration::MethodType::ASYNC);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
+ case 36:
+#line 337 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).decl) = new tidl::Declaration((((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token)->ToString(),
+ std::unique_ptr<tidl::BaseType>(new tidl::BaseType("void", (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token)->GetComments())),
+ std::unique_ptr<tidl::Parameters>((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.params)), (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token)->GetComments(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yyloc).begin.line, tidl::Declaration::MethodType::ASYNC);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
}
-#line 1599 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1492 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 34:
-#line 316 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+ case 37:
+#line 345 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
if (ps->IsGroupEnabled()) {
- ps->ReportError("Group does not support 'delegate' method type", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yyloc).begin.line);
+ ps->ReportError("Group does not support 'delegate' method type", (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
} else {
- ((*yyvalp).decl) = new tidl::Declaration((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token)->ToString(),
- std::unique_ptr<tidl::BaseType>(new tidl::BaseType("void", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token)->GetComments())),
- std::unique_ptr<tidl::Parameters>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.params)), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token)->GetComments(),
- (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yyloc).begin.line, tidl::Declaration::MethodType::DELEGATE);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
+ ((*yyvalp).decl) = new tidl::Declaration((((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token)->ToString(),
+ std::unique_ptr<tidl::BaseType>(new tidl::BaseType("void", (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token)->GetComments())),
+ std::unique_ptr<tidl::Parameters>((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.params)), (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token)->GetComments(),
+ (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yyloc).begin.line, tidl::Declaration::MethodType::DELEGATE);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-6)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
}
}
-#line 1619 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1512 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 35:
-#line 331 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in method declaration.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line);
+ case 38:
+#line 360 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in method declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
}
-#line 1629 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1522 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 36:
-#line 336 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in method declaration.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line);
+ case 39:
+#line 365 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in method declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-5)].yystate.yysemantics.yysval.token);
}
-#line 1639 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1532 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 37:
-#line 341 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error. \"No async\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ case 40:
+#line 370 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error. \"No async\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval.token);
}
-#line 1649 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1542 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 38:
-#line 346 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error. \"No identifier\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
+ case 41:
+#line 375 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
}
-#line 1658 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1551 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 39:
-#line 350 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error. \"No identifier\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
+ case 42:
+#line 379 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
}
-#line 1667 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1560 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 40:
-#line 354 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error. \"No identifier\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
+ case 43:
+#line 383 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
}
-#line 1676 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1569 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 41:
-#line 358 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in method declaration.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
+ case 44:
+#line 387 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in method declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
}
-#line 1685 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1578 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 42:
-#line 362 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in method declaration.", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
+ case 45:
+#line 391 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in method declaration.", (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
((*yyvalp).decl) = NULL;
}
-#line 1694 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1587 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 43:
-#line 368 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+ case 46:
+#line 397 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
((*yyvalp).params) = new tidl::Parameters();
if (((*yyvalp).params) != nullptr) {
- if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param) != nullptr) {
- ((*yyvalp).params)->Add(std::unique_ptr<tidl::Parameter>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param)));
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param) != nullptr) {
+ ((*yyvalp).params)->Add(std::unique_ptr<tidl::Parameter>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param)));
}
}
}
-#line 1707 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1600 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 44:
-#line 376 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).params) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.params);
- if ((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param) != nullptr) {
- if (((*yyvalp).params)->Exist(*(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param))) {
- ps->ReportError("syntax error. \"Already Exists\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param)->GetLine());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param);
+ case 47:
+#line 405 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).params) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval.params);
+ if ((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param) != nullptr) {
+ if (((*yyvalp).params)->Exist(*(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param))) {
+ ps->ReportError("syntax error. \"Already Exists\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param)->GetLine());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param);
} else {
- ((*yyvalp).params)->Add(std::unique_ptr<tidl::Parameter>((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param)));
+ ((*yyvalp).params)->Add(std::unique_ptr<tidl::Parameter>((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.param)));
}
}
}
-#line 1723 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1616 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 45:
-#line 387 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ps->ReportError("syntax error in parameter list", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ case 48:
+#line 416 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ps->ReportError("syntax error in parameter list", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).params) = new tidl::Parameters();
}
-#line 1732 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1625 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 46:
-#line 393 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+ case 49:
+#line 422 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
((*yyvalp).direction) = new tidl::Token("in", "");
}
-#line 1740 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1633 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 47:
-#line 396 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+ case 50:
+#line 425 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
((*yyvalp).direction) = new tidl::Token("out", "");
}
-#line 1748 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1641 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 48:
-#line 399 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+ case 51:
+#line 428 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
((*yyvalp).direction) = new tidl::Token("ref", "");
}
-#line 1756 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1649 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 49:
-#line 404 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+ case 52:
+#line 433 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
((*yyvalp).param) = nullptr;
}
-#line 1764 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1657 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 50:
-#line 407 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+ case 53:
+#line 436 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
((*yyvalp).param) = nullptr;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1773 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1666 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 51:
-#line 411 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).param) = new tidl::Parameter((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.p_type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ case 54:
+#line 440 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).param) = new tidl::Parameter((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.p_type), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1782 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1675 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 52:
-#line 417 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).p_type) = new tidl::ParameterType((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type));
+ case 55:
+#line 446 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).p_type) = new tidl::ParameterType((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type));
}
-#line 1790 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1683 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 53:
-#line 420 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).p_type) = new tidl::ParameterType((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.direction)->ToString());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.direction);
+ case 56:
+#line 449 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).p_type) = new tidl::ParameterType((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type), (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.direction)->ToString());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.direction);
}
-#line 1799 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1692 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 54:
-#line 426 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type);
+ case 57:
+#line 455 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type);
}
-#line 1807 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1700 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
- case 55:
-#line 429 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
+ case 58:
+#line 458 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
if (ps->IsGroupEnabled()) {
- ps->ReportError("Group does not support 'file' type", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ ps->ReportError("Group does not support 'file' type", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).b_type) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
- } else if (!ps->IsBetaEnabled()) {
- ps->ReportError("syntax error. \"No identifier\".", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
- ps->ReportError("try to use beta version (-b option).", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ } else if (!ps->IsBetaEnabled() && ps->GetVersion() < 2) {
+ ps->ReportError("syntax error. \"No identifier\".", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ ps->ReportError("try to use beta version (-b option).", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
((*yyvalp).b_type) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
} else {
- ((*yyvalp).b_type) = new tidl::BaseType("file", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ ((*yyvalp).b_type) = new tidl::BaseType("file", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
}
-#line 1827 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
- break;
-
- case 56:
-#line 446 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type);
- }
-#line 1835 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
- break;
-
- case 57:
-#line 449 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = new tidl::BaseType("void", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
- }
-#line 1844 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
- break;
-
- case 58:
-#line 453 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = new tidl::BaseType("char", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
- }
-#line 1853 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1720 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 59:
-#line 457 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = new tidl::BaseType("short", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+#line 475 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.b_type);
}
-#line 1862 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1728 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 60:
-#line 461 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = new tidl::BaseType("int", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+#line 478 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = new tidl::BaseType("void", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1871 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1737 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 61:
-#line 465 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = new tidl::BaseType("long", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+#line 482 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = new tidl::BaseType("char", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1880 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1746 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 62:
-#line 469 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = new tidl::BaseType("float", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+#line 486 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = new tidl::BaseType("short", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1889 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1755 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 63:
-#line 473 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = new tidl::BaseType("double", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+#line 490 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = new tidl::BaseType("int", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1898 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1764 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 64:
-#line 477 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- if (ps->IsCionEnabled()) {
- ps->ReportError("Cion does not support 'bundle' type", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
- ((*yyvalp).b_type) = NULL;
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
- } else {
- ((*yyvalp).b_type) = new tidl::BaseType("bundle", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
- }
+#line 494 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = new tidl::BaseType("long", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1913 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1773 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 65:
-#line 487 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = new tidl::BaseType("string", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+#line 498 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = new tidl::BaseType("float", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1922 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1782 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 66:
-#line 491 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = new tidl::BaseType("bool", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+#line 502 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = new tidl::BaseType("double", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1931 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1791 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 67:
-#line 495 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = new tidl::BaseType((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments(), true);
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+#line 506 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ if (ps->IsCionEnabled()) {
+ ps->ReportError("Cion does not support 'bundle' type", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc).begin.line);
+ ((*yyvalp).b_type) = NULL;
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ } else {
+ ((*yyvalp).b_type) = new tidl::BaseType("bundle", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ }
}
-#line 1940 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1806 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 68:
-#line 501 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).b_type) = new tidl::BaseType((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->GetComments());
- ((*yyvalp).b_type)->SetMetaType((YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.b_type));
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+#line 516 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = new tidl::BaseType("string", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1950 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1815 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 69:
-#line 508 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).token) = new tidl::Token("list", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+#line 520 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = new tidl::BaseType("bool", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1959 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1824 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
case 70:
-#line 512 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
- {
- ((*yyvalp).token) = new tidl::Token("array", (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
- delete (YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+#line 524 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = new tidl::BaseType((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments(), true);
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#line 1968 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 1833 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
break;
+ case 71:
+#line 530 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).b_type) = new tidl::BaseType((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->ToString(), (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token)->GetComments());
+ ((*yyvalp).b_type)->SetMetaType((((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.b_type));
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.token);
+ }
+#line 1843 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
-#line 1972 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
-
- default: break;
+ case 72:
+#line 537 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
+ {
+ ((*yyvalp).token) = new tidl::Token("list", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
}
-#if YY_EXCEPTIONS
- }
- catch (const syntax_error& yyexc)
+#line 1852 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+ case 73:
+#line 541 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:816
{
- YY_DPRINTF ((stderr, "Caught exception: %s\n", yyexc.what()));
- *yylocp = yyexc.location;
- yyerror (yylocp, yyparser, ps, yyexc.what ());
- YYERROR;
+ ((*yyvalp).token) = new tidl::Token("array", (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token)->GetComments());
+ delete (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.token);
+ }
+#line 1861 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ break;
+
+
+#line 1865 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:816
+ default: break;
}
-#endif // YY_EXCEPTIONS
return yyok;
# undef yyerrok
if (yydebug)
{
if (yys->yysemantics.yyfirstVal)
- YY_FPRINTF ((stderr, "%s unresolved", yymsg));
+ YYFPRINTF (stderr, "%s unresolved", yymsg);
else
- YY_FPRINTF ((stderr, "%s incomplete", yymsg));
+ YYFPRINTF (stderr, "%s incomplete", yymsg);
YY_SYMBOL_PRINT ("", yystos[yys->yylrState], YY_NULLPTR, &yys->yyloc);
}
#endif
return yyr1[yyrule];
}
-#define yypact_value_is_default(Yyn) \
- ((Yyn) == YYPACT_NINF)
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-70)))
/** True iff LR state YYSTATE has only a default reduction (regardless
* of token). */
return yydefact[yystate];
}
-#define yytable_value_is_error(Yyn) \
+#define yytable_value_is_error(Yytable_value) \
0
-/** The action to take in YYSTATE on seeing YYTOKEN.
+/** Set *YYACTION to the action to take in YYSTATE on seeing YYTOKEN.
* Result R means
* R < 0: Reduce on rule -R.
* R = 0: Error.
* Set *YYCONFLICTS to a pointer into yyconfl to a 0-terminated list
* of conflicting reductions.
*/
-static inline int
-yygetLRActions (yyStateNum yystate, yySymbol yytoken, const short** yyconflicts)
+static inline void
+yygetLRActions (yyStateNum yystate, int yytoken,
+ int* yyaction, const short int** yyconflicts)
{
int yyindex = yypact[yystate] + yytoken;
- if (yyisDefaultedState (yystate)
+ if (yypact_value_is_default (yypact[yystate])
|| yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
{
+ *yyaction = -yydefact[yystate];
*yyconflicts = yyconfl;
- return -yydefact[yystate];
}
else if (! yytable_value_is_error (yytable[yyindex]))
{
+ *yyaction = yytable[yyindex];
*yyconflicts = yyconfl + yyconflp[yyindex];
- return yytable[yyindex];
}
else
{
+ *yyaction = 0;
*yyconflicts = yyconfl + yyconflp[yyindex];
- return 0;
}
}
* alternative actions for YYSTATE. Assumes that YYRHS comes from
* stack #YYK of *YYSTACKP. */
static void
-yyaddDeferredAction (yyGLRStack* yystackp, ptrdiff_t yyk, yyGLRState* yystate,
+yyaddDeferredAction (yyGLRStack* yystackp, size_t yyk, yyGLRState* yystate,
yyGLRState* yyrhs, yyRuleNum yyrule)
{
yySemanticOption* yynewOption =
&yynewGLRStackItem (yystackp, yyfalse)->yyoption;
- YY_ASSERT (!yynewOption->yyisState);
+ YYASSERT (!yynewOption->yyisState);
yynewOption->yystate = yyrhs;
yynewOption->yyrule = yyrule;
if (yystackp->yytops.yylookaheadNeeds[yyk])
{
yyset->yysize = 1;
yyset->yycapacity = 16;
- yyset->yystates
- = YY_CAST (yyGLRState**,
- YYMALLOC (YY_CAST (size_t, yyset->yycapacity)
- * sizeof yyset->yystates[0]));
+ yyset->yystates = (yyGLRState**) YYMALLOC (16 * sizeof yyset->yystates[0]);
if (! yyset->yystates)
return yyfalse;
yyset->yystates[0] = YY_NULLPTR;
- yyset->yylookaheadNeeds
- = YY_CAST (yybool*,
- YYMALLOC (YY_CAST (size_t, yyset->yycapacity)
- * sizeof yyset->yylookaheadNeeds[0]));
+ yyset->yylookaheadNeeds =
+ (yybool*) YYMALLOC (16 * sizeof yyset->yylookaheadNeeds[0]);
if (! yyset->yylookaheadNeeds)
{
YYFREE (yyset->yystates);
return yyfalse;
}
- memset (yyset->yylookaheadNeeds,
- 0,
- YY_CAST (size_t, yyset->yycapacity) * sizeof yyset->yylookaheadNeeds[0]);
return yytrue;
}
/** Initialize *YYSTACKP to a single empty stack, with total maximum
* capacity for all stacks of YYSIZE. */
static yybool
-yyinitGLRStack (yyGLRStack* yystackp, ptrdiff_t yysize)
+yyinitGLRStack (yyGLRStack* yystackp, size_t yysize)
{
yystackp->yyerrState = 0;
yynerrs = 0;
yystackp->yyspaceLeft = yysize;
- yystackp->yyitems
- = YY_CAST (yyGLRStackItem*,
- YYMALLOC (YY_CAST (size_t, yysize)
- * sizeof yystackp->yynextFree[0]));
+ yystackp->yyitems =
+ (yyGLRStackItem*) YYMALLOC (yysize * sizeof yystackp->yynextFree[0]);
if (!yystackp->yyitems)
return yyfalse;
yystackp->yynextFree = yystackp->yyitems;
#if YYSTACKEXPANDABLE
-# define YYRELOC(YYFROMITEMS, YYTOITEMS, YYX, YYTYPE) \
- &((YYTOITEMS) \
- - ((YYFROMITEMS) - YY_REINTERPRET_CAST (yyGLRStackItem*, (YYX))))->YYTYPE
+# define YYRELOC(YYFROMITEMS,YYTOITEMS,YYX,YYTYPE) \
+ &((YYTOITEMS) - ((YYFROMITEMS) - (yyGLRStackItem*) (YYX)))->YYTYPE
/** If *YYSTACKP is expandable, extend it. WARNING: Pointers into the
stack from outside should be considered invalid after this call.
{
yyGLRStackItem* yynewItems;
yyGLRStackItem* yyp0, *yyp1;
- ptrdiff_t yynewSize;
- ptrdiff_t yyn;
- ptrdiff_t yysize = yystackp->yynextFree - yystackp->yyitems;
+ size_t yynewSize;
+ size_t yyn;
+ size_t yysize = yystackp->yynextFree - yystackp->yyitems;
if (YYMAXDEPTH - YYHEADROOM < yysize)
yyMemoryExhausted (yystackp);
yynewSize = 2*yysize;
if (YYMAXDEPTH < yynewSize)
yynewSize = YYMAXDEPTH;
- yynewItems
- = YY_CAST (yyGLRStackItem*,
- YYMALLOC (YY_CAST (size_t, yynewSize)
- * sizeof yynewItems[0]));
+ yynewItems = (yyGLRStackItem*) YYMALLOC (yynewSize * sizeof yynewItems[0]);
if (! yynewItems)
yyMemoryExhausted (yystackp);
for (yyp0 = yystackp->yyitems, yyp1 = yynewItems, yyn = yysize;
yyn -= 1, yyp0 += 1, yyp1 += 1)
{
*yyp1 = *yyp0;
- if (*YY_REINTERPRET_CAST (yybool *, yyp0))
+ if (*(yybool *) yyp0)
{
yyGLRState* yys0 = &yyp0->yystate;
yyGLRState* yys1 = &yyp1->yystate;
/** Invalidate stack #YYK in *YYSTACKP. */
static inline void
-yymarkStackDeleted (yyGLRStack* yystackp, ptrdiff_t yyk)
+yymarkStackDeleted (yyGLRStack* yystackp, size_t yyk)
{
if (yystackp->yytops.yystates[yyk] != YY_NULLPTR)
yystackp->yylastDeleted = yystackp->yytops.yystates[yyk];
return;
yystackp->yytops.yystates[0] = yystackp->yylastDeleted;
yystackp->yytops.yysize = 1;
- YY_DPRINTF ((stderr, "Restoring last deleted stack as stack #0.\n"));
+ YYDPRINTF ((stderr, "Restoring last deleted stack as stack #0.\n"));
yystackp->yylastDeleted = YY_NULLPTR;
}
static inline void
yyremoveDeletes (yyGLRStack* yystackp)
{
- ptrdiff_t yyi, yyj;
+ size_t yyi, yyj;
yyi = yyj = 0;
while (yyj < yystackp->yytops.yysize)
{
if (yystackp->yytops.yystates[yyi] == YY_NULLPTR)
{
if (yyi == yyj)
- YY_DPRINTF ((stderr, "Removing dead stacks.\n"));
+ {
+ YYDPRINTF ((stderr, "Removing dead stacks.\n"));
+ }
yystackp->yytops.yysize -= 1;
}
else
yystackp->yytops.yylookaheadNeeds[yyj] =
yystackp->yytops.yylookaheadNeeds[yyi];
if (yyj != yyi)
- YY_DPRINTF ((stderr, "Rename stack %ld -> %ld.\n",
- YY_CAST (long, yyi), YY_CAST (long, yyj)));
+ {
+ YYDPRINTF ((stderr, "Rename stack %lu -> %lu.\n",
+ (unsigned long int) yyi, (unsigned long int) yyj));
+ }
yyj += 1;
}
yyi += 1;
* state YYLRSTATE, at input position YYPOSN, with (resolved) semantic
* value *YYVALP and source location *YYLOCP. */
static inline void
-yyglrShift (yyGLRStack* yystackp, ptrdiff_t yyk, yyStateNum yylrState,
- ptrdiff_t yyposn,
+yyglrShift (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState,
+ size_t yyposn,
YYSTYPE* yyvalp, YYLTYPE* yylocp)
{
yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate;
* state YYLRSTATE, at input position YYPOSN, with the (unresolved)
* semantic value of YYRHS under the action for YYRULE. */
static inline void
-yyglrShiftDefer (yyGLRStack* yystackp, ptrdiff_t yyk, yyStateNum yylrState,
- ptrdiff_t yyposn, yyGLRState* yyrhs, yyRuleNum yyrule)
+yyglrShiftDefer (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState,
+ size_t yyposn, yyGLRState* yyrhs, yyRuleNum yyrule)
{
yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate;
- YY_ASSERT (yynewState->yyisState);
+ YYASSERT (yynewState->yyisState);
yynewState->yylrState = yylrState;
yynewState->yyposn = yyposn;
# define YY_REDUCE_PRINT(Args)
#else
# define YY_REDUCE_PRINT(Args) \
- do { \
- if (yydebug) \
- yy_reduce_print Args; \
- } while (0)
+do { \
+ if (yydebug) \
+ yy_reduce_print Args; \
+} while (0)
/*----------------------------------------------------------------------.
| Report that stack #YYK of *YYSTACKP is going to be reduced by YYRULE. |
`----------------------------------------------------------------------*/
static inline void
-yy_reduce_print (yybool yynormal, yyGLRStackItem* yyvsp, ptrdiff_t yyk,
+yy_reduce_print (int yynormal, yyGLRStackItem* yyvsp, size_t yyk,
yyRuleNum yyrule, yy::parser& yyparser, tidl::Parser* ps)
{
int yynrhs = yyrhsLength (yyrule);
int yylow = 1;
int yyi;
- YY_FPRINTF ((stderr, "Reducing stack %ld by rule %d (line %d):\n",
- YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule]));
+ YYFPRINTF (stderr, "Reducing stack %lu by rule %d (line %lu):\n",
+ (unsigned long int) yyk, yyrule - 1,
+ (unsigned long int) yyrline[yyrule]);
if (! yynormal)
yyfillin (yyvsp, 1, -yynrhs);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- YY_FPRINTF ((stderr, " $%d = ", yyi + 1));
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr,
yystos[yyvsp[yyi - yynrhs + 1].yystate.yylrState],
- &yyvsp[yyi - yynrhs + 1].yystate.yysemantics.yysval,
- &(YY_CAST (yyGLRStackItem const *, yyvsp)[YYFILL ((yyi + 1) - (yynrhs))].yystate.yyloc) , yyparser, ps);
+ &yyvsp[yyi - yynrhs + 1].yystate.yysemantics.yysval
+ , &(((yyGLRStackItem const *)yyvsp)[YYFILL ((yyi + 1) - (yynrhs))].yystate.yyloc) , yyparser, ps);
if (!yyvsp[yyi - yynrhs + 1].yystate.yyresolved)
- YY_FPRINTF ((stderr, " (unresolved)"));
- YY_FPRINTF ((stderr, "\n"));
+ YYFPRINTF (stderr, " (unresolved)");
+ YYFPRINTF (stderr, "\n");
}
}
#endif
* and *YYLOCP to the computed location (if any). Return value is as
* for userAction. */
static inline YYRESULTTAG
-yydoAction (yyGLRStack* yystackp, ptrdiff_t yyk, yyRuleNum yyrule,
+yydoAction (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
YYSTYPE* yyvalp, YYLTYPE *yylocp, yy::parser& yyparser, tidl::Parser* ps)
{
int yynrhs = yyrhsLength (yyrule);
if (yystackp->yysplitPoint == YY_NULLPTR)
{
/* Standard special case: single stack. */
- yyGLRStackItem* yyrhs
- = YY_REINTERPRET_CAST (yyGLRStackItem*, yystackp->yytops.yystates[yyk]);
- YY_ASSERT (yyk == 0);
+ yyGLRStackItem* yyrhs = (yyGLRStackItem*) yystackp->yytops.yystates[yyk];
+ YYASSERT (yyk == 0);
yystackp->yynextFree -= yynrhs;
yystackp->yyspaceLeft += yynrhs;
yystackp->yytops.yystates[0] = & yystackp->yynextFree[-1].yystate;
- YY_REDUCE_PRINT ((yytrue, yyrhs, yyk, yyrule, yyparser, ps));
+ YY_REDUCE_PRINT ((1, yyrhs, yyk, yyrule, yyparser, ps));
return yyuserAction (yyrule, yynrhs, yyrhs, yystackp,
yyvalp, yylocp, yyparser, ps);
}
else
{
+ int yyi;
+ yyGLRState* yys;
yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1];
- yyGLRState* yys = yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred
+ yys = yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred
= yystackp->yytops.yystates[yyk];
- int yyi;
if (yynrhs == 0)
/* Set default location. */
yyrhsVals[YYMAXRHS + YYMAXLEFT - 1].yystate.yyloc = yys->yyloc;
for (yyi = 0; yyi < yynrhs; yyi += 1)
{
yys = yys->yypred;
- YY_ASSERT (yys);
+ YYASSERT (yys);
}
yyupdateSplit (yystackp, yys);
yystackp->yytops.yystates[yyk] = yys;
- YY_REDUCE_PRINT ((yyfalse, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1, yyk, yyrule, yyparser, ps));
+ YY_REDUCE_PRINT ((0, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1, yyk, yyrule, yyparser, ps));
return yyuserAction (yyrule, yynrhs, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1,
yystackp, yyvalp, yylocp, yyparser, ps);
}
* added to the options for the existing state's semantic value.
*/
static inline YYRESULTTAG
-yyglrReduce (yyGLRStack* yystackp, ptrdiff_t yyk, yyRuleNum yyrule,
+yyglrReduce (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
yybool yyforceEval, yy::parser& yyparser, tidl::Parser* ps)
{
- ptrdiff_t yyposn = yystackp->yytops.yystates[yyk]->yyposn;
+ size_t yyposn = yystackp->yytops.yystates[yyk]->yyposn;
if (yyforceEval || yystackp->yysplitPoint == YY_NULLPTR)
{
YYRESULTTAG yyflag = yydoAction (yystackp, yyk, yyrule, &yysval, &yyloc, yyparser, ps);
if (yyflag == yyerr && yystackp->yysplitPoint != YY_NULLPTR)
- YY_DPRINTF ((stderr,
- "Parse on stack %ld rejected by rule %d (line %d).\n",
- YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule - 1]));
+ {
+ YYDPRINTF ((stderr, "Parse on stack %lu rejected by rule #%d.\n",
+ (unsigned long int) yyk, yyrule - 1));
+ }
if (yyflag != yyok)
return yyflag;
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyrule], &yysval, &yyloc);
}
else
{
- ptrdiff_t yyi;
+ size_t yyi;
int yyn;
yyGLRState* yys, *yys0 = yystackp->yytops.yystates[yyk];
yyStateNum yynewLRState;
0 < yyn; yyn -= 1)
{
yys = yys->yypred;
- YY_ASSERT (yys);
+ YYASSERT (yys);
}
yyupdateSplit (yystackp, yys);
yynewLRState = yyLRgotoState (yys->yylrState, yylhsNonterm (yyrule));
- YY_DPRINTF ((stderr,
- "Reduced stack %ld by rule %d (line %d); action deferred. "
- "Now in state %d.\n",
- YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule - 1],
- yynewLRState));
+ YYDPRINTF ((stderr,
+ "Reduced stack %lu by rule #%d; action deferred. "
+ "Now in state %d.\n",
+ (unsigned long int) yyk, yyrule - 1, yynewLRState));
for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
if (yyi != yyk && yystackp->yytops.yystates[yyi] != YY_NULLPTR)
{
{
yyaddDeferredAction (yystackp, yyk, yyp, yys0, yyrule);
yymarkStackDeleted (yystackp, yyk);
- YY_DPRINTF ((stderr, "Merging stack %ld into stack %ld.\n",
- YY_CAST (long, yyk), YY_CAST (long, yyi)));
+ YYDPRINTF ((stderr, "Merging stack %lu into stack %lu.\n",
+ (unsigned long int) yyk,
+ (unsigned long int) yyi));
return yyok;
}
yyp = yyp->yypred;
return yyok;
}
-static ptrdiff_t
-yysplitStack (yyGLRStack* yystackp, ptrdiff_t yyk)
+static size_t
+yysplitStack (yyGLRStack* yystackp, size_t yyk)
{
if (yystackp->yysplitPoint == YY_NULLPTR)
{
- YY_ASSERT (yyk == 0);
+ YYASSERT (yyk == 0);
yystackp->yysplitPoint = yystackp->yytops.yystates[yyk];
}
- if (yystackp->yytops.yycapacity <= yystackp->yytops.yysize)
+ if (yystackp->yytops.yysize >= yystackp->yytops.yycapacity)
{
- ptrdiff_t state_size = sizeof yystackp->yytops.yystates[0];
- ptrdiff_t half_max_capacity = YYSIZEMAX / 2 / state_size;
- if (half_max_capacity < yystackp->yytops.yycapacity)
+ yyGLRState** yynewStates;
+ yybool* yynewLookaheadNeeds;
+
+ yynewStates = YY_NULLPTR;
+
+ if (yystackp->yytops.yycapacity
+ > (YYSIZEMAX / (2 * sizeof yynewStates[0])))
yyMemoryExhausted (yystackp);
yystackp->yytops.yycapacity *= 2;
- {
- yyGLRState** yynewStates
- = YY_CAST (yyGLRState**,
- YYREALLOC (yystackp->yytops.yystates,
- (YY_CAST (size_t, yystackp->yytops.yycapacity)
- * sizeof yynewStates[0])));
- if (yynewStates == YY_NULLPTR)
- yyMemoryExhausted (yystackp);
- yystackp->yytops.yystates = yynewStates;
- }
+ yynewStates =
+ (yyGLRState**) YYREALLOC (yystackp->yytops.yystates,
+ (yystackp->yytops.yycapacity
+ * sizeof yynewStates[0]));
+ if (yynewStates == YY_NULLPTR)
+ yyMemoryExhausted (yystackp);
+ yystackp->yytops.yystates = yynewStates;
- {
- yybool* yynewLookaheadNeeds
- = YY_CAST (yybool*,
- YYREALLOC (yystackp->yytops.yylookaheadNeeds,
- (YY_CAST (size_t, yystackp->yytops.yycapacity)
- * sizeof yynewLookaheadNeeds[0])));
- if (yynewLookaheadNeeds == YY_NULLPTR)
- yyMemoryExhausted (yystackp);
- yystackp->yytops.yylookaheadNeeds = yynewLookaheadNeeds;
- }
+ yynewLookaheadNeeds =
+ (yybool*) YYREALLOC (yystackp->yytops.yylookaheadNeeds,
+ (yystackp->yytops.yycapacity
+ * sizeof yynewLookaheadNeeds[0]));
+ if (yynewLookaheadNeeds == YY_NULLPTR)
+ yyMemoryExhausted (yystackp);
+ yystackp->yytops.yylookaheadNeeds = yynewLookaheadNeeds;
}
yystackp->yytops.yystates[yystackp->yytops.yysize]
= yystackp->yytops.yystates[yyk];
yystackp->yytops.yylookaheadNeeds[yystackp->yytops.yysize]
= yystackp->yytops.yylookaheadNeeds[yyk];
yystackp->yytops.yysize += 1;
- return yystackp->yytops.yysize - 1;
+ return yystackp->yytops.yysize-1;
}
/** True iff YYY0 and YYY1 represent identical options at the top level.
int yyn;
for (yys0 = yyy0->yystate, yys1 = yyy1->yystate,
yyn = yyrhsLength (yyy0->yyrule);
- 0 < yyn;
+ yyn > 0;
yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1)
{
if (yys0 == yys1)
{
if (0 < yyn)
{
- YY_ASSERT (yys->yypred);
+ YYASSERT (yys->yypred);
YYCHK (yyresolveStates (yys->yypred, yyn-1, yystackp, yyparser, ps));
if (! yys->yyresolved)
YYCHK (yyresolveValue (yys, yystackp, yyparser, ps));
yystates[0] = yys;
if (yyx->yystate->yyposn < yys->yyposn + 1)
- YY_FPRINTF ((stderr, "%*s%s -> <Rule %d, empty>\n",
- yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)),
- yyx->yyrule - 1));
+ YYFPRINTF (stderr, "%*s%s -> <Rule %d, empty>\n",
+ yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)),
+ yyx->yyrule - 1);
else
- YY_FPRINTF ((stderr, "%*s%s -> <Rule %d, tokens %ld .. %ld>\n",
- yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)),
- yyx->yyrule - 1, YY_CAST (long, yys->yyposn + 1),
- YY_CAST (long, yyx->yystate->yyposn)));
+ YYFPRINTF (stderr, "%*s%s -> <Rule %d, tokens %lu .. %lu>\n",
+ yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)),
+ yyx->yyrule - 1, (unsigned long int) (yys->yyposn + 1),
+ (unsigned long int) yyx->yystate->yyposn);
for (yyi = 1; yyi <= yynrhs; yyi += 1)
{
if (yystates[yyi]->yyresolved)
{
if (yystates[yyi-1]->yyposn+1 > yystates[yyi]->yyposn)
- YY_FPRINTF ((stderr, "%*s%s <empty>\n", yyindent+2, "",
- yytokenName (yystos[yystates[yyi]->yylrState])));
+ YYFPRINTF (stderr, "%*s%s <empty>\n", yyindent+2, "",
+ yytokenName (yystos[yystates[yyi]->yylrState]));
else
- YY_FPRINTF ((stderr, "%*s%s <tokens %ld .. %ld>\n", yyindent+2, "",
- yytokenName (yystos[yystates[yyi]->yylrState]),
- YY_CAST (long, yystates[yyi-1]->yyposn + 1),
- YY_CAST (long, yystates[yyi]->yyposn)));
+ YYFPRINTF (stderr, "%*s%s <tokens %lu .. %lu>\n", yyindent+2, "",
+ yytokenName (yystos[yystates[yyi]->yylrState]),
+ (unsigned long int) (yystates[yyi-1]->yyposn + 1),
+ (unsigned long int) yystates[yyi]->yyposn);
}
else
yyreportTree (yystates[yyi]->yysemantics.yyfirstVal, yyindent+2);
YYUSE (yyx1);
#if YYDEBUG
- YY_FPRINTF ((stderr, "Ambiguity detected.\n"));
- YY_FPRINTF ((stderr, "Option 1,\n"));
+ YYFPRINTF (stderr, "Ambiguity detected.\n");
+ YYFPRINTF (stderr, "Option 1,\n");
yyreportTree (yyx0, 2);
- YY_FPRINTF ((stderr, "\nOption 2,\n"));
+ YYFPRINTF (stderr, "\nOption 2,\n");
yyreportTree (yyx1, 2);
- YY_FPRINTF ((stderr, "\n"));
+ YYFPRINTF (stderr, "\n");
#endif
yyerror (yylocp, yyparser, ps, YY_("syntax is ambiguous"));
* ending at YYS1. Has no effect on previously resolved states.
* The first semantic option of a state is always chosen. */
static void
-yyresolveLocations (yyGLRState *yys1, int yyn1,
+yyresolveLocations (yyGLRState* yys1, int yyn1,
yyGLRStack *yystackp, yy::parser& yyparser, tidl::Parser* ps)
{
if (0 < yyn1)
yyGLRStackItem yyrhsloc[1 + YYMAXRHS];
int yynrhs;
yySemanticOption *yyoption = yys1->yysemantics.yyfirstVal;
- YY_ASSERT (yyoption);
+ YYASSERT (yyoption != YY_NULLPTR);
yynrhs = yyrhsLength (yyoption->yyrule);
- if (0 < yynrhs)
+ if (yynrhs > 0)
{
yyGLRState *yys;
int yyn;
yyGLRState *yyprevious = yyoption->yystate;
yyrhsloc[0].yystate.yyloc = yyprevious->yyloc;
}
- YYLLOC_DEFAULT ((yys1->yyloc), yyrhsloc, yynrhs);
+ {
+ int yychar_current = yychar;
+ YYSTYPE yylval_current = yylval;
+ YYLTYPE yylloc_current = yylloc;
+ yychar = yyoption->yyrawchar;
+ yylval = yyoption->yyval;
+ yylloc = yyoption->yyloc;
+ YYLLOC_DEFAULT ((yys1->yyloc), yyrhsloc, yynrhs);
+ yychar = yychar_current;
+ yylval = yylval_current;
+ yylloc = yylloc_current;
+ }
}
}
}
yymerge = yyfalse;
break;
default:
- /* This cannot happen so it is not worth a YY_ASSERT (yyfalse),
+ /* This cannot happen so it is not worth a YYASSERT (yyfalse),
but some compilers complain if the default case is
omitted. */
break;
yyp->yypred = yyr;
yystackp->yyspaceLeft += yystackp->yynextFree - yystackp->yyitems;
- yystackp->yynextFree = YY_REINTERPRET_CAST (yyGLRStackItem*, yystackp->yysplitPoint) + 1;
+ yystackp->yynextFree = ((yyGLRStackItem*) yystackp->yysplitPoint) + 1;
yystackp->yyspaceLeft -= yystackp->yynextFree - yystackp->yyitems;
yystackp->yysplitPoint = YY_NULLPTR;
yystackp->yylastDeleted = YY_NULLPTR;
}
static YYRESULTTAG
-yyprocessOneStack (yyGLRStack* yystackp, ptrdiff_t yyk,
- ptrdiff_t yyposn, YYLTYPE *yylocp, yy::parser& yyparser, tidl::Parser* ps)
+yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
+ size_t yyposn, YYLTYPE *yylocp, yy::parser& yyparser, tidl::Parser* ps)
{
while (yystackp->yytops.yystates[yyk] != YY_NULLPTR)
{
yyStateNum yystate = yystackp->yytops.yystates[yyk]->yylrState;
- YY_DPRINTF ((stderr, "Stack %ld Entering state %d\n",
- YY_CAST (long, yyk), yystate));
+ YYDPRINTF ((stderr, "Stack %lu Entering state %d\n",
+ (unsigned long int) yyk, yystate));
- YY_ASSERT (yystate != YYFINAL);
+ YYASSERT (yystate != YYFINAL);
if (yyisDefaultedState (yystate))
{
yyRuleNum yyrule = yydefaultAction (yystate);
if (yyrule == 0)
{
- YY_DPRINTF ((stderr, "Stack %ld dies.\n", YY_CAST (long, yyk)));
+ YYDPRINTF ((stderr, "Stack %lu dies.\n",
+ (unsigned long int) yyk));
yymarkStackDeleted (yystackp, yyk);
return yyok;
}
yyflag = yyglrReduce (yystackp, yyk, yyrule, yyimmediate[yyrule], yyparser, ps);
if (yyflag == yyerr)
{
- YY_DPRINTF ((stderr,
- "Stack %ld dies "
- "(predicate failure or explicit user error).\n",
- YY_CAST (long, yyk)));
+ YYDPRINTF ((stderr,
+ "Stack %lu dies "
+ "(predicate failure or explicit user error).\n",
+ (unsigned long int) yyk));
yymarkStackDeleted (yystackp, yyk);
return yyok;
}
}
else
{
- yySymbol yytoken = yygetToken (&yychar, yystackp, yyparser, ps);
- const short* yyconflicts;
- const int yyaction = yygetLRActions (yystate, yytoken, &yyconflicts);
+ yySymbol yytoken;
+ int yyaction;
+ const short int* yyconflicts;
+
yystackp->yytops.yylookaheadNeeds[yyk] = yytrue;
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex (&yylval, &yylloc, lex_scanner);
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts);
while (*yyconflicts != 0)
{
YYRESULTTAG yyflag;
- ptrdiff_t yynewStack = yysplitStack (yystackp, yyk);
- YY_DPRINTF ((stderr, "Splitting off stack %ld from %ld.\n",
- YY_CAST (long, yynewStack), YY_CAST (long, yyk)));
+ size_t yynewStack = yysplitStack (yystackp, yyk);
+ YYDPRINTF ((stderr, "Splitting off stack %lu from %lu.\n",
+ (unsigned long int) yynewStack,
+ (unsigned long int) yyk));
yyflag = yyglrReduce (yystackp, yynewStack,
*yyconflicts,
yyimmediate[*yyconflicts], yyparser, ps);
yyposn, yylocp, yyparser, ps));
else if (yyflag == yyerr)
{
- YY_DPRINTF ((stderr, "Stack %ld dies.\n", YY_CAST (long, yynewStack)));
+ YYDPRINTF ((stderr, "Stack %lu dies.\n",
+ (unsigned long int) yynewStack));
yymarkStackDeleted (yystackp, yynewStack);
}
else
break;
else if (yyisErrorAction (yyaction))
{
- YY_DPRINTF ((stderr, "Stack %ld dies.\n", YY_CAST (long, yyk)));
+ YYDPRINTF ((stderr, "Stack %lu dies.\n",
+ (unsigned long int) yyk));
yymarkStackDeleted (yystackp, yyk);
break;
}
yyimmediate[-yyaction], yyparser, ps);
if (yyflag == yyerr)
{
- YY_DPRINTF ((stderr,
- "Stack %ld dies "
- "(predicate failure or explicit user error).\n",
- YY_CAST (long, yyk)));
+ YYDPRINTF ((stderr,
+ "Stack %lu dies "
+ "(predicate failure or explicit user error).\n",
+ (unsigned long int) yyk));
yymarkStackDeleted (yystackp, yyk);
break;
}
#else
{
yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+ size_t yysize0 = yytnamerr (YY_NULLPTR, yytokenName (yytoken));
+ size_t yysize = yysize0;
yybool yysize_overflow = yyfalse;
char* yymsg = YY_NULLPTR;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
const char *yyformat = YY_NULLPTR;
- /* Arguments of yyformat: reported tokens (one for the "unexpected",
- one per "expected"). */
+ /* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Actual size of YYARG. */
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
int yycount = 0;
- /* Cumulated lengths of YYARG. */
- ptrdiff_t yysize = 0;
/* There are many possibilities here to consider:
- If this state is a consistent state with a default action, then
if (yytoken != YYEMPTY)
{
int yyn = yypact[yystackp->yytops.yystates[0]->yylrState];
- ptrdiff_t yysize0 = yytnamerr (YY_NULLPTR, yytokenName (yytoken));
- yysize = yysize0;
yyarg[yycount++] = yytokenName (yytoken);
if (!yypact_value_is_default (yyn))
{
}
yyarg[yycount++] = yytokenName (yyx);
{
- ptrdiff_t yysz = yytnamerr (YY_NULLPTR, yytokenName (yyx));
- if (YYSIZEMAX - yysize < yysz)
- yysize_overflow = yytrue;
- else
- yysize += yysz;
+ size_t yysz = yysize + yytnamerr (YY_NULLPTR, yytokenName (yyx));
+ yysize_overflow |= yysz < yysize;
+ yysize = yysz;
}
}
}
case N: \
yyformat = S; \
break
- default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
}
{
- /* Don't count the "%s"s in the final size, but reserve room for
- the terminator. */
- ptrdiff_t yysz = YY_CAST (ptrdiff_t, strlen (yyformat)) - 2 * yycount + 1;
- if (YYSIZEMAX - yysize < yysz)
- yysize_overflow = yytrue;
- else
- yysize += yysz;
+ size_t yysz = yysize + strlen (yyformat);
+ yysize_overflow |= yysz < yysize;
+ yysize = yysz;
}
if (!yysize_overflow)
- yymsg = YY_CAST (char *, YYMALLOC (YY_CAST (size_t, yysize)));
+ yymsg = (char *) YYMALLOC (yysize);
if (yymsg)
{
}
else
{
- ++yyp;
- ++yyformat;
+ yyp++;
+ yyformat++;
}
}
yyerror (&yylloc, yyparser, ps, yymsg);
static void
yyrecoverSyntaxError (yyGLRStack* yystackp, yy::parser& yyparser, tidl::Parser* ps)
{
+ size_t yyk;
+ int yyj;
+
if (yystackp->yyerrState == 3)
/* We just shifted the error token and (perhaps) took some
reductions. Skip tokens until we can proceed. */
while (yytrue)
{
yySymbol yytoken;
- int yyj;
if (yychar == YYEOF)
yyFail (yystackp, &yylloc, yyparser, ps, YY_NULLPTR);
if (yychar != YYEMPTY)
yytoken = YYTRANSLATE (yychar);
yydestruct ("Error: discarding",
yytoken, &yylval, &yylloc, yyparser, ps);
- yychar = YYEMPTY;
}
- yytoken = yygetToken (&yychar, yystackp, yyparser, ps);
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex (&yylval, &yylloc, lex_scanner);
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
yyj = yypact[yystackp->yytops.yystates[0]->yylrState];
if (yypact_value_is_default (yyj))
return;
}
/* Reduce to one stack. */
- {
- ptrdiff_t yyk;
- for (yyk = 0; yyk < yystackp->yytops.yysize; yyk += 1)
- if (yystackp->yytops.yystates[yyk] != YY_NULLPTR)
- break;
- if (yyk >= yystackp->yytops.yysize)
- yyFail (yystackp, &yylloc, yyparser, ps, YY_NULLPTR);
- for (yyk += 1; yyk < yystackp->yytops.yysize; yyk += 1)
- yymarkStackDeleted (yystackp, yyk);
- yyremoveDeletes (yystackp);
- yycompressStack (yystackp);
- }
+ for (yyk = 0; yyk < yystackp->yytops.yysize; yyk += 1)
+ if (yystackp->yytops.yystates[yyk] != YY_NULLPTR)
+ break;
+ if (yyk >= yystackp->yytops.yysize)
+ yyFail (yystackp, &yylloc, yyparser, ps, YY_NULLPTR);
+ for (yyk += 1; yyk < yystackp->yytops.yysize; yyk += 1)
+ yymarkStackDeleted (yystackp, yyk);
+ yyremoveDeletes (yystackp);
+ yycompressStack (yystackp);
/* Now pop stack until we find a state that shifts the error token. */
yystackp->yyerrState = 3;
while (yystackp->yytops.yystates[0] != YY_NULLPTR)
{
yyGLRState *yys = yystackp->yytops.yystates[0];
- int yyj = yypact[yys->yylrState];
+ yyj = yypact[yys->yylrState];
if (! yypact_value_is_default (yyj))
{
yyj += YYTERROR;
&& yyisShiftAction (yytable[yyj]))
{
/* Shift the error token. */
- int yyaction = yytable[yyj];
/* First adjust its location.*/
YYLTYPE yyerrloc;
yystackp->yyerror_range[2].yystate.yyloc = yylloc;
YYLLOC_DEFAULT (yyerrloc, (yystackp->yyerror_range), 2);
- YY_SYMBOL_PRINT ("Shifting", yystos[yyaction],
+ YY_SYMBOL_PRINT ("Shifting", yystos[yytable[yyj]],
&yylval, &yyerrloc);
- yyglrShift (yystackp, 0, yyaction,
+ yyglrShift (yystackp, 0, yytable[yyj],
yys->yyposn, &yylval, &yyerrloc);
yys = yystackp->yytops.yystates[0];
break;
int yyresult;
yyGLRStack yystack;
yyGLRStack* const yystackp = &yystack;
- ptrdiff_t yyposn;
+ size_t yyposn;
- YY_DPRINTF ((stderr, "Starting parse\n"));
+ YYDPRINTF ((stderr, "Starting parse\n"));
yychar = YYEMPTY;
yylval = yyval_default;
yylloc = yyloc_default;
- // User initialization code.
-yylloc.initialize ();
-#line 3434 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
-
+ /* User initialization code. */
+ yylloc.initialize ();
+#line 3340 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:2270
if (! yyinitGLRStack (yystackp, YYINITDEPTH))
goto yyexhaustedlab;
/* Standard mode */
while (yytrue)
{
+ yyRuleNum yyrule;
+ int yyaction;
+ const short int* yyconflicts;
+
yyStateNum yystate = yystack.yytops.yystates[0]->yylrState;
- YY_DPRINTF ((stderr, "Entering state %d\n", yystate));
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yystate == YYFINAL)
goto yyacceptlab;
if (yyisDefaultedState (yystate))
{
- yyRuleNum yyrule = yydefaultAction (yystate);
+ yyrule = yydefaultAction (yystate);
if (yyrule == 0)
{
- yystack.yyerror_range[1].yystate.yyloc = yylloc;
+ yystack.yyerror_range[1].yystate.yyloc = yylloc;
yyreportSyntaxError (&yystack, yyparser, ps);
goto yyuser_error;
}
}
else
{
- yySymbol yytoken = yygetToken (&yychar, yystackp, yyparser, ps);
- const short* yyconflicts;
- int yyaction = yygetLRActions (yystate, yytoken, &yyconflicts);
+ yySymbol yytoken;
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex (&yylval, &yylloc, lex_scanner);
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts);
if (*yyconflicts != 0)
break;
if (yyisShiftAction (yyaction))
}
else if (yyisErrorAction (yyaction))
{
- yystack.yyerror_range[1].yystate.yyloc = yylloc;
- /* Don't issue an error message again for exceptions
- thrown from the scanner. */
- if (yychar != YYFAULTYTOK)
- yyreportSyntaxError (&yystack, yyparser, ps);
+ yystack.yyerror_range[1].yystate.yyloc = yylloc;
+ yyreportSyntaxError (&yystack, yyparser, ps);
goto yyuser_error;
}
else
while (yytrue)
{
yySymbol yytoken_to_shift;
- ptrdiff_t yys;
+ size_t yys;
for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
yystackp->yytops.yylookaheadNeeds[yys] = yychar != YYEMPTY;
if (yystack.yytops.yysize == 0)
yyFail (&yystack, &yylloc, yyparser, ps, YY_("syntax error"));
YYCHK1 (yyresolveStack (&yystack, yyparser, ps));
- YY_DPRINTF ((stderr, "Returning to deterministic operation.\n"));
- yystack.yyerror_range[1].yystate.yyloc = yylloc;
+ YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
+ yystack.yyerror_range[1].yystate.yyloc = yylloc;
yyreportSyntaxError (&yystack, yyparser, ps);
goto yyuser_error;
}
yyposn += 1;
for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
{
+ int yyaction;
+ const short int* yyconflicts;
yyStateNum yystate = yystack.yytops.yystates[yys]->yylrState;
- const short* yyconflicts;
- int yyaction = yygetLRActions (yystate, yytoken_to_shift,
+ yygetLRActions (yystate, yytoken_to_shift, &yyaction,
&yyconflicts);
/* Note that yyconflicts were handled by yyprocessOneStack. */
- YY_DPRINTF ((stderr, "On stack %ld, ", YY_CAST (long, yys)));
+ YYDPRINTF ((stderr, "On stack %lu, ", (unsigned long int) yys));
YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, &yylval, &yylloc);
yyglrShift (&yystack, yys, yyaction, yyposn,
&yylval, &yylloc);
- YY_DPRINTF ((stderr, "Stack %ld now in state #%d\n",
- YY_CAST (long, yys),
- yystack.yytops.yystates[yys]->yylrState));
+ YYDPRINTF ((stderr, "Stack %lu now in state #%d\n",
+ (unsigned long int) yys,
+ yystack.yytops.yystates[yys]->yylrState));
}
if (yystack.yytops.yysize == 1)
{
YYCHK1 (yyresolveStack (&yystack, yyparser, ps));
- YY_DPRINTF ((stderr, "Returning to deterministic operation.\n"));
+ YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
yycompressStack (&yystack);
break;
}
goto yyreturn;
yybuglab:
- YY_ASSERT (yyfalse);
+ YYASSERT (yyfalse);
goto yyabortlab;
yyabortlab:
yyGLRState** yystates = yystack.yytops.yystates;
if (yystates)
{
- ptrdiff_t yysize = yystack.yytops.yysize;
- ptrdiff_t yyk;
+ size_t yysize = yystack.yytops.yysize;
+ size_t yyk;
for (yyk = 0; yyk < yysize; yyk += 1)
if (yystates[yyk])
{
while (yystates[yyk])
{
yyGLRState *yys = yystates[yyk];
- yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;
- if (yys->yypred != YY_NULLPTR)
+ yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;
+ if (yys->yypred != YY_NULLPTR)
yydestroyGLRState ("Cleanup: popping", yys, yyparser, ps);
yystates[yyk] = yys->yypred;
yystack.yynextFree -= 1;
if (yys->yypred)
{
yy_yypstack (yys->yypred);
- YY_FPRINTF ((stderr, " -> "));
+ YYFPRINTF (stderr, " -> ");
}
- YY_FPRINTF ((stderr, "%d@%ld", yys->yylrState, YY_CAST (long, yys->yyposn)));
+ YYFPRINTF (stderr, "%d@%lu", yys->yylrState,
+ (unsigned long int) yys->yyposn);
}
static void
yypstates (yyGLRState* yyst)
{
if (yyst == YY_NULLPTR)
- YY_FPRINTF ((stderr, "<null>"));
+ YYFPRINTF (stderr, "<null>");
else
yy_yypstack (yyst);
- YY_FPRINTF ((stderr, "\n"));
+ YYFPRINTF (stderr, "\n");
}
static void
-yypstack (yyGLRStack* yystackp, ptrdiff_t yyk)
+yypstack (yyGLRStack* yystackp, size_t yyk)
{
yypstates (yystackp->yytops.yystates[yyk]);
}
+#define YYINDEX(YYX) \
+ ((YYX) == YY_NULLPTR ? -1 : (yyGLRStackItem*) (YYX) - yystackp->yyitems)
+
+
static void
yypdumpstack (yyGLRStack* yystackp)
{
-#define YYINDEX(YYX) \
- YY_CAST (long, \
- ((YYX) \
- ? YY_REINTERPRET_CAST (yyGLRStackItem*, (YYX)) - yystackp->yyitems \
- : -1))
-
yyGLRStackItem* yyp;
+ size_t yyi;
for (yyp = yystackp->yyitems; yyp < yystackp->yynextFree; yyp += 1)
{
- YY_FPRINTF ((stderr, "%3ld. ",
- YY_CAST (long, yyp - yystackp->yyitems)));
- if (*YY_REINTERPRET_CAST (yybool *, yyp))
+ YYFPRINTF (stderr, "%3lu. ",
+ (unsigned long int) (yyp - yystackp->yyitems));
+ if (*(yybool *) yyp)
{
- YY_ASSERT (yyp->yystate.yyisState);
- YY_ASSERT (yyp->yyoption.yyisState);
- YY_FPRINTF ((stderr, "Res: %d, LR State: %d, posn: %ld, pred: %ld",
- yyp->yystate.yyresolved, yyp->yystate.yylrState,
- YY_CAST (long, yyp->yystate.yyposn),
- YYINDEX (yyp->yystate.yypred)));
+ YYASSERT (yyp->yystate.yyisState);
+ YYASSERT (yyp->yyoption.yyisState);
+ YYFPRINTF (stderr, "Res: %d, LR State: %d, posn: %lu, pred: %ld",
+ yyp->yystate.yyresolved, yyp->yystate.yylrState,
+ (unsigned long int) yyp->yystate.yyposn,
+ (long int) YYINDEX (yyp->yystate.yypred));
if (! yyp->yystate.yyresolved)
- YY_FPRINTF ((stderr, ", firstVal: %ld",
- YYINDEX (yyp->yystate.yysemantics.yyfirstVal)));
+ YYFPRINTF (stderr, ", firstVal: %ld",
+ (long int) YYINDEX (yyp->yystate
+ .yysemantics.yyfirstVal));
}
else
{
- YY_ASSERT (!yyp->yystate.yyisState);
- YY_ASSERT (!yyp->yyoption.yyisState);
- YY_FPRINTF ((stderr, "Option. rule: %d, state: %ld, next: %ld",
- yyp->yyoption.yyrule - 1,
- YYINDEX (yyp->yyoption.yystate),
- YYINDEX (yyp->yyoption.yynext)));
+ YYASSERT (!yyp->yystate.yyisState);
+ YYASSERT (!yyp->yyoption.yyisState);
+ YYFPRINTF (stderr, "Option. rule: %d, state: %ld, next: %ld",
+ yyp->yyoption.yyrule - 1,
+ (long int) YYINDEX (yyp->yyoption.yystate),
+ (long int) YYINDEX (yyp->yyoption.yynext));
}
- YY_FPRINTF ((stderr, "\n"));
+ YYFPRINTF (stderr, "\n");
}
-
- YY_FPRINTF ((stderr, "Tops:"));
- {
- ptrdiff_t yyi;
- for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
- YY_FPRINTF ((stderr, "%ld: %ld; ", YY_CAST (long, yyi),
- YYINDEX (yystackp->yytops.yystates[yyi])));
- YY_FPRINTF ((stderr, "\n"));
- }
-#undef YYINDEX
+ YYFPRINTF (stderr, "Tops:");
+ for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
+ YYFPRINTF (stderr, "%lu: %ld; ", (unsigned long int) yyi,
+ (long int) YYINDEX (yystackp->yytops.yystates[yyi]));
+ YYFPRINTF (stderr, "\n");
}
#endif
-#line 518 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
+#line 547 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.c:2584
#include <ctype.h>
}
-#line 3734 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 3653 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:2584
/*------------------.
| Report an error. |
}
-namespace yy {
-#line 3750 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+namespace yy {
+#line 3670 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:2584
/// Build a parser object.
parser::parser (tidl::Parser* ps_yyarg)
:
yycdebug_ (&std::cerr),
#endif
ps (ps_yyarg)
- {}
+ {
+ }
parser::~parser ()
- {}
-
- parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
- {}
-
- int
- parser::operator() ()
{
- return parse ();
}
int
| Print this symbol. |
`--------------------*/
- void
+ inline void
parser::yy_symbol_value_print_ (int yytype,
const semantic_type* yyvaluep,
const location_type* yylocationp)
{
YYUSE (yylocationp);
YYUSE (yyvaluep);
- std::ostream& yyo = debug_stream ();
- std::ostream& yyoutput = yyo;
- YYUSE (yyoutput);
+ std::ostream& yyoutput = debug_stream ();
+ std::ostream& yyo = yyoutput;
+ YYUSE (yyo);
YYUSE (yytype);
}
}
#endif
+
} // yy
-#line 3838 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.cpp"
+#line 3751 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.cpp" // glr.c:2584
-// A Bison parser, made by GNU Bison 3.5.1.
+// A Bison parser, made by GNU Bison 3.0.4.
// Skeleton interface for Bison GLR parsers in C++
-// Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2015 Free Software Foundation, Inc.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// C++ GLR parser skeleton written by Akim Demaille.
-// Undocumented macros, especially those whose name start with YY_,
-// are private implementation details. Do not rely on them.
+#ifndef YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_TIDLC_Y_HPP_INCLUDED
+# define YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_TIDLC_Y_HPP_INCLUDED
-#ifndef YY_YY_HOME_UPPLE_TIZEN_APPFW_TIDL_IDLC_AST_TIDLC_Y_HPP_INCLUDED
-# define YY_YY_HOME_UPPLE_TIZEN_APPFW_TIDL_IDLC_AST_TIDLC_Y_HPP_INCLUDED
-#include <iostream>
#include <stdexcept>
#include <string>
-
-#if defined __cplusplus
-# define YY_CPLUSPLUS __cplusplus
-#else
-# define YY_CPLUSPLUS 199711L
-#endif
-
-// Support move semantics when possible.
-#if 201103L <= YY_CPLUSPLUS
-# define YY_MOVE std::move
-# define YY_MOVE_OR_COPY move
-# define YY_MOVE_REF(Type) Type&&
-# define YY_RVREF(Type) Type&&
-# define YY_COPY(Type) Type
-#else
-# define YY_MOVE
-# define YY_MOVE_OR_COPY copy
-# define YY_MOVE_REF(Type) Type&
-# define YY_RVREF(Type) const Type&
-# define YY_COPY(Type) const Type&
-#endif
-
-// Support noexcept when possible.
-#if 201103L <= YY_CPLUSPLUS
-# define YY_NOEXCEPT noexcept
-# define YY_NOTHROW
-#else
-# define YY_NOEXCEPT
-# define YY_NOTHROW throw ()
-#endif
-
-// Support constexpr when possible.
-#if 201703 <= YY_CPLUSPLUS
-# define YY_CONSTEXPR constexpr
-#else
-# define YY_CONSTEXPR
-#endif
-# include "location.hh"
-
-
-#ifndef YY_ATTRIBUTE_PURE
-# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
-# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
-# else
-# define YY_ATTRIBUTE_PURE
-# endif
-#endif
-
-#ifndef YY_ATTRIBUTE_UNUSED
-# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
-# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-# else
-# define YY_ATTRIBUTE_UNUSED
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E. */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(E) ((void) (E))
-#else
-# define YYUSE(E) /* empty */
-#endif
-
-#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
- _Pragma ("GCC diagnostic pop")
-#else
-# define YY_INITIAL_VALUE(Value) Value
-#endif
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
-#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
-# define YY_IGNORE_USELESS_CAST_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
-# define YY_IGNORE_USELESS_CAST_END \
- _Pragma ("GCC diagnostic pop")
-#endif
-#ifndef YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_END
-#endif
-
-# ifndef YY_NULLPTR
-# if defined __cplusplus
-# if 201103L <= __cplusplus
-# define YY_NULLPTR nullptr
-# else
-# define YY_NULLPTR 0
-# endif
-# else
-# define YY_NULLPTR ((void*)0)
-# endif
-# endif
-
-// This skeleton is based on C, yet compiles it as C++.
-// So expect warnings about C style casts.
-#if defined __clang__ && 306 <= __clang_major__ * 100 + __clang_minor__
-# pragma clang diagnostic ignored "-Wold-style-cast"
-#elif defined __GNUC__ && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
-# pragma GCC diagnostic ignored "-Wold-style-cast"
-#endif
-
-// On MacOS, PTRDIFF_MAX is defined as long long, which Clang's
-// -pedantic reports as being a C++11 extension.
-#if defined __APPLE__ && YY_CPLUSPLUS < 201103L \
- && defined __clang__ && 4 <= __clang_major__
-# pragma clang diagnostic ignored "-Wc++11-long-long"
-#endif
-
-// Whether we are compiled with exception support.
-#ifndef YY_EXCEPTIONS
-# if defined __GNUC__ && !defined __EXCEPTIONS
-# define YY_EXCEPTIONS 0
-# else
-# define YY_EXCEPTIONS 1
-# endif
-#endif
+#include <iostream>
+#include "location.hh"
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
-namespace yy {
-#line 181 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.hpp"
-
+namespace yy {
+#line 52 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.hpp" // glr.cc:329
/// A Bison parser.
/// Symbol semantic values.
union semantic_type
{
-#line 37 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc.yy"
+ #line 37 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc.yy" // glr.cc:329
tidl::Document* doc;
tidl::Interface* interf;
tidl::Parameters* params;
tidl::Token* token;
tidl::Structure* structure;
+ tidl::Block* protocol;
tidl::Element* elm;
tidl::Elements* elms;
tidl::Block* blk;
tidl::Attribute* attr;
tidl::Attributes* attrs;
-#line 213 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.hpp"
-
+#line 83 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.hpp" // glr.cc:329
};
#else
typedef YYSTYPE semantic_type;
/// Syntax errors thrown from user actions.
struct syntax_error : std::runtime_error
{
- syntax_error (const location_type& l, const std::string& m)
- : std::runtime_error (m)
- , location (l)
- {}
-
- syntax_error (const syntax_error& s)
- : std::runtime_error (s.what ())
- , location (s.location)
- {}
-
- ~syntax_error () YY_NOEXCEPT YY_NOTHROW;
-
+ syntax_error (const location_type& l, const std::string& m);
location_type location;
};
T_DELEGATE = 271,
T_UNKNOWN = 272,
T_ID = 273,
- T_STRUCTURE = 274,
- T_INTERFACE = 275,
- T_CHAR = 276,
- T_SHORT = 277,
- T_INT = 278,
- T_LONG = 279,
- T_FLOAT = 280,
- T_DOUBLE = 281,
- T_VOID = 282,
- T_BUNDLE = 283,
- T_STRING = 284,
- T_BOOL = 285,
- T_LIST = 286,
- T_ARRAY = 287,
- T_VALUE = 288,
- T_SB_OPEN = 289,
- T_SB_CLOSE = 290,
- T_FILE = 291
+ T_NUMBER = 274,
+ T_STRUCTURE = 275,
+ T_INTERFACE = 276,
+ T_CHAR = 277,
+ T_SHORT = 278,
+ T_INT = 279,
+ T_LONG = 280,
+ T_FLOAT = 281,
+ T_DOUBLE = 282,
+ T_VOID = 283,
+ T_BUNDLE = 284,
+ T_STRING = 285,
+ T_BOOL = 286,
+ T_LIST = 287,
+ T_ARRAY = 288,
+ T_VALUE = 289,
+ T_SB_OPEN = 290,
+ T_SB_CLOSE = 291,
+ T_FILE = 292,
+ T_PROTOCOL = 293
};
};
enum { empty_symbol = -2 };
/// Internal symbol number for tokens (subsumed by symbol_number_type).
- typedef signed char token_number_type;
+ typedef unsigned char token_number_type;
+
+ /// A complete symbol.
+ ///
+ /// Expects its Base type to provide access to the symbol type
+ /// via type_get().
+ ///
+ /// Provide access to semantic value and location.
+ template <typename Base>
+ struct basic_symbol : Base
+ {
+ /// Alias to Base.
+ typedef Base super_type;
+
+ /// Default constructor.
+ basic_symbol ();
+
+ /// Copy constructor.
+ basic_symbol (const basic_symbol& other);
+
+ /// Constructor for valueless symbols.
+ basic_symbol (typename Base::kind_type t,
+ const location_type& l);
+
+ /// Constructor for symbols with semantic value.
+ basic_symbol (typename Base::kind_type t,
+ const semantic_type& v,
+ const location_type& l);
+
+ /// Destroy the symbol.
+ ~basic_symbol ();
+
+ /// Destroy contents, and record that is empty.
+ void clear ();
+
+ /// Whether empty.
+ bool empty () const;
+
+ /// Destructive move, \a s is emptied into this.
+ void move (basic_symbol& s);
+
+ /// The semantic value.
+ semantic_type value;
+
+ /// The location.
+ location_type location;
+
+ private:
+ /// Assignment operator.
+ basic_symbol& operator= (const basic_symbol& other);
+ };
+
+ /// Type access provider for token (enum) based symbols.
+ struct by_type
+ {
+ /// Default constructor.
+ by_type ();
+
+ /// Copy constructor.
+ by_type (const by_type& other);
+
+ /// The symbol type as needed by the constructor.
+ typedef token_type kind_type;
+
+ /// Constructor from (external) token numbers.
+ by_type (kind_type t);
+
+ /// Record that this symbol is empty.
+ void clear ();
+
+ /// Steal the symbol type from \a that.
+ void move (by_type& that);
+
+ /// The (internal) type number (corresponding to \a type).
+ /// \a empty when empty.
+ symbol_number_type type_get () const;
+
+ /// The token.
+ token_type token () const;
+
+ /// The symbol type.
+ /// \a empty_symbol when empty.
+ /// An int, not token_number_type, to be able to store empty_symbol.
+ int type;
+ };
+
+ /// "External" symbols: returned by the scanner.
+ typedef basic_symbol<by_type> symbol_type;
+
/// Build a parser object.
parser (tidl::Parser* ps_yyarg);
virtual ~parser ();
- /// Parse. An alias for parse ().
- /// \returns 0 iff parsing succeeded.
- int operator() ();
-
/// Parse.
/// \returns 0 iff parsing succeeded.
virtual int parse ();
-#if YYDEBUG
/// The current debugging stream.
std::ostream& debug_stream () const;
/// Set the current debugging stream.
debug_level_type debug_level () const;
/// Set the current debugging level.
void set_debug_level (debug_level_type l);
-#endif
+ public:
/// Report a syntax error.
/// \param loc where the syntax error is found.
/// \param msg a description of the syntax error.
# define YYLTYPE yy::parser::location_type
#endif
-} // yy
-#line 362 "/home/upple/tizen/appfw/tidl/idlc/ast/tidlc_y.hpp"
+} // yy
+#line 306 "/home/gbs/workspace/clone/public/appfw/tidl/idlc/ast/tidlc_y.hpp" // glr.cc:329
-#endif // !YY_YY_HOME_UPPLE_TIZEN_APPFW_TIDL_IDLC_AST_TIDLC_Y_HPP_INCLUDED
+#endif // !YY_YY_HOME_GBS_WORKSPACE_CLONE_PUBLIC_APPFW_TIDL_IDLC_AST_TIDLC_Y_HPP_INCLUDED
+++ /dev/null
-/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
- *
- * 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.
- */
-
-#ifndef IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_INTEROP_GEN_CB_H_
-#define IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_INTEROP_GEN_CB_H_
-
-constexpr char CB_INTEROP_USING[] =
-R"__cs_cb(
-using System;
-using System.Runtime.InteropServices;
-using Tizen.Applications.AittPlugin;
-
-using ErrorCode = Interop.AittPlugin.ErrorCode;
-
-)__cs_cb";
-
-constexpr char CB_LIBRARIES[] =
-R"__cs_cb(
- internal static partial class Libraries
- {
- public const string AittPlugin = "libaitt_plugin.so.1";
- public const string Libc = "libc.so.6";
- }
-)__cs_cb";
-
-constexpr char CB_ERROR_CODE[] =
-R"__cs_cb(
- internal static partial class AittPlugin
- {
- internal enum ErrorCode : int
- {
- None = Tizen.Internals.Errors.ErrorCode.None,
- IoError = Tizen.Internals.Errors.ErrorCode.IoError,
- OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,
- PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied,
- InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter,
- InvalidOperation = Tizen.Internals.Errors.ErrorCode.InvalidOperation,
- AlreadyInProgress = Tizen.Internals.Errors.ErrorCode.AlreadyInProgress,
- NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported,
- TimedOut = Tizen.Internals.Errors.ErrorCode.TimedOut,
- OperationFailed = -0x030C0000 | 0x01,
- }
- }
-)__cs_cb";
-
-constexpr char CB_INTEROP_MALLOC[] =
-R"__cs_cb(
- internal static partial class AittPlugin
- {
- [DllImport(Libraries.Libc, EntryPoint = "malloc")]
- internal static extern IntPtr Malloc(int size);
- }
-)__cs_cb";
-
-constexpr char CB_INTEROP_CLIENT[] =
-R"__cs_cb(
- internal static partial class AittPluginClient
- {
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginClientServerDiscoveredCb(string serviceName, IntPtr peerInfo, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginClientConnectionResultCb(string serviceName, IntPtr peerInfo, IntPtr result, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginClientPayloadReceivedCb(string serviceName, IntPtr peerInfo, IntPtr payload, int status, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginClientDisconnectedCb(string serviceName, IntPtr peerInfo, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginClientPayloadAsyncResultCb(IntPtr result, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_create")]
- internal static extern ErrorCode AittPluginClientCreate(out ClientSafeHandle client, string serviceName, string brokerIp, int brokerPort, string userName, string password, string myIp, int protocol);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_destroy")]
- internal static extern ErrorCode AittPluginClientDestroy(IntPtr client);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_try_discovery")]
- internal static extern ErrorCode AittPluginClientTryDiscovery(ClientSafeHandle client, AittPluginClientServerDiscoveredCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_stop_discovery")]
- internal static extern ErrorCode AittPluginClientStopDiscovery(ClientSafeHandle client);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_connect")]
- internal static extern ErrorCode AittPluginClientConnect(ClientSafeHandle client, PeerInfoSafeHandle peerInfo);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_disconnect")]
- internal static extern ErrorCode AittPluginClientDisconnect(ClientSafeHandle client);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_send_data")]
- internal static extern ErrorCode AittPluginClientSendData(ClientSafeHandle client, byte[] data, int dataSize, int timeout, out IntPtr returnData, out int returnDataSize);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_send_payload_async")]
- internal static extern ErrorCode AittPluginClientSendPayloadAsync(ClientSafeHandle client, PayloadSafeHandle payload, AittPluginClientPayloadAsyncResultCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_add_connection_result_cb")]
- internal static extern ErrorCode AittPluginClientAddConnectionResultCb(ClientSafeHandle client, AittPluginClientConnectionResultCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_remove_connection_result_cb")]
- internal static extern ErrorCode AittPluginClientRemoveConnectionResultCb(ClientSafeHandle client, AittPluginClientConnectionResultCb cb);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_add_payload_received_cb")]
- internal static extern ErrorCode AittPluginClientAddPayloadReceivedCb(ClientSafeHandle client, AittPluginClientPayloadReceivedCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_remove_payload_received_cb")]
- internal static extern ErrorCode AittPluginClientRemovePayloadReceivedCb(ClientSafeHandle client, AittPluginClientPayloadReceivedCb cb);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_add_disconnected_cb")]
- internal static extern ErrorCode AittPluginClientAddDisconnectedCb(ClientSafeHandle client, AittPluginClientDisconnectedCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_client_remove_disconnected_cb")]
- internal static extern ErrorCode AittPluginClientRemoveDisconnectedCb(ClientSafeHandle client, AittPluginClientDisconnectedCb cb);
- }
-)__cs_cb";
-
-constexpr char CB_INTEROP_CONNECTION_RESULT[] =
-R"__cs_cb(
- internal static partial class AittPluginConnectionResult
- {
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_connection_result_get_status")]
- internal static extern ErrorCode AittPluginConnectionResultGetStatus(IntPtr result, out ConnectionStatus status);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_connection_result_get_reason")]
- internal static extern ErrorCode AittPluginConnectionResultGetReason(IntPtr result, out string reason);
- }
-)__cs_cb";
-
-constexpr char CB_INTEROP_GROUP[] =
-R"__cs_cb(
- internal static partial class AittPluginGroup
- {
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginGroupPayloadReceivedCb(IntPtr group, IntPtr peerInfo, IntPtr payload, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginGroupJoinedCb(string topicName, IntPtr peerInfo, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginGroupLeftCb(string topicName, IntPtr peerInfo, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_group_create")]
- internal static extern ErrorCode AittPluginGroupCreate(out GroupSafeHandle group, string topicName, string brokerIp, int brokerPort, string userName, string password, string myIp, int protocol);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_group_destroy")]
- internal static extern ErrorCode AittPluginGroupDestroy(IntPtr group);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_group_subscribe")]
- internal static extern ErrorCode AittPluginGroupSubscribe(GroupSafeHandle group);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_group_unsubscribe")]
- internal static extern ErrorCode AittPluginGroupUnsubscribe(GroupSafeHandle group);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_group_publish")]
- internal static extern ErrorCode AittPluginGroupPublish(GroupSafeHandle group, PayloadSafeHandle data);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_group_add_payload_received_cb")]
- internal static extern ErrorCode AittPluginGroupAddPayloadReceivedCb(GroupSafeHandle group, AittPluginGroupPayloadReceivedCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_group_remove_payload_received_cb")]
- internal static extern ErrorCode AittPluginGroupRemovePayloadReceivedCb(GroupSafeHandle group, AittPluginGroupPayloadReceivedCb cb);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_group_add_joined_cb")]
- internal static extern ErrorCode AittPluginGroupAddJoinedCb(GroupSafeHandle group, AittPluginGroupJoinedCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_group_remove_joined_cb")]
- internal static extern ErrorCode AittPluginGroupRemoveJoinedCb(GroupSafeHandle group, AittPluginGroupJoinedCb cb);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_group_add_left_cb")]
- internal static extern ErrorCode AittPluginGroupAddLeftCb(GroupSafeHandle group, AittPluginGroupLeftCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_group_remove_left_cb")]
- internal static extern ErrorCode AittPluginGroupRemoveLeftCb(GroupSafeHandle group, AittPluginGroupLeftCb cb);
- }
-)__cs_cb";
-
-constexpr char CB_INTEROP_PAYLOAD[] =
-R"__cs_cb(
- internal static partial class AittPluginPayload
- {
- internal enum PayloadType : int
- {
- Data,
- File,
- }
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_create")]
- internal static extern ErrorCode AittPluginPayloadCreate(out PayloadSafeHandle payload, PayloadType type);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_destroy")]
- internal static extern ErrorCode AittPluginPayloadDestroy(IntPtr payload);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_get_type")]
- internal static extern ErrorCode AittPluginPayloadGetType(IntPtr payload, out PayloadType type);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_get_data")]
- internal static extern ErrorCode AittPluginPayloadGetData(PayloadSafeHandle payload, out IntPtr data, out int dataSize);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_set_data")]
- internal static extern ErrorCode AittPluginPayloadSetData(PayloadSafeHandle payload, byte[] data, int dataSize);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_save_as_file")]
- internal static extern ErrorCode AittPluginPayloadSaveAsFile(PayloadSafeHandle payload, string path);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_get_received_file_name")]
- internal static extern ErrorCode AittPluginPayloadGetReceivedFileName(PayloadSafeHandle payload, out string path);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_get_received_bytes")]
- internal static extern ErrorCode AittPluginPayloadGetReceivedBytes(PayloadSafeHandle payload, out UInt64 bytes);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_get_total_bytes")]
- internal static extern ErrorCode AittPluginPayloadGetTotalBytes(PayloadSafeHandle payload, out UInt64 bytes);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_set_file_path")]
- internal static extern ErrorCode AittPluginPayloadSetFilePath(PayloadSafeHandle payload, string path);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_get_payload_id")]
- internal static extern ErrorCode AittPluginPayloadGetPayloadID(PayloadSafeHandle payload, out string id);
- }
-)__cs_cb";
-
-constexpr char CB_INTEROP_PAYLOAD_ASYNC_RESULT[] =
-R"__cs_cb(
- internal static partial class AittPluginPayloadAsyncResult
- {
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_async_result_get_result")]
- internal static extern ErrorCode AittPluginPayloadAsyncResultGetResult(IntPtr result, out int code);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_async_result_get_peer_info")]
- internal static extern ErrorCode AittPluginPayloadAsyncResultGetPeerInfo(IntPtr result, out IntPtr peerInfo);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_payload_async_result_get_payload_id")]
- internal static extern ErrorCode AittPluginPayloadAsyncResultGetPayloadID(IntPtr result, out string payloadID);
- }
-)__cs_cb";
-
-constexpr char CB_INTEROP_PEER_INFO[] =
-R"__cs_cb(
- internal static partial class AittPluginPeerInfo
- {
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_peer_info_clone")]
- internal static extern ErrorCode AittPluginPeerInfoClone(IntPtr peerInfo, out PeerInfoSafeHandle peerInfoClone);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_peer_info_destroy")]
- internal static extern ErrorCode AittPluginPeerInfoDestroy(IntPtr peerInfo);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_peer_info_get_device_id")]
- internal static extern ErrorCode AittPluginPeerInfoGetDeviceId(PeerInfoSafeHandle peerInfo, out string deviceId);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_peer_info_get_device_name")]
- internal static extern ErrorCode AittPluginPeerInfoGetDeviceName(PeerInfoSafeHandle peerInfo, out string deviceName);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_peer_info_get_device_platform")]
- internal static extern ErrorCode AittPluginPeerInfoGetDevicePlatform(PeerInfoSafeHandle peerInfo, out string devicePlatform);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_peer_info_get_device_platform_version")]
- internal static extern ErrorCode AittPluginPeerInfoGetDevicePlatformVersion(PeerInfoSafeHandle peerInfo, out string devicePlatformVersion);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_peer_info_get_device_type")]
- internal static extern ErrorCode AittPluginPeerInfoGetDeviceType(PeerInfoSafeHandle peerInfo, out string deviceType);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_peer_info_get_app_id")]
- internal static extern ErrorCode AittPluginPeerInfoGetAppId(PeerInfoSafeHandle peerInfo, out string appId);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_peer_info_get_app_version")]
- internal static extern ErrorCode AittPluginPeerInfoGetAppVersion(PeerInfoSafeHandle peerInfo, out string appVersion);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_peer_info_get_uuid")]
- internal static extern ErrorCode AittPluginPeerInfoGetUuid(PeerInfoSafeHandle peerInfo, out string uuid);
- }
-)__cs_cb";
-
-constexpr char CB_INTEROP_SERVER[] =
-R"__cs_cb(
- internal static partial class AittPluginServer
- {
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate bool AittPluginServerPeerInfoIterator(IntPtr peerInfo, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginServerPayloadAsyncResultCb(IntPtr result, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginServerConnectionResultCb(string serviceName, IntPtr peerInfo, IntPtr result, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginServerDataReceivedCb(string serviceName, IntPtr peerInfo, IntPtr data, int dataSize, out IntPtr returnData, out int returnDataSize, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginServerPayloadReceivedCb(string serviceName, IntPtr peerInfo, IntPtr payload, int status, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginServerConnectionRequestCb(string serviceName, IntPtr peerInfo, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginServerErrorReportedCb(string serviceName, IntPtr peerInfo, int error, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void AittPluginServerDisconnectedCb(string serviceName, IntPtr peerInfo, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_create")]
- internal static extern ErrorCode AittPluginServerCreate(out ServerSafeHandle server, string serviceName, string displayName, string brokerIp, int brokerPort, string userName, string password, string myIp, int protocol);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_destroy")]
- internal static extern ErrorCode AittPluginServerDestroy(IntPtr server);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_listen")]
- internal static extern ErrorCode AittPluginServerListen(ServerSafeHandle server, AittPluginServerConnectionRequestCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_stop")]
- internal static extern ErrorCode AittPluginServerStop(ServerSafeHandle server);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_accept")]
- internal static extern ErrorCode AittPluginServerAccept(ServerSafeHandle server, PeerInfoSafeHandle peerInfo);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_reject")]
- internal static extern ErrorCode AittPluginServerReject(ServerSafeHandle server, PeerInfoSafeHandle peerInfo, string reason);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_disconnect")]
- internal static extern ErrorCode AittPluginServerDisconnect(ServerSafeHandle server, PeerInfoSafeHandle peerInfo);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_send_payload_async")]
- internal static extern ErrorCode AittPluginServerSendPayloadAsync(ServerSafeHandle server, PeerInfoSafeHandle peerInfo, PayloadSafeHandle payload, AittPluginServerPayloadAsyncResultCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_foreach_connected_peer_info")]
- internal static extern ErrorCode AittPluginServerForeachConnectedPeerInfo(ServerSafeHandle server, AittPluginServerPeerInfoIterator cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_add_connection_result_cb")]
- internal static extern ErrorCode AittPluginServerAddConnectionResultCb(ServerSafeHandle server, AittPluginServerConnectionResultCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_remove_connection_result_cb")]
- internal static extern ErrorCode AittPluginServerRemoveConnectionResultCb(ServerSafeHandle server, AittPluginServerConnectionResultCb cb);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_add_payload_received_cb")]
- internal static extern ErrorCode AittPluginServerAddPayloadReceivedCb(ServerSafeHandle server, AittPluginServerPayloadReceivedCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_remove_payload_received_cb")]
- internal static extern ErrorCode AittPluginServerRemovePayloadReceivedCb(ServerSafeHandle server, AittPluginServerPayloadReceivedCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_set_data_received_cb")]
- internal static extern ErrorCode AittPluginServerSetDataReceivedCb(ServerSafeHandle server, AittPluginServerDataReceivedCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_unset_data_received_cb")]
- internal static extern ErrorCode AittPluginServerUnsetDataReceivedCb(ServerSafeHandle server, AittPluginServerDataReceivedCb cb);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_add_disconnected_cb")]
- internal static extern ErrorCode AittPluginServerAddDisconnectedCb(ServerSafeHandle server, AittPluginServerDisconnectedCb cb, IntPtr userData);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_remove_disconnected_cb")]
- internal static extern ErrorCode AittPluginServerRemoveDisconnectedCb(ServerSafeHandle server, AittPluginServerDisconnectedCb cb);
-
- [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_set_display_name")]
- internal static extern ErrorCode AittPluginServerSetDisplayName(ServerSafeHandle server, string displayName);
- }
-)__cs_cb";
-
-#endif // IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_INTEROP_GEN_CB_H_
* limitations under the License.
*/
-#include "idlc/gen_aitt_plugin/aitt_plugin_c_transportable.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_c_transportable.h"
#include <utility>
constexpr const char __CLINET_FILE_SEND[] =
R"__c_cb(
<INTERNAL_PREFIX>_payload_h pl;
- int ret = <INTERNAL_PREFIX>_payload_create(&pl, AITT_PLUGIN_PAYLOAD_TYPE_FILE);
+ int ret = <INTERNAL_PREFIX>_payload_create(&pl, MQTT_PLUGIN_PAYLOAD_TYPE_FILE);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_create : %d", ret);
return ret;
}
ret = <INTERNAL_PREFIX>_payload_set_file_path(pl, <FILE_PATH>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_set_file_path : %d - %s", ret, value);
<INTERNAL_PREFIX>_payload_destroy(pl);
return ret;
}
ret = <INTERNAL_PREFIX>_client_send_payload_async(<CLIENT_H>, pl, NULL, NULL);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_client_send_payload_async : %d - %s", ret, value);
<INTERNAL_PREFIX>_payload_destroy(pl);
return ret;
constexpr const char __SERVER_FILE_SEND[] =
R"__c_cb(
<INTERNAL_PREFIX>_payload_h pl;
- int r = <INTERNAL_PREFIX>_payload_create(&pl, AITT_PLUGIN_PAYLOAD_TYPE_FILE);
+ int r = <INTERNAL_PREFIX>_payload_create(&pl, MQTT_PLUGIN_PAYLOAD_TYPE_FILE);
- if (r != AITT_PLUGIN_ERROR_NONE) {
+ if (r != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_create : %d", r);
return r;
}
r = <INTERNAL_PREFIX>_payload_set_file_path(pl, <FILE_PATH>);
- if (r != AITT_PLUGIN_ERROR_NONE) {
+ if (r != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_set_file_path : %d - %s", r, value);
<INTERNAL_PREFIX>_payload_destroy(pl);
return r;
}
r = <INTERNAL_PREFIX>_server_send_payload_async(<SERVER_H>, <PEER_H>, pl, NULL, NULL);
- if (r != AITT_PLUGIN_ERROR_NONE) {
+ if (r != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_server_send_payload_async : %d - %s", r, value);
<INTERNAL_PREFIX>_payload_destroy(pl);
return r;
constexpr const char __SERVER_REGISTER[] =
R"__c_cb(
- ret = <INTERNAL_PREFIX>_server_create(&__<NAME>.stub, service_name, display_name, broker_ip, broker_port, user_name, password, my_ip, protocols);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ ret = <INTERNAL_PREFIX>_server_create(&__<NAME>.stub, service_name, display_name, broker_ip, broker_port, user_name, password);
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to create stub handle. error(%d)", ret);
<PREFIX>_<NAME>_unregister();
return ret;
}
ret = <INTERNAL_PREFIX>_server_add_connection_result_cb(__<NAME>.stub, __<PREFIX>_<NAME>_connection_result_cb, &__<NAME>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to add connection result event callback");
<PREFIX>_<NAME>_unregister();
return ret;
}
ret = <INTERNAL_PREFIX>_server_add_payload_received_cb(__<NAME>.stub, __<PREFIX>_<NAME>_payload_received_cb, &__<NAME>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to add payload recieved event callback");
<PREFIX>_<NAME>_unregister();
return ret;
}
ret = <INTERNAL_PREFIX>_server_add_disconnected_cb(__<NAME>.stub, __<PREFIX>_<NAME>_disconnected_cb, &__<NAME>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to add disconnected event callback");
<PREFIX>_<NAME>_unregister();
return ret;
}
ret = <INTERNAL_PREFIX>_server_set_data_received_cb(__<NAME>.stub, __<PREFIX>_<NAME>_data_received_cb, &__<NAME>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to add data recieved event callback");
<PREFIX>_<NAME>_unregister();
return ret;
}
ret = <INTERNAL_PREFIX>_server_listen(__<NAME>.stub, __<PREFIX>_<NAME>_connection_request_cb, &__<NAME>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to listen events. error(%d)", ret);
<PREFIX>_<NAME>_unregister();
return ret;
constexpr const char __SERVER_ACCEPT[] =
R"__c_cb(
ret = <INTERNAL_PREFIX>_server_accept(__<NAME>.stub, peer_info);
- if (ret != AITT_PLUGIN_ERROR_NONE)
+ if (ret != MQTT_PLUGIN_ERROR_NONE)
_E("Failed to accept. error(%d)", ret);
)__c_cb";
constexpr const char __SERVER_REJECT[] =
R"__c_cb(
ret = <INTERNAL_PREFIX>_server_reject(__<NAME>.stub, peer_info, reason);
- if (ret != AITT_PLUGIN_ERROR_NONE)
+ if (ret != MQTT_PLUGIN_ERROR_NONE)
_E("Failed to reject. error(%d)", ret);
)__c_cb";
constexpr const char __SERVER_SET_DISPLAY_NAME[] =
R"__c_cb(
ret = <INTERNAL_PREFIX>_server_set_display_name(__<NAME>.stub, display_name);
- if (ret != AITT_PLUGIN_ERROR_NONE)
+ if (ret != MQTT_PLUGIN_ERROR_NONE)
_E("Failed to set display name. error(%d)", ret);
)__c_cb";
constexpr const char __CLIENT_TRY_CONNECT[] =
R"__c_cb(
ret = <INTERNAL_PREFIX>_client_connect(<CLIENT>, <PEER>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to connect to stub. error(%d)", ret);
return ret;
}
constexpr const char __CLIENT_DISCONNECT[] =
R"__c_cb(
ret = <INTERNAL_PREFIX>_client_disconnect(<CLIENT>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to disconnect to stub. error(%d)", ret);
return ret;
}
constexpr const char __CLIENT_TRY_DISCOVERY[] =
R"__c_cb(
ret = <INTERNAL_PREFIX>_client_try_discovery(<CLIENT>, __<PREFIX>_<NAME>_discovered, h);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to discovery to stub. error(%d)", ret);
return ret;
}
constexpr const char __CLIENT_STOP_DISCOVERY[] =
R"__c_cb(
ret = <INTERNAL_PREFIX>_client_stop_discovery(<CLIENT>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to stop discovery to stub. error(%d)", ret);
return ret;
}
constexpr const char __CLIENT_SEND_ASYNC[] =
R"__c_cb(
- res_ = <INTERNAL_PREFIX>_payload_create(&<PAYLOAD>, AITT_PLUGIN_PAYLOAD_TYPE_DATA);
- if (res_ != AITT_PLUGIN_ERROR_NONE) {
+ res_ = <INTERNAL_PREFIX>_payload_create(&<PAYLOAD>, MQTT_PLUGIN_PAYLOAD_TYPE_DATA);
+ if (res_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_create : %d", res_);
<INTERNAL_PREFIX>_payload_destroy(<PAYLOAD>);
goto out;
}
res_ = <INTERNAL_PREFIX>_payload_set_data(<PAYLOAD>, (const unsigned char*)data_, <SIZE>);
- if (res_ != AITT_PLUGIN_ERROR_NONE) {
+ if (res_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_set_data : %d", res_);
<INTERNAL_PREFIX>_payload_destroy(<PAYLOAD>);
goto out;
res_ = <INTERNAL_PREFIX>_client_send_payload_async(<CLIENT>, <PAYLOAD>, NULL, NULL);
<INTERNAL_PREFIX>_payload_destroy(<PAYLOAD>);
- if (res_ != AITT_PLUGIN_ERROR_NONE) {
+ if (res_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_client_send_payload_async : %d", res_);
goto out;
}
constexpr const char __CLIENT_SEND[] =
R"__c_cb(
res_ = <INTERNAL_PREFIX>_client_send_data(<CLIENT>, <DATA>, <DATA_SIZE> , 5 * 1000, &<RET_DATA>, &<RET_DATA_SIZE>);
- if (res_ != AITT_PLUGIN_ERROR_NONE) {
+ if (res_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to send parcel. error(%d)", res_);
goto out;
}
constexpr const char __SERVER_SEND_ASYNC[] =
R"__c_cb(
- ret_ = <INTERNAL_PREFIX>_payload_create(&<PAYLOAD>, AITT_PLUGIN_PAYLOAD_TYPE_DATA);
- if (ret_ != AITT_PLUGIN_ERROR_NONE) {
+ ret_ = <INTERNAL_PREFIX>_payload_create(&<PAYLOAD>, MQTT_PLUGIN_PAYLOAD_TYPE_DATA);
+ if (ret_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_create : %d", ret_);
<INTERNAL_PREFIX>_payload_destroy(<PAYLOAD>);
goto out;
}
ret_ = <INTERNAL_PREFIX>_payload_set_data(<PAYLOAD>, (const unsigned char*)data_, <SIZE>);
- if (ret_ != AITT_PLUGIN_ERROR_NONE) {
+ if (ret_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_set_data : %d", ret_);
<INTERNAL_PREFIX>_payload_destroy(<PAYLOAD>);
goto out;
ret_ = <INTERNAL_PREFIX>_server_send_payload_async(<SERVER>, peer_info, <PAYLOAD>, NULL, NULL);
<INTERNAL_PREFIX>_payload_destroy(<PAYLOAD>);
- if (ret_ != AITT_PLUGIN_ERROR_NONE) {
+ if (ret_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_client_send_payload_async : %d", ret_);
goto out;
}
constexpr const char __GROUP_PUBLISH[] =
R"__c_cb(
- res_ = <INTERNAL_PREFIX>_payload_create(&pl_, AITT_PLUGIN_PAYLOAD_TYPE_DATA);
- if (res_ != AITT_PLUGIN_ERROR_NONE) {
+ res_ = <INTERNAL_PREFIX>_payload_create(&pl_, MQTT_PLUGIN_PAYLOAD_TYPE_DATA);
+ if (res_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_create : %d", res_);
<INTERNAL_PREFIX>_payload_destroy(pl_);
goto out;
}
res_ = <INTERNAL_PREFIX>_payload_set_data(pl_, (const unsigned char*)data_, data_size_);
- if (res_ != AITT_PLUGIN_ERROR_NONE) {
+ if (res_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_set_data : %d", res_);
<INTERNAL_PREFIX>_payload_destroy(pl_);
goto out;
res_ = <INTERNAL_PREFIX>_group_publish(h->group, pl_);
<INTERNAL_PREFIX>_payload_destroy(pl_);
- if (res_ != AITT_PLUGIN_ERROR_NONE) {
+ if (res_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_group_publish : %d", res_);
goto out;
}
constexpr const char __CLIENT_CREATE[] =
R"__c_cb(
- ret = <INTERNAL_PREFIX>_client_create(&handle->client, service_name, broker_ip, broker_port, user_name, password, my_ip, protocols);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ ret = <INTERNAL_PREFIX>_client_create(&handle->client, service_name, broker_ip, broker_port, user_name, password);
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to create proxy handle. error(%d)", ret);
<PREFIX>_<NAME>_destroy(handle);
return ret;
handle->user_data = user_data;
ret = <INTERNAL_PREFIX>_client_add_connection_result_cb(handle->client, __<PREFIX>_<NAME>_connection_result, handle);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to add connection result cb. error(%d)", ret);
<PREFIX>_<NAME>_destroy(handle);
return ret;
}
ret = <INTERNAL_PREFIX>_client_add_disconnected_cb(handle->client, __<PREFIX>_<NAME>_disconnected, handle);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to add disconnected event cb. error(%d)", ret);
<PREFIX>_<NAME>_destroy(handle);
return ret;
}
ret = <INTERNAL_PREFIX>_client_add_payload_received_cb(handle->client, __<PREFIX>_<NAME>_received, handle);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to add received event cb. error(%d)", ret);
<PREFIX>_<NAME>_destroy(handle);
return ret;
constexpr const char __GROUP_CREATE[] =
R"__c_cb(
- ret = <INTERNAL_PREFIX>_group_create(&handle->group, topic_name, broker_ip, broker_port, user_name, password, my_ip, protocols);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ ret = <INTERNAL_PREFIX>_group_create(&handle->group, topic_name, broker_ip, broker_port, user_name, password);
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to create group handle. error(%d)", ret);
<PREFIX>_<NAME>_destroy(handle);
return ret;
handle->user_data = user_data;
ret = <INTERNAL_PREFIX>_group_add_joined_cb(handle->group, __<PREFIX>_<NAME>_joined_cb, handle);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to add connection result cb. error(%d)", ret);
<PREFIX>_<NAME>_destroy(handle);
return ret;
}
ret = <INTERNAL_PREFIX>_group_add_left_cb(handle->group, __<PREFIX>_<NAME>_left_cb, handle);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to add disconnected event cb. error(%d)", ret);
<PREFIX>_<NAME>_destroy(handle);
return ret;
}
ret = <INTERNAL_PREFIX>_group_add_payload_received_cb(handle->group, __<PREFIX>_<NAME>_received, handle);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to add received event cb. error(%d)", ret);
<PREFIX>_<NAME>_destroy(handle);
return ret;
}
ret = <INTERNAL_PREFIX>_group_subscribe(handle->group);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to subscribe event. error(%d)", ret);
<PREFIX>_<NAME>_destroy(handle);
return ret;
int ret;
ret = <INTERNAL_PREFIX>_server_set_on_demand_launch_enabled(__<NAME>.stub, enable);
- if (ret != AITT_PLUGIN_ERROR_NONE)
+ if (ret != MQTT_PLUGIN_ERROR_NONE)
_E("Failed to set ondemand launch enable. error(%d)", ret);
return ret;
R"__c_cb(
typedef enum _<MODULE_PREFIX>_error {
- AITT_PLUGIN_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
- AITT_PLUGIN_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
- AITT_PLUGIN_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
- AITT_PLUGIN_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
- AITT_PLUGIN_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
- AITT_PLUGIN_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented */
- AITT_PLUGIN_ERROR_ALREADY_IN_PROGRESS = TIZEN_ERROR_ALREADY_IN_PROGRESS, /**< Already in progress */
- AITT_PLUGIN_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
- AITT_PLUGIN_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< Timed out */
- AITT_PLUGIN_ERROR_OPERATION_FAILED = TIZEN_ERROR_CION | 0x01, /**< Operation failed */
+ MQTT_PLUGIN_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
+ MQTT_PLUGIN_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
+ MQTT_PLUGIN_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+ MQTT_PLUGIN_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+ MQTT_PLUGIN_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+ MQTT_PLUGIN_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented */
+ MQTT_PLUGIN_ERROR_ALREADY_IN_PROGRESS = TIZEN_ERROR_ALREADY_IN_PROGRESS, /**< Already in progress */
+ MQTT_PLUGIN_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
+ MQTT_PLUGIN_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< Timed out */
+ MQTT_PLUGIN_ERROR_OPERATION_FAILED = TIZEN_ERROR_CION | 0x01, /**< Operation failed */
} <MODULE_PREFIX>_error_e;
-enum AittProtocol {
- AITT_TYPE_MQTT = (0x1 << 0), // Publish message through the MQTT
- AITT_TYPE_TCP = (0x1 << 1), // Publish message to peers using the TCP
- AITT_TYPE_UDP = (0x1 << 2), // Publish message to peers using the UDP
- AITT_TYPE_SRTP = (0x1 << 3), // Publish message to peers using the SRTP
- AITT_TYPE_WEBRTC = (0x1 << 4), // Publish message to peers using the WEBRTC
+enum MqttProtocol {
+ MQTT_TYPE_MQTT = (0x1 << 0), // Publish message through the MQTT
+ MQTT_TYPE_TCP = (0x1 << 1), // Publish message to peers using the TCP
+ MQTT_TYPE_UDP = (0x1 << 2), // Publish message to peers using the UDP
+ MQTT_TYPE_SRTP = (0x1 << 3), // Publish message to peers using the SRTP
+ MQTT_TYPE_WEBRTC = (0x1 << 4), // Publish message to peers using the WEBRTC
};
/**
- * @brief The aitt plugin peer info handle.
+ * @brief The mqtt plugin peer info handle.
*/
typedef void *<MODULE_PREFIX>_peer_info_h;
constexpr const char __COMMON_HEADER_CONNECTION_RESULT_HANDLE[] =
R"__c_cb(
-typedef enum _aitt_connection_status_e {
- AITT_PLUGIN_CONNECTION_STATUS_OK, /**< Connection is ok **/
- AITT_PLUGIN_CONNECTION_STATUS_REJECTED, /**< Connection is rejected **/
- AITT_PLUGIN_CONNECTION_STATUS_ERROR, /**< Connection error occurs **/
+typedef enum _mqtt_connection_status_e {
+ MQTT_PLUGIN_CONNECTION_STATUS_OK, /**< Connection is ok **/
+ MQTT_PLUGIN_CONNECTION_STATUS_REJECTED, /**< Connection is rejected **/
+ MQTT_PLUGIN_CONNECTION_STATUS_ERROR, /**< Connection error occurs **/
} <MODULE_PREFIX>_connection_status_e;
/**
- * @brief The Aitt plugin connection result handle.
+ * @brief The Mqtt plugin connection result handle.
*/
typedef void *<MODULE_PREFIX>_connection_result_h;
)__c_cb";
* @brief Enumeration for <MODULE_PREFIX>_payload transfer status types.
*/
typedef enum _payload_transfer_status_e {
- AITT_PLUGIN_PAYLOAD_TRANSFER_STATUS_SUCCESS, /**< Transfer is success **/
- AITT_PLUGIN_PAYLOAD_TRANSFER_STATUS_FAILURE, /**< Transfer is failed **/
- AITT_PLUGIN_PAYLOAD_TRANSFER_STATUS_IN_PROGRESS, /**< Transfer is in progress **/
+ MQTT_PLUGIN_PAYLOAD_TRANSFER_STATUS_SUCCESS, /**< Transfer is success **/
+ MQTT_PLUGIN_PAYLOAD_TRANSFER_STATUS_FAILURE, /**< Transfer is failed **/
+ MQTT_PLUGIN_PAYLOAD_TRANSFER_STATUS_IN_PROGRESS, /**< Transfer is in progress **/
} <MODULE_PREFIX>_payload_transfer_status_e;
/**
* @param[in] payload The <MODULE_PREFIX>_payload handle
* @param[in] path The path of file
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_PERMISSION_DENIED Permission denied
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OPERATION_FAILED Operation failed
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OPERATION_FAILED Operation failed
*/
int <MODULE_PREFIX>_payload_save_as_file(<MODULE_PREFIX>_payload_h payload, const char *path);
* @param[in] payload The <MODULE_PREFIX>_payload handle
* @param[out] file_name The name of file
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_payload_get_received_file_name(<MODULE_PREFIX>_payload_h payload,
* @param[in] payload The <MODULE_PREFIX>_payload handle
* @param[out] bytes The size of file
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
*/
int <MODULE_PREFIX>_payload_get_received_bytes(<MODULE_PREFIX>_payload_h payload, uint64_t *bytes);
* @param[in] payload The <MODULE_PREFIX>_payload handle
* @param[out] bytes The size of file
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
*/
int <MODULE_PREFIX>_payload_get_total_bytes(<MODULE_PREFIX>_payload_h payload, uint64_t *bytes);
)__c_cb";
constexpr const char __COMMON_HEADER_COMMON_BASE[] =
R"__c_cb(
/**
- * @brief Creates a clone of aitt plugin peer info handle.
+ * @brief Creates a clone of mqtt plugin peer info handle.
* @remarks @a peer_info_clone must be released using <MODULE_PREFIX>_peer_info_destroy().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] peer_info_clone The cloned peer information handle
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #AITT_PLUGIN_ERROR_IO_ERROR IO error
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_IO_ERROR IO error
* @see <MODULE_PREFIX>_peer_info_destroy()
*/
int <MODULE_PREFIX>_peer_info_clone(const <MODULE_PREFIX>_peer_info_h peer_info,
/**
* @brief Destroys the peer info handle and releases all its resources.
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
* @see <MODULE_PREFIX>_peer_info_clone()
*/
int <MODULE_PREFIX>_peer_info_destroy(<MODULE_PREFIX>_peer_info_h peer_info);
/**
* @brief Gets the device ID.
* @remarks @a device_id must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] device_id The device ID
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_device_id(<MODULE_PREFIX>_peer_info_h peer_info,
char **device_id);
/**
* @brief Gets the device name.
* @remarks @a device_name must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] device_name The device name
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_device_name(<MODULE_PREFIX>_peer_info_h peer_info,
char **device_name);
/**
* @brief Gets the device's platform.
* @remarks @a device_platform must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] device_platform The platform name
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_device_platform(<MODULE_PREFIX>_peer_info_h peer_info,
char **device_platform);
/**
* @brief Gets the device's platform version.
* @remarks @a device_platform_version must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] device_platform_version The platform version
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_device_platform_version(<MODULE_PREFIX>_peer_info_h peer_info,
char **device_platform_version);
/**
* @brief Gets the device's type.
* @remarks @a device_type must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] device_type Device type
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_device_type(<MODULE_PREFIX>_peer_info_h peer_info,
char **device_type);
/**
* @brief Gets application ID of peer.
* @remarks @a app_id must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] app_id The application ID
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_app_id(<MODULE_PREFIX>_peer_info_h peer_info,
char **app_id);
/**
* @brief Gets application version of peer.
* @remarks @a app_version must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] app_version The application version
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_app_version(<MODULE_PREFIX>_peer_info_h peer_info,
char **app_version);
/**
* @brief Gets UUID of peer.
* @remarks @a uuid must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] uuid The UUID
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_uuid(<MODULE_PREFIX>_peer_info_h peer_info,
char **uuid);
* @details The custom name for service name. \n
* It is possible that @a display_name does not exist.
* @remarks @a display_name must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] display_name The display name
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_display_name(<MODULE_PREFIX>_peer_info_h peer_info,
char **display_name);
* @param[in] result The connection result handle
* @param[out] status Connection result status
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
*/
int <MODULE_PREFIX>_connection_result_get_status(const <MODULE_PREFIX>_connection_result_h result,
<MODULE_PREFIX>_connection_status_e *status);
* @param[in] result The connection result handle
* @param[out] reason Connection result reason, should be freed after use
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_connection_result_get_reason(const <MODULE_PREFIX>_connection_result_h result,
char **reason);
* @param[in] port The network port to connect to. Usually 1883
* @param[in] user_name The user name to connect to
* @param[in] password The Password to connect to
- * @param[in] my_ip Own device ip address for connecting by others
- * @param[in] protocols value of @a aitt_protocol_e. The value can be bitwise-or'd
* @param[in] callback The set of callback functions to handle stub events
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success,
*/
int <PREFIX>_<NAME>_register(const char *service_name, const char *display_name,
const char *broker_ip, int broker_port, const char *user_name,
- const char *password, const char *my_ip, int protocols,
- <PREFIX>_<NAME>_callback_s *callback, void *user_data);
+ const char *password, <PREFIX>_<NAME>_callback_s *callback, void *user_data);
)__c_cb";
constexpr const char __SERVER_BODY_EXTRA[] =
R"__c_cb(
int <PREFIX>_<NAME>_register(const char *service_name, const char *display_name,
const char *broker_ip, int broker_port, const char *user_name,
- const char *password, const char *my_ip, int protocols,
- <PREFIX>_<NAME>_callback_s *callback, void *user_data)
+ const char *password, <PREFIX>_<NAME>_callback_s *callback, void *user_data)
)__c_cb";
constexpr const char __CLIENT_HEADER_EXTRA[] =
* @param[in] port The network port to connect to. Usually 1883.
* @param[in] user_name The user name to connect to
* @param[in] password The Password to connect to
- * @param[in] my_ip Own device ip address for connecting by others
- * @param[in] protocols value of @a aitt_protocol_e. The value can be bitwise-or'd.
* @param[in] callback The set of callback functions to handle proxy events
* @param[in] user_data The user data to be passed to the callback function
* @param[out] h The <PREFIX>_<NAME> handle
* @see #<PREFIX>_<NAME>_callback_s
*/
int <PREFIX>_<NAME>_create(const char *service_name, const char *broker_ip, int broker_port,
- const char *user_name, const char *password, const char *my_ip, int protocols,
+ const char *user_name, const char *password,
<PREFIX>_<NAME>_callback_s *callback, void *user_data, <PREFIX>_<NAME>_h *h);
)__c_cb";
constexpr const char __CLIENT_BODY_EXTRA[] =
R"__c_cb(
int <PREFIX>_<NAME>_create(const char *service_name, const char *broker_ip, int broker_port,
- const char *user_name, const char *password, const char *my_ip, int protocols,
+ const char *user_name, const char *password,
<PREFIX>_<NAME>_callback_s *callback, void *user_data, <PREFIX>_<NAME>_h *h)
)__c_cb";
* @param[in] port The network port to connect to. Usually 1883.
* @param[in] user_name The user name to connect to
* @param[in] password The Password to connect to
- * @param[in] my_ip Own device ip address for connecting by others
- * @param[in] protocols value of @a aitt_protocol_e. The value can be bitwise-or'd.
* @param[in] callback The set of callback functions to handle events
* @param[in] user_data The user data to be passed to the callback function
* @param[out] h The <PREFIX>_<NAME> handle
* @return @c 0 on success,
* otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_NOT_SUPPORTED Not supported
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #AITT_PLUGIN_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_NOT_SUPPORTED Not supported
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_PERMISSION_DENIED Permission denied
* @see <PREFIX>_<NAME>_destroy()
* @see #<PREFIX>_<NAME>_callback_s
*/
int <PREFIX>_<NAME>_create(const char *topic_name, const char *broker_ip, int broker_port,
const char *user_name, const char *password,
- const char *my_ip, int protocols,
<PREFIX>_<NAME>_callback_s *callback, void *user_data, <PREFIX>_<NAME>_h *h);
)__c_cb";
R"__c_cb(
int <PREFIX>_<NAME>_create(const char *topic_name, const char *broker_ip, int broker_port,
const char *user_name, const char *password,
- const char *my_ip, int protocols,
<PREFIX>_<NAME>_callback_s *callback, void *user_data, <PREFIX>_<NAME>_h *h)
)__c_cb";
namespace tidl {
-std::string AittPluginCTransportable::GenInclude(bool body, int type) const {
+std::string MqttPluginCTransportable::GenInclude(bool body, int type) const {
if (!body)
return __INCLUDE_HEADER_DEF;
else
return "#include \"<FILENAME>_internal.h\"";
}
-std::string AittPluginCTransportable::GenHeaderBase() const {
+std::string MqttPluginCTransportable::GenHeaderBase() const {
return __COMMON_HEADER_COMMON_BASE;
}
-std::string AittPluginCTransportable::GenHeaderPayloadHandle() const {
+std::string MqttPluginCTransportable::GenHeaderPayloadHandle() const {
return __COMMON_HEADER_PAYLOAD_HANDLE;
}
-std::string AittPluginCTransportable::GenHeaderCommonHandle() const {
+std::string MqttPluginCTransportable::GenHeaderCommonHandle() const {
return __COMMON_HEADER_HANDLES;
}
-std::string AittPluginCTransportable::GenHeaderConnectionHandle() const {
+std::string MqttPluginCTransportable::GenHeaderConnectionHandle() const {
return __COMMON_HEADER_CONNECTION_RESULT_HANDLE;
}
-std::string AittPluginCTransportable::GenHeaderPayloadBase() const {
+std::string MqttPluginCTransportable::GenHeaderPayloadBase() const {
return __COMMON_HEADER_PAYLOAD_BASE;
}
-std::string AittPluginCTransportable::GenHeaderConnectionBase() const {
+std::string MqttPluginCTransportable::GenHeaderConnectionBase() const {
return __COMMON_HEADER_CONNECTION_RESULT_BASE;
}
-std::string AittPluginCTransportable::GenBodyPayloadBase() const {
+std::string MqttPluginCTransportable::GenBodyPayloadBase() const {
return __COMMON_BODY_PAYLOAD_BASE;
}
-std::string AittPluginCTransportable::GenBodyConnectionBase() const {
+std::string MqttPluginCTransportable::GenBodyConnectionBase() const {
return __COMMON_BODY_CONNECTION_RESULT_BASE;
}
-std::string AittPluginCTransportable::GenBodyPeerInfoBase() const {
+std::string MqttPluginCTransportable::GenBodyPeerInfoBase() const {
return __COMMON_BODY_PEERINFO_BASE;
}
-std::string AittPluginCTransportable::GenProxyPrefix() const {
- return "aitt_plugin_proxy";
+std::string MqttPluginCTransportable::GenProxyPrefix() const {
+ return "mqtt_plugin_proxy";
}
-std::string AittPluginCTransportable::GenStubPrefix() const {
- return "aitt_plugin_stub";
+std::string MqttPluginCTransportable::GenStubPrefix() const {
+ return "mqtt_plugin_stub";
}
-std::string AittPluginCTransportable::GenGroupPrefix() const {
- return "aitt_plugin_group";
+std::string MqttPluginCTransportable::GenGroupPrefix() const {
+ return "mqtt_plugin_group";
}
-std::string AittPluginCTransportable::GenModulePrefix() const {
- return "aitt_plugin";
+std::string MqttPluginCTransportable::GenModulePrefix() const {
+ return "mqtt_plugin";
}
-std::string AittPluginCTransportable::GenErrorPrefix() const {
- return "AITT_PLUGIN";
+std::string MqttPluginCTransportable::GenErrorPrefix() const {
+ return "MQTT_PLUGIN";
}
-std::string AittPluginCTransportable::GenServerExtra(bool body) const {
+std::string MqttPluginCTransportable::GenServerExtra(bool body) const {
if (body)
return __SERVER_BODY_EXTRA;
else
return __SERVER_HEADER_EXTRA;
}
-std::string AittPluginCTransportable::GenClientExtra(bool body) const {
+std::string MqttPluginCTransportable::GenClientExtra(bool body) const {
if (body)
return __CLIENT_BODY_EXTRA;
else
return __CLIENT_HEADER_EXTRA;
}
-std::string AittPluginCTransportable::GenGroupExtra(bool body) const {
+std::string MqttPluginCTransportable::GenGroupExtra(bool body) const {
if (body)
return __GROUP_BODY_EXTRA;
else
return __GROUP_HEADER_EXTRA;
}
-std::string AittPluginCTransportable::GenClientSendAsync(std::string client,
+std::string MqttPluginCTransportable::GenClientSendAsync(std::string client,
std::string payload, std::string size) const {
return std::string(ReplaceAll(__CLIENT_SEND_ASYNC, {
{ "<CLIENT>", client },
{ "<SIZE>", size} }));
}
-std::string AittPluginCTransportable::GenClientSend(std::string client,
+std::string MqttPluginCTransportable::GenClientSend(std::string client,
std::string data, std::string data_size,
std::string ret_data, std::string ret_data_size) const {
return std::string(ReplaceAll(__CLIENT_SEND, {
{ "<RET_DATA_SIZE>", ret_data_size} }));
}
-std::string AittPluginCTransportable::GenServerSendAsync(std::string server,
+std::string MqttPluginCTransportable::GenServerSendAsync(std::string server,
std::string client,
std::string payload, std::string size) const {
return std::string(ReplaceAll(__SERVER_SEND_ASYNC, {
{ "<SIZE>", size} }));
}
-std::string AittPluginCTransportable::GenServerFileSend(std::string path,
+std::string MqttPluginCTransportable::GenServerFileSend(std::string path,
std::string server, std::string peer) const {
return std::string(ReplaceAll(__SERVER_FILE_SEND, {
{ "<FILE_PATH>", path },
{ "<PEER_H>", peer } }));
}
-std::string AittPluginCTransportable::GenClientFileSend(std::string path,
+std::string MqttPluginCTransportable::GenClientFileSend(std::string path,
std::string client) const {
return std::string(ReplaceAll(__CLINET_FILE_SEND, {
{ "<FILE_PATH>", path },
{ "<CLIENT_H>", client } }));
}
-std::string AittPluginCTransportable::GenGroupType() const {
+std::string MqttPluginCTransportable::GenGroupType() const {
return "<INTERNAL_PREFIX>_group_h";
}
-std::string AittPluginCTransportable::GenPayloadTransferStatusType(bool internal_type) const {
+std::string MqttPluginCTransportable::GenPayloadTransferStatusType(bool internal_type) const {
if (internal_type)
return "<INTERNAL_PREFIX>_transfer_status_e";
else
return "<MODULE_PREFIX>_payload_transfer_status_e";
}
-std::string AittPluginCTransportable::GenPeerInfoType() const {
+std::string MqttPluginCTransportable::GenPeerInfoType() const {
return "<MODULE_PREFIX>_peer_info_h";
}
-std::string AittPluginCTransportable::GenPeerInfoDestroy(std::string peer) const {
+std::string MqttPluginCTransportable::GenPeerInfoDestroy(std::string peer) const {
return std::string(ReplaceAll("<MODULE_PREFIX>_peer_info_destroy(<PEER>);", {
{ "<PEER>", peer } }));
}
-std::string AittPluginCTransportable::GenPayloadType(bool internal_type) const {
+std::string MqttPluginCTransportable::GenPayloadType(bool internal_type) const {
if (internal_type)
return "<INTERNAL_PREFIX>_payload_h";
else
return "<MODULE_PREFIX>_payload_h";
}
-std::string AittPluginCTransportable::GenClientType() const {
+std::string MqttPluginCTransportable::GenClientType() const {
return "<INTERNAL_PREFIX>_client_h";
}
-std::string AittPluginCTransportable::GenSecurityType(bool definition) const {
+std::string MqttPluginCTransportable::GenSecurityType(bool definition) const {
return "";
}
-std::string AittPluginCTransportable::GenServerType() const {
+std::string MqttPluginCTransportable::GenServerType() const {
return "<INTERNAL_PREFIX>_server_h";
}
-std::string AittPluginCTransportable::GenClientTryConnect(std::string client,
+std::string MqttPluginCTransportable::GenClientTryConnect(std::string client,
std::string peer) const {
return std::string(ReplaceAll(__CLIENT_TRY_CONNECT, {
{ "<CLIENT>", client },
{ "<PEER>", peer } }));
}
-std::string AittPluginCTransportable::GenClientDisconnect(
+std::string MqttPluginCTransportable::GenClientDisconnect(
std::string client) const {
return std::string(ReplaceAll(__CLIENT_DISCONNECT, {
{ "<CLIENT>", client } }));
}
-std::string AittPluginCTransportable::GenClientTryDiscovery(
+std::string MqttPluginCTransportable::GenClientTryDiscovery(
std::string client) const {
return std::string(ReplaceAll(__CLIENT_TRY_DISCOVERY, {
{ "<CLIENT>", client } }));
}
-std::string AittPluginCTransportable::GenClientStopDiscovery(
+std::string MqttPluginCTransportable::GenClientStopDiscovery(
std::string client) const {
return std::string(ReplaceAll(__CLIENT_STOP_DISCOVERY, {
{ "<CLIENT>", client } }));
}
-std::string AittPluginCTransportable::GenServerRegister() const {
+std::string MqttPluginCTransportable::GenServerRegister() const {
return __SERVER_REGISTER;
}
-std::string AittPluginCTransportable::GenServerUnregister() const {
+std::string MqttPluginCTransportable::GenServerUnregister() const {
return __SERVER_UNREGISTER;
}
-std::string AittPluginCTransportable::GenClientExtraHeader() const {
+std::string MqttPluginCTransportable::GenClientExtraHeader() const {
return "";
}
-std::string AittPluginCTransportable::GenClientExtraBody() const {
+std::string MqttPluginCTransportable::GenClientExtraBody() const {
return "";
}
-std::string AittPluginCTransportable::GenServerExtraHeader() const {
+std::string MqttPluginCTransportable::GenServerExtraHeader() const {
return "";
}
-std::string AittPluginCTransportable::GenServerExtraBody() const {
+std::string MqttPluginCTransportable::GenServerExtraBody() const {
return "";
}
-std::string AittPluginCTransportable::GenServerAccept() const {
+std::string MqttPluginCTransportable::GenServerAccept() const {
return __SERVER_ACCEPT;
}
-std::string AittPluginCTransportable::GenServerReject() const {
+std::string MqttPluginCTransportable::GenServerReject() const {
return __SERVER_REJECT;
}
-std::string AittPluginCTransportable::GenServerSetDisplayName() const {
+std::string MqttPluginCTransportable::GenServerSetDisplayName() const {
return __SERVER_SET_DISPLAY_NAME;
}
-std::string AittPluginCTransportable::GenGroupPublish() const {
+std::string MqttPluginCTransportable::GenGroupPublish() const {
return __GROUP_PUBLISH;
}
-std::string AittPluginCTransportable::GenPayloadTypeEnum() const {
+std::string MqttPluginCTransportable::GenPayloadTypeEnum() const {
return "<INTERNAL_PREFIX>_payload_type_e";
}
-std::string AittPluginCTransportable::GenPayloadTypeData() const {
- return "AITT_PLUGIN_PAYLOAD_TYPE_DATA";
+std::string MqttPluginCTransportable::GenPayloadTypeData() const {
+ return "MQTT_PLUGIN_PAYLOAD_TYPE_DATA";
}
-std::string AittPluginCTransportable::GenPayloadTypeFile() const {
- return "AITT_PLUGIN_PAYLOAD_TYPE_FILE";
+std::string MqttPluginCTransportable::GenPayloadTypeFile() const {
+ return "MQTT_PLUGIN_PAYLOAD_TYPE_FILE";
}
-std::string AittPluginCTransportable::GenPayloadGetType() const {
+std::string MqttPluginCTransportable::GenPayloadGetType() const {
return "ret = <INTERNAL_PREFIX>_payload_get_type(payload, &type);";
}
-std::string AittPluginCTransportable::GenErrorNone() const {
- return "AITT_PLUGIN_ERROR_NONE";
+std::string MqttPluginCTransportable::GenErrorNone() const {
+ return "MQTT_PLUGIN_ERROR_NONE";
}
-std::string AittPluginCTransportable::GenPayloadGetData() const {
+std::string MqttPluginCTransportable::GenPayloadGetData() const {
return "ret = <INTERNAL_PREFIX>_payload_get_data(payload, &data, &data_len);";
}
-std::string AittPluginCTransportable::GenClientCreate() const {
+std::string MqttPluginCTransportable::GenClientCreate() const {
return __CLIENT_CREATE;
}
-std::string AittPluginCTransportable::GenGroupCreate() const {
+std::string MqttPluginCTransportable::GenGroupCreate() const {
return __GROUP_CREATE;
}
-std::string AittPluginCTransportable::GenGroupDestroy() const {
+std::string MqttPluginCTransportable::GenGroupDestroy() const {
return __GROUP_DESTROY;
}
-std::string AittPluginCTransportable::GenClientDestroy() const {
+std::string MqttPluginCTransportable::GenClientDestroy() const {
return __CLIENT_DESTROY;
}
-std::string AittPluginCTransportable::GenSetSecurityCA(std::string arg) const {
+std::string MqttPluginCTransportable::GenSetSecurityCA(std::string arg) const {
return "";
}
-std::string AittPluginCTransportable::GenSetSecurityCert(std::string arg) const {
+std::string MqttPluginCTransportable::GenSetSecurityCert(std::string arg) const {
return "";
}
-std::string AittPluginCTransportable::GenSetSecurityPrivateKey(std::string arg) const {
+std::string MqttPluginCTransportable::GenSetSecurityPrivateKey(std::string arg) const {
return "";
}
-std::string AittPluginCTransportable::GenPeerInfoClone(std::string src_peer,
+std::string MqttPluginCTransportable::GenPeerInfoClone(std::string src_peer,
std::string dest_peer) const {
return std::string(ReplaceAll(__PEER_INFO_CLONE, {
{ "<SRC_PEER>", src_peer },
{ "<DEST_PEER>", dest_peer } }));
}
-std::string AittPluginCTransportable::GenServerForeachConnectedPeerInfo(
+std::string MqttPluginCTransportable::GenServerForeachConnectedPeerInfo(
std::string name) const {
return std::string(ReplaceAll(__SERVER_FOREACH_CONNECTED_PEER_INFO, {
{ "<NAME>", name } }));
* limitations under the License.
*/
-#ifndef IDLC_GEN_AITT_PLUGIN_C_TRANSPORTABLE_H_
-#define IDLC_GEN_AITT_PLUGIN_C_TRANSPORTABLE_H_
+#ifndef IDLC_GEN_MQTT_PLUGIN_C_TRANSPORTABLE_H_
+#define IDLC_GEN_MQTT_PLUGIN_C_TRANSPORTABLE_H_
#include <string>
namespace tidl {
-class AittPluginCTransportable : public CTransportable {
+class MqttPluginCTransportable : public CTransportable {
public:
- virtual ~AittPluginCTransportable() = default;
+ virtual ~MqttPluginCTransportable() = default;
std::string GenInclude(bool body = true, int type = 0) const override;
std::string GenHeaderBase() const override;
std::string GenHeaderPayloadHandle() const override;
} // namespace tidl
-#endif // IDLC_GEN_AITT_PLUGIN_C_TRANSPORTABLE_H_
+#endif // IDLC_GEN_MQTT_PLUGIN_C_TRANSPORTABLE_H_
* limitations under the License.
*/
-#include "idlc/gen_aitt_plugin/aitt_plugin_cpp_transportable.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_cpp_transportable.h"
#include <utility>
constexpr const char __CLINET_FILE_SEND[] =
R"__cpp_cb(<PAYLOAD_T> pl;
- int ret = <INTERNAL_PREFIX>_payload_create(&pl, AITT_PLUGIN_PAYLOAD_TYPE_FILE);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ int ret = <INTERNAL_PREFIX>_payload_create(&pl, MQTT_PLUGIN_PAYLOAD_TYPE_FILE);
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_create : %d", ret);
return;
}
ret = <INTERNAL_PREFIX>_payload_set_file_path(pl, <FILE_PATH>.c_str());
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_set_file_path : %d - %s", ret, <FILE_PATH>.c_str());
<INTERNAL_PREFIX>_payload_destroy(pl);
return;
}
ret = <INTERNAL_PREFIX>_client_send_payload_async(<CLIENT_H>, pl, nullptr, nullptr);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_client_send_payload_async : %d", ret);
<INTERNAL_PREFIX>_payload_destroy(pl);
return;
constexpr const char __SERVER_FILE_SEND[] =
R"__cpp_cb(<PAYLOAD_T> pl;
- int ret = <INTERNAL_PREFIX>_payload_create(&pl, AITT_PLUGIN_PAYLOAD_TYPE_FILE);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ int ret = <INTERNAL_PREFIX>_payload_create(&pl, MQTT_PLUGIN_PAYLOAD_TYPE_FILE);
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_create : %d", ret);
return;
}
ret = <INTERNAL_PREFIX>_payload_set_file_path(pl, <FILE_PATH>.c_str());
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_set_file_path : %d - %s", ret, <FILE_PATH>.c_str());
<INTERNAL_PREFIX>_payload_destroy(pl);
return;
}
ret = <INTERNAL_PREFIX>_server_send_payload_async(<SERVER_H>, <PEER_H>, pl, nullptr, nullptr);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_server_send_payload_async : %d", ret);
<INTERNAL_PREFIX>_payload_destroy(pl);
return;
constexpr const char __SERVER_REGISTER[] =
R"__cpp_cb(<SERVER_T> server;
int ret = <INTERNAL_PREFIX>_server_create(&server, service_name.c_str(),
- display_name.c_str(), broker_ip.c_str(), broker_port, user_name.c_str(), password.c_str(), my_ip.c_str(), protocols);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ display_name.c_str(), broker_ip.c_str(), broker_port, user_name.c_str(), password.c_str());
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to create handle. error(%d)", ret);
throw InvalidIOException();
}
ret = <INTERNAL_PREFIX>_server_add_connection_result_cb(server, OnConnectionResultCB,
this);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_server_add_connection_result_cb. error(%d)", ret);
throw InvalidIOException();
}
static_cast<<MODULE_PREFIX>_payload_transfer_status_e>(status), user_data);
},
this);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_server_add_payload_received_cb. error(%d)", ret);
throw InvalidIOException();
}
ret = <INTERNAL_PREFIX>_server_set_data_received_cb(server, OnDataReceivedCB, this);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_server_set_data_received_cb. error(%d)", ret);
throw InvalidIOException();
}
ret = <INTERNAL_PREFIX>_server_add_disconnected_cb(server, OnDisconnectedCB, this);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_server_add_disconnected_cb. error(%d)", ret);
throw InvalidIOException();
}
constexpr const char __SERVER_ACCEPT[] =
R"__cpp_cb(auto p = service->GetPeer();
int ret = <INTERNAL_PREFIX>_server_accept(server_, p);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_server_accept. error(%d)", ret);
throw InvalidIOException();
}
constexpr const char __SERVER_REJECT[] =
R"__cpp_cb(auto p = service->GetPeer();
int ret = <INTERNAL_PREFIX>_server_reject(server_, p, reason.c_str());
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_server_reject. error(%d)", ret);
throw InvalidIOException();
}
constexpr const char __SERVER_SET_DISPLAY_NAME[] =
R"__cpp_cb(int ret = <INTERNAL_PREFIX>_server_set_display_name(server_, display_name.c_str());
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_server_set_display_name. error(%d)", ret);
InvalidIOException();
}
constexpr const char __CLIENT_TRY_CONNECT[] =
R"__cpp_cb(int ret = <INTERNAL_PREFIX>_client_connect(<CLIENT>, <PEER>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to connect to stub. error(%d)", ret);
switch(ret) {
- case AITT_PLUGIN_ERROR_PERMISSION_DENIED :
+ case MQTT_PLUGIN_ERROR_PERMISSION_DENIED :
throw UnauthorizedAccessException();
break;
- case AITT_PLUGIN_ERROR_INVALID_PARAMETER :
+ case MQTT_PLUGIN_ERROR_INVALID_PARAMETER :
throw NotConnectedSocketException();
break;
default :
constexpr const char __CLIENT_DISCONNECT[] =
R"__cpp_cb(int ret = <INTERNAL_PREFIX>_client_disconnect(<CLIENT>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to disconnect to stub. error(%d)", ret);
throw NotConnectedSocketException();
}
constexpr const char __CLIENT_TRY_DISCOVERY[] =
R"__cpp_cb(int ret = <INTERNAL_PREFIX>_client_try_discovery(<CLIENT>, OnDiscoveredCB, this);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to discovery to stub. error(%d)", ret);
switch(ret) {
- case AITT_PLUGIN_ERROR_PERMISSION_DENIED :
+ case MQTT_PLUGIN_ERROR_PERMISSION_DENIED :
throw UnauthorizedAccessException();
break;
default :
constexpr const char __CLIENT_STOP_DISCOVERY[] =
R"__cpp_cb(int ret = <INTERNAL_PREFIX>_client_stop_discovery(<CLIENT>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to stop discovery. error(%d)", ret);
return;
}
constexpr const char __CLIENT_SEND_ASYNC[] =
R"__cpp_cb(
- ret = <INTERNAL_PREFIX>_payload_create(&<PAYLOAD>, AITT_PLUGIN_PAYLOAD_TYPE_DATA);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ ret = <INTERNAL_PREFIX>_payload_create(&<PAYLOAD>, MQTT_PLUGIN_PAYLOAD_TYPE_DATA);
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_create : %d", ret);
rpc_port_parcel_destroy(p);
throw InvalidIOException();
}
ret = <INTERNAL_PREFIX>_payload_set_data(<PAYLOAD>, (const unsigned char*)data, <SIZE>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_set_data : %d", ret);
rpc_port_parcel_destroy(p);
<INTERNAL_PREFIX>_payload_destroy(<PAYLOAD>);
}
ret = <INTERNAL_PREFIX>_client_send_payload_async(<CLIENT>, <PAYLOAD>, nullptr, nullptr);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_client_send_payload_async : %d", ret);
rpc_port_parcel_destroy(p);
<INTERNAL_PREFIX>_payload_destroy(<PAYLOAD>);
)__cpp_cb";
constexpr const char __SERVER_SEND_ASYNC[] =
-R"__cpp_cb(ret_ = <INTERNAL_PREFIX>_payload_create(&<PAYLOAD>, AITT_PLUGIN_PAYLOAD_TYPE_DATA);
- if (ret_ != AITT_PLUGIN_ERROR_NONE) {
+R"__cpp_cb(ret_ = <INTERNAL_PREFIX>_payload_create(&<PAYLOAD>, MQTT_PLUGIN_PAYLOAD_TYPE_DATA);
+ if (ret_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_create : %d", ret_);
rpc_port_parcel_destroy(p);
return;
}
ret_ = <INTERNAL_PREFIX>_payload_set_data(<PAYLOAD>, (const unsigned char*)data, <SIZE>);
- if (ret_ != AITT_PLUGIN_ERROR_NONE) {
+ if (ret_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_set_data : %d", ret_);
rpc_port_parcel_destroy(p);
<INTERNAL_PREFIX>_payload_destroy(<PAYLOAD>);
ret_ = <INTERNAL_PREFIX>_server_send_payload_async(<SERVER>, service_.lock()->GetPeer(), <PAYLOAD>, nullptr, nullptr);
<INTERNAL_PREFIX>_payload_destroy(<PAYLOAD>);
- if (ret_ != AITT_PLUGIN_ERROR_NONE) {
+ if (ret_ != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_client_send_payload_async : %d", ret_);
rpc_port_parcel_destroy(p);
return;
constexpr const char __GROUP_HANDLES[] =
R"__c_cb(
/**
- * @brief The aitt group handle.
+ * @brief The mqtt group handle.
*/
typedef void *<MODULE_PREFIX>_group_h;
)__c_cb";
constexpr const char __GROUP_PUBLISH[] =
-R"__c_cb(ret = <INTERNAL_PREFIX>_payload_create(&pl, AITT_PLUGIN_PAYLOAD_TYPE_DATA);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+R"__c_cb(ret = <INTERNAL_PREFIX>_payload_create(&pl, MQTT_PLUGIN_PAYLOAD_TYPE_DATA);
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_create : %d", ret);
rpc_port_parcel_destroy(p);
throw InvalidIOException();
}
ret = <INTERNAL_PREFIX>_payload_set_data(pl, (const unsigned char*)data, size);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_payload_set_data : %d", ret);
rpc_port_parcel_destroy(p);
<INTERNAL_PREFIX>_payload_destroy(pl);
ret = <INTERNAL_PREFIX>_group_publish(group_, pl);
<INTERNAL_PREFIX>_payload_destroy(pl);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_group_publish : %d", ret);
rpc_port_parcel_destroy(p);
throw InvalidIOException();
constexpr const char __CLIENT_CREATE[] =
R"__c_cb(<CLIENT_T> client = nullptr;
int ret = <INTERNAL_PREFIX>_client_create(&client, service_name.c_str(),
- broker_ip.c_str(), broker_port, user_name.c_str(), password.c_str(), my_ip.c_str(), protocols);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ broker_ip.c_str(), broker_port, user_name.c_str(), password.c_str());
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to create handle. error(%d)", ret);
throw InvalidIOException();
}
ret = <INTERNAL_PREFIX>_client_add_disconnected_cb(client, OnDisconnectedCB,
this);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_client_add_disconnected_cb. error(%d)", ret);
throw InvalidIOException();
}
ret = <INTERNAL_PREFIX>_client_add_connection_result_cb(client, OnConnectionResultCB,
this);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_client_add_connection_result_cb. error(%d)", ret);
throw InvalidIOException();
}
static_cast<<MODULE_PREFIX>_payload_transfer_status_e>(status), user_data);
}, this);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_client_add_payload_received_cb. error(%d)", ret);
throw InvalidIOException();
}
constexpr const char __GROUP_CREATE[] =
R"__c_cb(<GROUP_T> group = nullptr;
int ret = <INTERNAL_PREFIX>_group_create(&group, topic_name_.c_str(),
- broker_ip.c_str(), broker_port, user_name.c_str(), password.c_str(), my_ip.c_str(), protocols);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ broker_ip.c_str(), broker_port, user_name.c_str(), password.c_str());
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to create handle. error(%d)", ret);
throw InvalidIOException();
}
gr->OnJoined(peer_info);
},
this);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_group_add_joined_cb. error(%d)", ret);
throw InvalidIOException();
}
gr->OnLeft(peer_info);
},
this);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_group_add_left_cb. error(%d)", ret);
throw InvalidIOException();
}
gr->OnPayloadReceivedCB(peer_info, payload);
},
this);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_group_add_payload_received_cb. error(%d)", ret);
throw InvalidIOException();
}
ret = <INTERNAL_PREFIX>_group_subscribe(group);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to subscribe. error(%d)", ret);
switch (ret) {
- case AITT_PLUGIN_ERROR_PERMISSION_DENIED :
+ case MQTT_PLUGIN_ERROR_PERMISSION_DENIED :
throw UnauthorizedAccessException();
break;
- case AITT_PLUGIN_ERROR_INVALID_PARAMETER :
+ case MQTT_PLUGIN_ERROR_INVALID_PARAMETER :
throw NotConnectedSocketException();
break;
default :
constexpr const char __SERVER_SET_ONDEMAND_LAUNCH_ENABLED[] =
R"__c_cb(int ret = <INTERNAL_PREFIX>_server_set_on_demand_launch_enabled(server_, enabled);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_server_set_on_demand_launch_enabled. error(%d)", ret);
switch(ret) {
- case AITT_PLUGIN_ERROR_PERMISSION_DENIED :
+ case MQTT_PLUGIN_ERROR_PERMISSION_DENIED :
throw UnauthorizedAccessException();
break;
default :
constexpr const char __SERVER_LISTEN[] =
R"__c_cb(int ret = <INTERNAL_PREFIX>_server_listen(server_, OnConnectionRequestCB, this);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_server_listen. error(%d)", ret);
switch(ret) {
- case AITT_PLUGIN_ERROR_PERMISSION_DENIED :
+ case MQTT_PLUGIN_ERROR_PERMISSION_DENIED :
throw UnauthorizedAccessException();
break;
default :
constexpr const char __SERVER_DISCONNECT[] =
R"__c_cb(int ret = <INTERNAL_PREFIX>_server_disconnect(<SERVER>, <PEER>);
- if (ret != AITT_PLUGIN_ERROR_NONE) {
+ if (ret != MQTT_PLUGIN_ERROR_NONE) {
_E("Failed to <INTERNAL_PREFIX>_server_disconnect. error(%d)", ret);
throw InvalidIOException();
}
* @brief Enumeration for <MODULE_PREFIX>_payload transfer status types.
*/
typedef enum _<MODULE_PREFIX>_payload_transfer_status_e {
- AITT_PLUGIN_PAYLOAD_TRANSFER_STATUS_SUCCESS, /**< Transfer is success **/
- AITT_PLUGIN_PAYLOAD_TRANSFER_STATUS_FAILURE, /**< Transfer is failed **/
- AITT_PLUGIN_PAYLOAD_TRANSFER_STATUS_IN_PROGRESS, /**< Transfer is in progress **/
+ MQTT_PLUGIN_PAYLOAD_TRANSFER_STATUS_SUCCESS, /**< Transfer is success **/
+ MQTT_PLUGIN_PAYLOAD_TRANSFER_STATUS_FAILURE, /**< Transfer is failed **/
+ MQTT_PLUGIN_PAYLOAD_TRANSFER_STATUS_IN_PROGRESS, /**< Transfer is in progress **/
} <MODULE_PREFIX>_payload_transfer_status_e;
/**
R"__c_cb(
typedef enum _<MODULE_PREFIX>_error {
- AITT_PLUGIN_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
- AITT_PLUGIN_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
- AITT_PLUGIN_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
- AITT_PLUGIN_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
- AITT_PLUGIN_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
- AITT_PLUGIN_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented */
- AITT_PLUGIN_ERROR_ALREADY_IN_PROGRESS = TIZEN_ERROR_ALREADY_IN_PROGRESS, /**< Already in progress */
- AITT_PLUGIN_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
- AITT_PLUGIN_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< Timed out */
- AITT_PLUGIN_ERROR_OPERATION_FAILED = TIZEN_ERROR_CION | 0x01, /**< Operation failed */
+ MQTT_PLUGIN_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
+ MQTT_PLUGIN_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
+ MQTT_PLUGIN_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+ MQTT_PLUGIN_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+ MQTT_PLUGIN_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+ MQTT_PLUGIN_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented */
+ MQTT_PLUGIN_ERROR_ALREADY_IN_PROGRESS = TIZEN_ERROR_ALREADY_IN_PROGRESS, /**< Already in progress */
+ MQTT_PLUGIN_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
+ MQTT_PLUGIN_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< Timed out */
+ MQTT_PLUGIN_ERROR_OPERATION_FAILED = TIZEN_ERROR_CION | 0x01, /**< Operation failed */
} <MODULE_PREFIX>_error_e;
-enum AittProtocol {
- AITT_TYPE_MQTT = (0x1 << 0), // Publish message through the MQTT
- AITT_TYPE_TCP = (0x1 << 1), // Publish message to peers using the TCP
- AITT_TYPE_UDP = (0x1 << 2), // Publish message to peers using the UDP
- AITT_TYPE_SRTP = (0x1 << 3), // Publish message to peers using the SRTP
- AITT_TYPE_WEBRTC = (0x1 << 4), // Publish message to peers using the WEBRTC
+enum MqttProtocol {
+ MQTT_TYPE_MQTT = (0x1 << 0), // Publish message through the MQTT
+ MQTT_TYPE_TCP = (0x1 << 1), // Publish message to peers using the TCP
+ MQTT_TYPE_UDP = (0x1 << 2), // Publish message to peers using the UDP
+ MQTT_TYPE_SRTP = (0x1 << 3), // Publish message to peers using the SRTP
+ MQTT_TYPE_WEBRTC = (0x1 << 4), // Publish message to peers using the WEBRTC
};
/**
- * @brief The aitt plugin peer info handle.
+ * @brief The mqtt plugin peer info handle.
*/
typedef void *<MODULE_PREFIX>_peer_info_h;
constexpr const char __CLIENT_HEADER_HANDLES[] =
R"__c_cb(
/**
- * @brief The aitt client handle.
+ * @brief The mqtt client handle.
*/
typedef void *<MODULE_PREFIX>_client_h;
constexpr const char __CLIENT_SERVER_HANDLES[] =
R"__c_cb(
/**
- * @brief The aitt server handle.
+ * @brief The mqtt server handle.
*/
typedef void *<MODULE_PREFIX>_server_h;
constexpr const char __COMMON_HEADER_CONNECTION_RESULT_HANDLE[] =
R"__c_cb(
-typedef enum _aitt_connection_status_e {
- AITT_PLUGIN_CONNECTION_STATUS_OK, /**< Connection is ok **/
- AITT_PLUGIN_CONNECTION_STATUS_REJECTED, /**< Connection is rejected **/
- AITT_PLUGIN_CONNECTION_STATUS_ERROR, /**< Connection error occurs **/
+typedef enum _mqtt_connection_status_e {
+ MQTT_PLUGIN_CONNECTION_STATUS_OK, /**< Connection is ok **/
+ MQTT_PLUGIN_CONNECTION_STATUS_REJECTED, /**< Connection is rejected **/
+ MQTT_PLUGIN_CONNECTION_STATUS_ERROR, /**< Connection error occurs **/
} <MODULE_PREFIX>_connection_status_e;
/**
- * @brief The Aitt plugin connection result handle.
+ * @brief The Mqtt plugin connection result handle.
*/
typedef void *<MODULE_PREFIX>_connection_result_h;
constexpr const char __COMMON_HEADER_COMMON_BASE[] =
R"__c_cb(
/**
- * @brief Creates a clone of aitt plugin peer info handle.
+ * @brief Creates a clone of mqtt plugin peer info handle.
* @remarks @a peer_info_clone must be released using <MODULE_PREFIX>_peer_info_destroy().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] peer_info_clone The cloned peer information handle
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #AITT_PLUGIN_ERROR_IO_ERROR IO error
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_IO_ERROR IO error
* @see <MODULE_PREFIX>_peer_info_destroy()
*/
int <MODULE_PREFIX>_peer_info_clone(const <MODULE_PREFIX>_peer_info_h peer_info,
/**
* @brief Destroys the peer info handle and releases all its resources.
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
* @see <MODULE_PREFIX>_peer_info_clone()
*/
int <MODULE_PREFIX>_peer_info_destroy(<MODULE_PREFIX>_peer_info_h peer_info);
/**
* @brief Gets the device ID.
* @remarks @a device_id must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] device_id The device ID
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_device_id(<MODULE_PREFIX>_peer_info_h peer_info,
char **device_id);
/**
* @brief Gets the device name.
* @remarks @a device_name must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] device_name The device name
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_device_name(<MODULE_PREFIX>_peer_info_h peer_info,
char **device_name);
/**
* @brief Gets the device's platform.
* @remarks @a device_platform must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] device_platform The platform name
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_device_platform(<MODULE_PREFIX>_peer_info_h peer_info,
char **device_platform);
/**
* @brief Gets the device's platform version.
* @remarks @a device_platform_version must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] device_platform_version The platform version
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_device_platform_version(<MODULE_PREFIX>_peer_info_h peer_info,
char **device_platform_version);
/**
* @brief Gets the device's type.
* @remarks @a device_type must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] device_type Device type
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_device_type(<MODULE_PREFIX>_peer_info_h peer_info,
char **device_type);
/**
* @brief Gets application ID of peer.
* @remarks @a app_id must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] app_id The application ID
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_app_id(<MODULE_PREFIX>_peer_info_h peer_info,
char **app_id);
/**
* @brief Gets application version of peer.
* @remarks @a app_version must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] app_version The application version
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_app_version(<MODULE_PREFIX>_peer_info_h peer_info,
char **app_version);
/**
* @brief Gets UUID of peer.
* @remarks @a uuid must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] uuid The UUID
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_uuid(<MODULE_PREFIX>_peer_info_h peer_info,
char **uuid);
* @details The custom name for service name. \n
* It is possible that @a display_name does not exist.
* @remarks @a display_name must be released using free().
- * @param[in] peer_info The aitt plugin peer information handle
+ * @param[in] peer_info The mqtt plugin peer information handle
* @param[out] display_name The display name
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_peer_info_get_display_name(<MODULE_PREFIX>_peer_info_h peer_info,
char **display_name);
* @param[in] payload The <MODULE_PREFIX>_payload handle
* @param[in] path The path of file
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_PERMISSION_DENIED Permission denied
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OPERATION_FAILED Operation failed
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OPERATION_FAILED Operation failed
*/
int <MODULE_PREFIX>_payload_save_as_file(<MODULE_PREFIX>_payload_h payload, const char *path);
* @param[in] payload The <MODULE_PREFIX>_payload handle
* @param[out] file_name The name of file
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_payload_get_received_file_name(<MODULE_PREFIX>_payload_h payload,
* @param[in] payload The <MODULE_PREFIX>_payload handle
* @param[out] bytes The size of file
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
*/
int <MODULE_PREFIX>_payload_get_received_bytes(<MODULE_PREFIX>_payload_h payload, uint64_t *bytes);
* @param[in] payload The <MODULE_PREFIX>_payload handle
* @param[out] bytes The size of file
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
*/
int <MODULE_PREFIX>_payload_get_total_bytes(<MODULE_PREFIX>_payload_h payload, uint64_t *bytes);
* @param[in] result The connection result handle
* @param[out] status Connection result status
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
*/
int <MODULE_PREFIX>_connection_result_get_status(const <MODULE_PREFIX>_connection_result_h result,
<MODULE_PREFIX>_connection_status_e *status);
* @param[in] result The connection result handle
* @param[out] reason Connection result reason, should be freed after use
* @return @c 0 on success, otherwise a negative error value
- * @retval #AITT_PLUGIN_ERROR_NONE Successful
- * @retval #AITT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #AITT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MQTT_PLUGIN_ERROR_NONE Successful
+ * @retval #MQTT_PLUGIN_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MQTT_PLUGIN_ERROR_OUT_OF_MEMORY Out of memory
*/
int <MODULE_PREFIX>_connection_result_get_reason(const <MODULE_PREFIX>_connection_result_h result,
char **reason);
namespace tidl {
-std::string AittPluginCppTransportable::GenInclude(int type) const {
+std::string MqttPluginCppTransportable::GenInclude(int type) const {
return "#include \"<FILENAME>_internal.h\"";
}
-std::string AittPluginCppTransportable::GenHeaderBase() const {
+std::string MqttPluginCppTransportable::GenHeaderBase() const {
return __COMMON_HEADER_COMMON_BASE;
}
-std::string AittPluginCppTransportable::GenHeaderPayloadHandle() const {
+std::string MqttPluginCppTransportable::GenHeaderPayloadHandle() const {
return __COMMON_HEADER_PAYLOAD_HANDLE;
}
-std::string AittPluginCppTransportable::GenHeaderCommonHandle() const {
+std::string MqttPluginCppTransportable::GenHeaderCommonHandle() const {
return __COMMON_HEADER_HANDLES;
}
-std::string AittPluginCppTransportable::GenHeaderClientHandle() const {
+std::string MqttPluginCppTransportable::GenHeaderClientHandle() const {
return __CLIENT_HEADER_HANDLES;
}
-std::string AittPluginCppTransportable::GenHeaderServerHandle() const {
+std::string MqttPluginCppTransportable::GenHeaderServerHandle() const {
return __CLIENT_SERVER_HANDLES;
}
-std::string AittPluginCppTransportable::GenHeaderGroupHandle() const {
+std::string MqttPluginCppTransportable::GenHeaderGroupHandle() const {
return __GROUP_HANDLES;
}
-std::string AittPluginCppTransportable::GenHeaderConnectionHandle() const {
+std::string MqttPluginCppTransportable::GenHeaderConnectionHandle() const {
return __COMMON_HEADER_CONNECTION_RESULT_HANDLE;
}
-std::string AittPluginCppTransportable::GenHeaderPayloadBase() const {
+std::string MqttPluginCppTransportable::GenHeaderPayloadBase() const {
return __COMMON_HEADER_PAYLOAD_BASE;
}
-std::string AittPluginCppTransportable::GenHeaderConnectionBase() const {
+std::string MqttPluginCppTransportable::GenHeaderConnectionBase() const {
return __COMMON_HEADER_CONNECTION_RESULT_BASE;
}
-std::string AittPluginCppTransportable::GenBodyPayloadBase() const {
+std::string MqttPluginCppTransportable::GenBodyPayloadBase() const {
return __COMMON_BODY_PAYLOAD_BASE;
}
-std::string AittPluginCppTransportable::GenBodyConnectionBase() const {
+std::string MqttPluginCppTransportable::GenBodyConnectionBase() const {
return __COMMON_BODY_CONNECTION_RESULT_BASE;
}
-std::string AittPluginCppTransportable::GenBodyPeerInfoBase() const {
+std::string MqttPluginCppTransportable::GenBodyPeerInfoBase() const {
return __COMMON_BODY_PEERINFO_BASE;
}
-std::string AittPluginCppTransportable::GenNamespace() const {
- return "aitt";
+std::string MqttPluginCppTransportable::GenNamespace() const {
+ return "mqtt";
}
-std::string AittPluginCppTransportable::GenProxyPrefix() const {
- return "aitt_plugin_proxy";
+std::string MqttPluginCppTransportable::GenProxyPrefix() const {
+ return "mqtt_plugin_proxy";
}
-std::string AittPluginCppTransportable::GenStubPrefix() const {
- return "aitt_plugin_stub";
+std::string MqttPluginCppTransportable::GenStubPrefix() const {
+ return "mqtt_plugin_stub";
}
-std::string AittPluginCppTransportable::GenGroupPrefix() const {
- return "aitt_plugin_group";
+std::string MqttPluginCppTransportable::GenGroupPrefix() const {
+ return "mqtt_plugin_group";
}
-std::string AittPluginCppTransportable::GenModulePrefix() const {
- return "aitt_plugin";
+std::string MqttPluginCppTransportable::GenModulePrefix() const {
+ return "mqtt_plugin";
}
-std::string AittPluginCppTransportable::GenErrorPrefix() const {
- return "AITT_PLUGIN";
+std::string MqttPluginCppTransportable::GenErrorPrefix() const {
+ return "MQTT_PLUGIN";
}
-std::string AittPluginCppTransportable::GenConnectionResultPrefix() const {
+std::string MqttPluginCppTransportable::GenConnectionResultPrefix() const {
return "";
}
-std::string AittPluginCppTransportable::GenClientSendAsync(std::string client,
+std::string MqttPluginCppTransportable::GenClientSendAsync(std::string client,
std::string payload, std::string size) const {
return std::string(ReplaceAll(__CLIENT_SEND_ASYNC, {
{ "<CLIENT>", client },
{ "<SIZE>", size} }));
}
-std::string AittPluginCppTransportable::GenClientSend(std::string client,
+std::string MqttPluginCppTransportable::GenClientSend(std::string client,
std::string data, std::string data_size,
std::string ret_data, std::string ret_data_size) const {
return std::string(ReplaceAll(__CLIENT_SEND, {
{ "<RET_DATA_SIZE>", ret_data_size} }));
}
-std::string AittPluginCppTransportable::GenServerSendAsync(std::string server,
+std::string MqttPluginCppTransportable::GenServerSendAsync(std::string server,
std::string client,
std::string payload, std::string size) const {
return std::string(ReplaceAll(__SERVER_SEND_ASYNC, {
{ "<SIZE>", size} }));
}
-std::string AittPluginCppTransportable::GenServerFileSend(std::string path,
+std::string MqttPluginCppTransportable::GenServerFileSend(std::string path,
std::string server, std::string peer) const {
return std::string(ReplaceAll(__SERVER_FILE_SEND, {
{ "<FILE_PATH>", path },
{ "<PEER_H>", peer } }));
}
-std::string AittPluginCppTransportable::GenClientFileSend(std::string path,
+std::string MqttPluginCppTransportable::GenClientFileSend(std::string path,
std::string client) const {
return std::string(ReplaceAll(__CLINET_FILE_SEND, {
{ "<FILE_PATH>", path },
{ "<CLIENT_H>", client } }));
}
-std::string AittPluginCppTransportable::GenGroupType() const {
+std::string MqttPluginCppTransportable::GenGroupType() const {
return "<MODULE_PREFIX>_group_h";
}
-std::string AittPluginCppTransportable::GenPayloadTransferStatusType(bool internal_type) const {
+std::string MqttPluginCppTransportable::GenPayloadTransferStatusType(bool internal_type) const {
if (internal_type)
return "<INTERNAL_PREFIX>_transfer_status_e";
else
return "<MODULE_PREFIX>_payload_transfer_status_e";
}
-std::string AittPluginCppTransportable::GenPayloadAsyncResultType() const {
+std::string MqttPluginCppTransportable::GenPayloadAsyncResultType() const {
return "<MODULE_PREFIX>_payload_async_result_h";
}
-std::string AittPluginCppTransportable::GenPeerInfoType() const {
+std::string MqttPluginCppTransportable::GenPeerInfoType() const {
return "<MODULE_PREFIX>_peer_info_h";
}
-std::string AittPluginCppTransportable::GenPeerInfoDestroy(
+std::string MqttPluginCppTransportable::GenPeerInfoDestroy(
std::string peer) const {
return std::string(ReplaceAll("<MODULE_PREFIX>_peer_info_destroy(<PEER>);", {
{ "<PEER>", peer } }));
}
-std::string AittPluginCppTransportable::GenPayloadType() const {
+std::string MqttPluginCppTransportable::GenPayloadType() const {
return "<MODULE_PREFIX>_payload_h";
}
-std::string AittPluginCppTransportable::GenClientType() const {
+std::string MqttPluginCppTransportable::GenClientType() const {
return "<MODULE_PREFIX>_client_h";
}
-std::string AittPluginCppTransportable::GenSecurityType(bool definition) const {
+std::string MqttPluginCppTransportable::GenSecurityType(bool definition) const {
return "";
}
-std::string AittPluginCppTransportable::GenServerType() const {
+std::string MqttPluginCppTransportable::GenServerType() const {
return "<MODULE_PREFIX>_server_h";
}
-std::string AittPluginCppTransportable::GenClientTryConnect(std::string client,
+std::string MqttPluginCppTransportable::GenClientTryConnect(std::string client,
std::string peer) const {
return std::string(ReplaceAll(__CLIENT_TRY_CONNECT, {
{ "<CLIENT>", client },
{ "<PEER>", peer } }));
}
-std::string AittPluginCppTransportable::GenClientDisconnect(
+std::string MqttPluginCppTransportable::GenClientDisconnect(
std::string client) const {
return std::string(ReplaceAll(__CLIENT_DISCONNECT, {
{ "<CLIENT>", client } }));
}
-std::string AittPluginCppTransportable::GenClientTryDiscovery(
+std::string MqttPluginCppTransportable::GenClientTryDiscovery(
std::string client) const {
return std::string(ReplaceAll(__CLIENT_TRY_DISCOVERY, {
{ "<CLIENT>", client } }));
}
-std::string AittPluginCppTransportable::GenClientStopDiscovery(
+std::string MqttPluginCppTransportable::GenClientStopDiscovery(
std::string client) const {
return std::string(ReplaceAll(__CLIENT_STOP_DISCOVERY, {
{ "<CLIENT>", client } }));
}
-std::string AittPluginCppTransportable::GenServerRegister() const {
+std::string MqttPluginCppTransportable::GenServerRegister() const {
return __SERVER_REGISTER;
}
-std::string AittPluginCppTransportable::GenServerUnregister() const {
+std::string MqttPluginCppTransportable::GenServerUnregister() const {
return __SERVER_UNREGISTER;
}
-std::string AittPluginCppTransportable::GenClientExtraHeader() const {
+std::string MqttPluginCppTransportable::GenClientExtraHeader() const {
return "";
}
-std::string AittPluginCppTransportable::GenClientExtraBody() const {
+std::string MqttPluginCppTransportable::GenClientExtraBody() const {
return "";
}
-std::string AittPluginCppTransportable::GenServerExtraHeader() const {
+std::string MqttPluginCppTransportable::GenServerExtraHeader() const {
return "";
}
-std::string AittPluginCppTransportable::GenServerExtraBody() const {
+std::string MqttPluginCppTransportable::GenServerExtraBody() const {
return "";
}
-std::string AittPluginCppTransportable::GenServerAccept() const {
+std::string MqttPluginCppTransportable::GenServerAccept() const {
return __SERVER_ACCEPT;
}
-std::string AittPluginCppTransportable::GenServerReject() const {
+std::string MqttPluginCppTransportable::GenServerReject() const {
return __SERVER_REJECT;
}
-std::string AittPluginCppTransportable::GenServerSetDisplayName() const {
+std::string MqttPluginCppTransportable::GenServerSetDisplayName() const {
return __SERVER_SET_DISPLAY_NAME;
}
-std::string AittPluginCppTransportable::GenGroupPublish() const {
+std::string MqttPluginCppTransportable::GenGroupPublish() const {
return __GROUP_PUBLISH;
}
-std::string AittPluginCppTransportable::GenPayloadTypeEnum() const {
+std::string MqttPluginCppTransportable::GenPayloadTypeEnum() const {
return "<INTERNAL_PREFIX>_payload_type_e";
}
-std::string AittPluginCppTransportable::GenPayloadTypeData() const {
- return "AITT_PLUGIN_PAYLOAD_TYPE_DATA";
+std::string MqttPluginCppTransportable::GenPayloadTypeData() const {
+ return "MQTT_PLUGIN_PAYLOAD_TYPE_DATA";
}
-std::string AittPluginCppTransportable::GenPayloadTypeFile() const {
- return "AITT_PLUGIN_PAYLOAD_TYPE_FILE";
+std::string MqttPluginCppTransportable::GenPayloadTypeFile() const {
+ return "MQTT_PLUGIN_PAYLOAD_TYPE_FILE";
}
-std::string AittPluginCppTransportable::GenPayloadGetType() const {
+std::string MqttPluginCppTransportable::GenPayloadGetType() const {
return "ret = <INTERNAL_PREFIX>_payload_get_type(payload, &type);";
}
-std::string AittPluginCppTransportable::GenErrorNone() const {
- return "AITT_PLUGIN_ERROR_NONE";
+std::string MqttPluginCppTransportable::GenErrorNone() const {
+ return "MQTT_PLUGIN_ERROR_NONE";
}
-std::string AittPluginCppTransportable::GenPayloadGetData() const {
+std::string MqttPluginCppTransportable::GenPayloadGetData() const {
return "ret = <INTERNAL_PREFIX>_payload_get_data(payload, &data, &size);";
}
-std::string AittPluginCppTransportable::GenClientCreate() const {
+std::string MqttPluginCppTransportable::GenClientCreate() const {
return __CLIENT_CREATE;
}
-std::string AittPluginCppTransportable::GenGroupCreate() const {
+std::string MqttPluginCppTransportable::GenGroupCreate() const {
return __GROUP_CREATE;
}
-std::string AittPluginCppTransportable::GenGroupDestroy() const {
+std::string MqttPluginCppTransportable::GenGroupDestroy() const {
return __GROUP_DESTROY;
}
-std::string AittPluginCppTransportable::GenClientDestroy() const {
+std::string MqttPluginCppTransportable::GenClientDestroy() const {
return __CLIENT_DESTROY;
}
-std::string AittPluginCppTransportable::GenSetSecurityCA(std::string arg) const {
+std::string MqttPluginCppTransportable::GenSetSecurityCA(std::string arg) const {
return "";
}
-std::string AittPluginCppTransportable::GenSetSecurityCert(std::string arg) const {
+std::string MqttPluginCppTransportable::GenSetSecurityCert(std::string arg) const {
return "";
}
-std::string AittPluginCppTransportable::GenSetSecurityPrivateKey(
+std::string MqttPluginCppTransportable::GenSetSecurityPrivateKey(
std::string arg) const {
return "";
}
-std::string AittPluginCppTransportable::GenPeerInfoClone(std::string src_peer,
+std::string MqttPluginCppTransportable::GenPeerInfoClone(std::string src_peer,
std::string dest_peer) const {
return std::string(ReplaceAll(__PEER_INFO_CLONE, {
{ "<SRC_PEER>", src_peer },
{ "<DEST_PEER>", dest_peer } }));
}
-std::string AittPluginCppTransportable::GenServerSetOnDemandLaunchEnabled() const {
+std::string MqttPluginCppTransportable::GenServerSetOnDemandLaunchEnabled() const {
return "";
}
-std::string AittPluginCppTransportable::GenServerListen() const {
+std::string MqttPluginCppTransportable::GenServerListen() const {
return __SERVER_LISTEN;
}
-std::string AittPluginCppTransportable::GenServerDisconnect(std::string server,
+std::string MqttPluginCppTransportable::GenServerDisconnect(std::string server,
std::string peer) const {
return std::string(ReplaceAll(__SERVER_DISCONNECT, {
{ "<SERVER>", server },
{ "<PEER>", peer } }));
}
-std::string AittPluginCppTransportable::GenPeerInfoGetAppID(std::string peer,
+std::string MqttPluginCppTransportable::GenPeerInfoGetAppID(std::string peer,
std::string appid) const {
return std::string(ReplaceAll(__PEER_INFO_GET_APPID, {
{ "<PEER>", peer},
{ "<APPID>", appid} }));
}
-std::string AittPluginCppTransportable::GenPeerInfoGetUUID(std::string peer,
+std::string MqttPluginCppTransportable::GenPeerInfoGetUUID(std::string peer,
std::string uuid) const {
return std::string(ReplaceAll(__PEER_INFO_GET_UUID, {
{ "<PEER>", peer},
* limitations under the License.
*/
-#ifndef IDLC_GEN_AITT_PLUGIN_CPP_TRANSPORTABLE_H_
-#define IDLC_GEN_AITT_PLUGIN_CPP_TRANSPORTABLE_H_
+#ifndef IDLC_GEN_MQTT_PLUGIN_CPP_TRANSPORTABLE_H_
+#define IDLC_GEN_MQTT_PLUGIN_CPP_TRANSPORTABLE_H_
#include <string>
namespace tidl {
-class AittPluginCppTransportable : public CppTransportable {
+class MqttPluginCppTransportable : public CppTransportable {
public:
- virtual ~AittPluginCppTransportable() = default;
+ virtual ~MqttPluginCppTransportable() = default;
std::string GenInclude(int type = 0) const override;
std::string GenClientSendAsync(std::string client,
std::string payload, std::string size) const override;
} // namespace tidl
-#endif // IDLC_GEN_AITT_PLUGIN_CPP_TRANSPORTABLE_H_
\ No newline at end of file
+#endif // IDLC_GEN_MQTT_PLUGIN_CPP_TRANSPORTABLE_H_
\ No newline at end of file
* limitations under the License.
*/
-#include "idlc/gen_aitt_plugin/aitt_plugin_cs_base_gen.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_cs_base_gen.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_cs_base_gen_cb.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_cs_base_gen_cb.h"
namespace tidl {
-AittPluginCsBaseGen::AittPluginCsBaseGen(std::shared_ptr<Document> doc,
+MqttPluginCsBaseGen::MqttPluginCsBaseGen(std::shared_ptr<Document> doc,
std::shared_ptr<tidl::Transportable> trans) : CionPluginBase(doc, trans) {
}
-void AittPluginCsBaseGen::OnInitGen(std::ofstream& stream) {
+void MqttPluginCsBaseGen::OnInitGen(std::ofstream& stream) {
GenUsing(stream);
- stream << "namespace Tizen.Applications.AittPlugin\n";
+ stream << "namespace Tizen.Applications.MqttPlugin\n";
stream << "{\n";
GenBase(stream);
stream << "}\n";
}
-void AittPluginCsBaseGen::OnFiniGen(std::ofstream& stream) {
+void MqttPluginCsBaseGen::OnFiniGen(std::ofstream& stream) {
}
-void AittPluginCsBaseGen::GenUsing(std::ofstream& stream) {
+void MqttPluginCsBaseGen::GenUsing(std::ofstream& stream) {
stream << CB_BASE_USING;
}
-void AittPluginCsBaseGen::GenBase(std::ofstream& stream) {
+void MqttPluginCsBaseGen::GenBase(std::ofstream& stream) {
stream << CB_ERROR_FACTORY;
stream << CB_DATA_PAYLOAD;
stream << CB_FILE_PAYLOAD;
* limitations under the License.
*/
-#ifndef IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_BASE_GEN_H_
-#define IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_BASE_GEN_H_
+#ifndef IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_BASE_GEN_H_
+#define IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_BASE_GEN_H_
#include <memory>
namespace tidl {
-class AittPluginCsBaseGen : public CionPluginBase {
+class MqttPluginCsBaseGen : public CionPluginBase {
public:
- explicit AittPluginCsBaseGen(std::shared_ptr<Document> doc,
+ explicit MqttPluginCsBaseGen(std::shared_ptr<Document> doc,
std::shared_ptr<tidl::Transportable> trans);
- virtual ~AittPluginCsBaseGen() = default;
+ virtual ~MqttPluginCsBaseGen() = default;
void OnInitGen(std::ofstream& stream) override;
void OnFiniGen(std::ofstream& stream) override;
} // namespace tidl
-#endif // IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_BASE_GEN_H_
+#endif // IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_BASE_GEN_H_
* limitations under the License.
*/
-#ifndef IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_BASE_GEN_CB_H_
-#define IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_BASE_GEN_CB_H_
+#ifndef IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_BASE_GEN_CB_H_
+#define IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_BASE_GEN_CB_H_
constexpr char CB_BASE_USING[] =
R"__cs_cb(
constexpr char CB_ERROR_FACTORY[] =
R"__cs_cb(
- internal static class AittPluginErrorFactory
+ internal static class MqttPluginErrorFactory
{
- internal static Exception GetException(Interop.AittPlugin.ErrorCode err, string message)
+ internal static Exception GetException(Interop.MqttPlugin.ErrorCode err, string message)
{
string errMessage = string.Format("{0} err = {1}", message, err);
switch (err)
{
- case Interop.AittPlugin.ErrorCode.IoError:
+ case Interop.MqttPlugin.ErrorCode.IoError:
return new InvalidOperationException(errMessage);
- case Interop.AittPlugin.ErrorCode.OutOfMemory:
+ case Interop.MqttPlugin.ErrorCode.OutOfMemory:
return new InvalidOperationException(errMessage);
- case Interop.AittPlugin.ErrorCode.PermissionDenied:
+ case Interop.MqttPlugin.ErrorCode.PermissionDenied:
return new UnauthorizedAccessException(errMessage);
- case Interop.AittPlugin.ErrorCode.InvalidParameter:
+ case Interop.MqttPlugin.ErrorCode.InvalidParameter:
return new ArgumentException(errMessage);
- case Interop.AittPlugin.ErrorCode.InvalidOperation:
+ case Interop.MqttPlugin.ErrorCode.InvalidOperation:
return new InvalidOperationException(errMessage);
- case Interop.AittPlugin.ErrorCode.AlreadyInProgress:
+ case Interop.MqttPlugin.ErrorCode.AlreadyInProgress:
return new InvalidOperationException(errMessage);
- case Interop.AittPlugin.ErrorCode.NotSupported:
+ case Interop.MqttPlugin.ErrorCode.NotSupported:
return new NotSupportedException(errMessage);
- case Interop.AittPlugin.ErrorCode.TimedOut:
+ case Interop.MqttPlugin.ErrorCode.TimedOut:
return new TimeoutException(errMessage);
- case Interop.AittPlugin.ErrorCode.OperationFailed:
+ case Interop.MqttPlugin.ErrorCode.OperationFailed:
return new InvalidOperationException(errMessage);
default:
return new InvalidOperationException(errMessage);
R"__cs_cb(
public abstract class ClientBase : IDisposable
{
- private readonly string LogTag = "Tizen.Applications.AittPlugin";
+ private readonly string LogTag = "Tizen.Applications.MqttPlugin";
private readonly ClientSafeHandle _handle;
private PeerInfo _peer;
- private Interop.AittPluginClient.AittPluginClientServerDiscoveredCb _discoveredCb;
- private Interop.AittPluginClient.AittPluginClientConnectionResultCb _connectionResultCb;
- private Interop.AittPluginClient.AittPluginClientPayloadReceivedCb _payloadRecievedCb;
- private Interop.AittPluginClient.AittPluginClientDisconnectedCb _disconnectedCb;
+ private Interop.MqttPluginClient.MqttPluginClientServerDiscoveredCb _discoveredCb;
+ private Interop.MqttPluginClient.MqttPluginClientConnectionResultCb _connectionResultCb;
+ private Interop.MqttPluginClient.MqttPluginClientPayloadReceivedCb _payloadRecievedCb;
+ private Interop.MqttPluginClient.MqttPluginClientDisconnectedCb _disconnectedCb;
private Dictionary<string, TaskCompletionSource<PayloadAsyncResult>> _tcsDictionary = new Dictionary<string, TaskCompletionSource<PayloadAsyncResult>>();
- private Dictionary<string, Interop.AittPluginClient.AittPluginClientPayloadAsyncResultCb> _payloadAsyncCbDictionary = new Dictionary<string, Interop.AittPluginClient.AittPluginClientPayloadAsyncResultCb>();
+ private Dictionary<string, Interop.MqttPluginClient.MqttPluginClientPayloadAsyncResultCb> _payloadAsyncCbDictionary = new Dictionary<string, Interop.MqttPluginClient.MqttPluginClientPayloadAsyncResultCb>();
public string ServiceName { get; }
}
}
- public ClientBase(string serviceName, string brokerIp, int brokerPort, string userName, string password, string myIp, int protocol)
+ public ClientBase(string serviceName, string brokerIp, int brokerPort, string userName, string password)
{
ServiceName = serviceName;
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginClient.AittPluginClientCreate(out _handle, serviceName, brokerIp, brokerPort, userName, password, myIp, protocol);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginClient.MqttPluginClientCreate(out _handle, serviceName, brokerIp, brokerPort, userName, password);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to create client.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to create client.");
}
- _connectionResultCb = new Interop.AittPluginClient.AittPluginClientConnectionResultCb(
+ _connectionResultCb = new Interop.MqttPluginClient.MqttPluginClientConnectionResultCb(
(string service, IntPtr peerInfo, IntPtr result, IntPtr userData) =>
{
- Interop.AittPlugin.ErrorCode clone_ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
- if (clone_ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode clone_ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
+ if (clone_ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, string.Format("Failed to clone peer info."));
return;
OnConnectionResult(peer, connectionResult);
});
- ret = Interop.AittPluginClient.AittPluginClientAddConnectionResultCb(_handle, _connectionResultCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginClient.MqttPluginClientAddConnectionResultCb(_handle, _connectionResultCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
_handle.Dispose();
- throw AittPluginErrorFactory.GetException(ret, "Failed to add connection status changed callback.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to add connection status changed callback.");
}
- _payloadRecievedCb = new Interop.AittPluginClient.AittPluginClientPayloadReceivedCb(
+ _payloadRecievedCb = new Interop.MqttPluginClient.MqttPluginClientPayloadReceivedCb(
(string service, IntPtr peerInfo, IntPtr payload, int status, IntPtr userData) =>
{
Payload receivedPayload;
- Interop.AittPluginPayload.AittPluginPayloadGetType(payload, out Interop.AittPluginPayload.PayloadType type);
+ Interop.MqttPluginPayload.MqttPluginPayloadGetType(payload, out Interop.MqttPluginPayload.PayloadType type);
switch (type)
{
- case Interop.AittPluginPayload.PayloadType.Data:
+ case Interop.MqttPluginPayload.PayloadType.Data:
receivedPayload = new DataPayload(new PayloadSafeHandle(payload, false));
break;
- case Interop.AittPluginPayload.PayloadType.File:
+ case Interop.MqttPluginPayload.PayloadType.File:
receivedPayload = new FilePayload(new PayloadSafeHandle(payload, false));
break;
default:
}
OnPayloadReceived(receivedPayload, (PayloadTransferStatus)status);
});
- ret = Interop.AittPluginClient.AittPluginClientAddPayloadReceivedCb(_handle, _payloadRecievedCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginClient.MqttPluginClientAddPayloadReceivedCb(_handle, _payloadRecievedCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
_handle.Dispose();
- throw AittPluginErrorFactory.GetException(ret, "Failed to add payload received callback.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to add payload received callback.");
}
- _disconnectedCb = new Interop.AittPluginClient.AittPluginClientDisconnectedCb(
+ _disconnectedCb = new Interop.MqttPluginClient.MqttPluginClientDisconnectedCb(
(string service, IntPtr peerInfo, IntPtr userData) =>
{
- Interop.AittPlugin.ErrorCode clone_ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
- if (clone_ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode clone_ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
+ if (clone_ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, string.Format("Failed to clone peer info."));
return;
}
OnDisconnected(new PeerInfo(clone));
});
- ret = Interop.AittPluginClient.AittPluginClientAddDisconnectedCb(_handle, _disconnectedCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginClient.MqttPluginClientAddDisconnectedCb(_handle, _disconnectedCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
_handle.Dispose();
- throw AittPluginErrorFactory.GetException(ret, "Failed to add disconnected callback.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to add disconnected callback.");
}
}
{
if (_discoveredCb == null)
{
- Interop.AittPluginClient.AittPluginClientServerDiscoveredCb cb = new Interop.AittPluginClient.AittPluginClientServerDiscoveredCb(
+ Interop.MqttPluginClient.MqttPluginClientServerDiscoveredCb cb = new Interop.MqttPluginClient.MqttPluginClientServerDiscoveredCb(
(string serviceName, IntPtr peerInfo, IntPtr userData) =>
{
- Interop.AittPlugin.ErrorCode clone_ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
- if (clone_ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode clone_ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
+ if (clone_ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to clone peer info.");
return;
_discoveredCb = cb;
}
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginClient.AittPluginClientTryDiscovery(_handle, _discoveredCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginClient.MqttPluginClientTryDiscovery(_handle, _discoveredCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to try discovery.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to try discovery.");
}
}
public void StopDiscovery()
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginClient.AittPluginClientStopDiscovery(_handle);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginClient.MqttPluginClientStopDiscovery(_handle);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to stop discovery.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to stop discovery.");
}
}
public void Connect(PeerInfo peer)
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginClient.AittPluginClientConnect(_handle, peer?._handle);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginClient.MqttPluginClientConnect(_handle, peer?._handle);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to connect.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to connect.");
}
}
public void Disconnect()
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginClient.AittPluginClientDisconnect(_handle);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginClient.MqttPluginClientDisconnect(_handle);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, string.Format("Failed to disconnect: {0}", ret));
}
public byte[] SendData(byte[] data, int timeout)
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginClient.AittPluginClientSendData(_handle, data, data?.Length ?? -1, timeout, out IntPtr returnDataPtr, out int returnDataSize);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginClient.MqttPluginClientSendData(_handle, data, data?.Length ?? -1, timeout, out IntPtr returnDataPtr, out int returnDataSize);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to send data.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to send data.");
}
byte[] returnData = new byte[returnDataSize];
Marshal.Copy(returnDataPtr, returnData, 0, returnDataSize);
TaskCompletionSource<PayloadAsyncResult> tcs = new TaskCompletionSource<PayloadAsyncResult>();
_tcsDictionary[payload.Id] = tcs;
- Interop.AittPluginClient.AittPluginClientPayloadAsyncResultCb cb = new Interop.AittPluginClient.AittPluginClientPayloadAsyncResultCb(
+ Interop.MqttPluginClient.MqttPluginClientPayloadAsyncResultCb cb = new Interop.MqttPluginClient.MqttPluginClientPayloadAsyncResultCb(
(IntPtr result, IntPtr userData) =>
{
TaskCompletionSource<PayloadAsyncResult> tcsToReturn = _tcsDictionary[payload.Id];
_tcsDictionary.Remove(resultPayload.PayloadId);
});
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginClient.AittPluginClientSendPayloadAsync(_handle, payload?._handle, cb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginClient.MqttPluginClientSendPayloadAsync(_handle, payload?._handle, cb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to send payload.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to send payload.");
}
_payloadAsyncCbDictionary[payload?.Id] = cb;
protected override bool ReleaseHandle()
{
- Interop.AittPluginClient.AittPluginClientDestroy(this.handle);
+ Interop.MqttPluginClient.MqttPluginClientDestroy(this.handle);
SetHandle(IntPtr.Zero);
return true;
}
internal ConnectionResult(IntPtr handle)
{
- Interop.AittPluginConnectionResult.AittPluginConnectionResultGetReason(handle, out _reason);
- Interop.AittPluginConnectionResult.AittPluginConnectionResultGetStatus(handle, out _status);
+ Interop.MqttPluginConnectionResult.MqttPluginConnectionResultGetReason(handle, out _reason);
+ Interop.MqttPluginConnectionResult.MqttPluginConnectionResultGetStatus(handle, out _status);
}
public ConnectionStatus Status
public DataPayload(byte[] data)
{
- Interop.AittPluginPayload.AittPluginPayloadCreate(out _handle, Interop.AittPluginPayload.PayloadType.Data);
- Interop.AittPluginPayload.AittPluginPayloadSetData(_handle, data, data?.Length ?? -1);
+ Interop.MqttPluginPayload.MqttPluginPayloadCreate(out _handle, Interop.MqttPluginPayload.PayloadType.Data);
+ Interop.MqttPluginPayload.MqttPluginPayloadSetData(_handle, data, data?.Length ?? -1);
}
public override PayloadType PayloadType
{
get
{
- Interop.AittPluginPayload.AittPluginPayloadGetData(_handle, out IntPtr byteArrPtr, out int size);
+ Interop.MqttPluginPayload.MqttPluginPayloadGetData(_handle, out IntPtr byteArrPtr, out int size);
byte[] byteArr = new byte[size];
Marshal.Copy(byteArrPtr, byteArr, 0, size);
return byteArr;
}
set
{
- Interop.AittPluginPayload.AittPluginPayloadSetData(_handle, value, value?.Length ?? 0);
+ Interop.MqttPluginPayload.MqttPluginPayloadSetData(_handle, value, value?.Length ?? 0);
}
}
}
R"__cs_cb(
public class FilePayload : Payload
{
- private readonly string LogTag = "Tizen.Applications.AittPlugin";
+ private readonly string LogTag = "Tizen.Applications.MqttPlugin";
internal FilePayload(PayloadSafeHandle handle)
{
public FilePayload(string path)
{
- Interop.AittPluginPayload.AittPluginPayloadCreate(out _handle, Interop.AittPluginPayload.PayloadType.File);
- Interop.AittPluginPayload.AittPluginPayloadSetFilePath(_handle, path);
+ Interop.MqttPluginPayload.MqttPluginPayloadCreate(out _handle, Interop.MqttPluginPayload.PayloadType.File);
+ Interop.MqttPluginPayload.MqttPluginPayloadSetFilePath(_handle, path);
}
public string ReceivedFileName
{
get
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPayload.AittPluginPayloadGetReceivedFileName(_handle, out string path);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPayload.MqttPluginPayloadGetReceivedFileName(_handle, out string path);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
// property should not throw exception.
return "";
{
get
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPayload.AittPluginPayloadGetReceivedBytes(_handle, out UInt64 bytes);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPayload.MqttPluginPayloadGetReceivedBytes(_handle, out UInt64 bytes);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to get received bytes.");
return Byte.MinValue;
{
get
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPayload.AittPluginPayloadGetTotalBytes(_handle, out UInt64 bytes);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPayload.MqttPluginPayloadGetTotalBytes(_handle, out UInt64 bytes);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to get total bytes.");
return Byte.MinValue;
public void SaveAsFile(string path)
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPayload.AittPluginPayloadSaveAsFile(_handle, path);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPayload.MqttPluginPayloadSaveAsFile(_handle, path);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to save as file.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to save as file.");
}
}
}
R"__cs_cb(
public abstract class GroupBase : IDisposable
{
- private readonly string LogTag = "Tizen.Applications.AittPlugin";
+ private readonly string LogTag = "Tizen.Applications.MqttPlugin";
private readonly GroupSafeHandle _handle;
- private Interop.AittPluginGroup.AittPluginGroupPayloadReceivedCb _payloadReceivedCb;
- private Interop.AittPluginGroup.AittPluginGroupLeftCb _leftCb;
- private Interop.AittPluginGroup.AittPluginGroupJoinedCb _joinedCb;
+ private Interop.MqttPluginGroup.MqttPluginGroupPayloadReceivedCb _payloadReceivedCb;
+ private Interop.MqttPluginGroup.MqttPluginGroupLeftCb _leftCb;
+ private Interop.MqttPluginGroup.MqttPluginGroupJoinedCb _joinedCb;
public string Topic { get; }
- public GroupBase(string topicName, string brokerIp, int brokerPort, string userName, string password, string myIp, int protocol)
+ public GroupBase(string topicName, string brokerIp, int brokerPort, string userName, string password)
{
Topic = topicName;
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginGroup.AittPluginGroupCreate(out _handle, topicName, brokerIp, brokerPort, userName, password, myIp, protocol);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginGroup.MqttPluginGroupCreate(out _handle, topicName, brokerIp, brokerPort, userName, password);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to create group.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to create group.");
}
- _payloadReceivedCb = new Interop.AittPluginGroup.AittPluginGroupPayloadReceivedCb(
+ _payloadReceivedCb = new Interop.MqttPluginGroup.MqttPluginGroupPayloadReceivedCb(
(IntPtr group, IntPtr peerInfo, IntPtr payload, IntPtr userData) =>
{
Payload receivedPayload;
- Interop.AittPluginPayload.AittPluginPayloadGetType(payload, out Interop.AittPluginPayload.PayloadType type);
+ Interop.MqttPluginPayload.MqttPluginPayloadGetType(payload, out Interop.MqttPluginPayload.PayloadType type);
switch (type)
{
- case Interop.AittPluginPayload.PayloadType.Data:
+ case Interop.MqttPluginPayload.PayloadType.Data:
receivedPayload = new DataPayload(new PayloadSafeHandle(payload, false));
break;
- case Interop.AittPluginPayload.PayloadType.File:
+ case Interop.MqttPluginPayload.PayloadType.File:
receivedPayload = new FilePayload(new PayloadSafeHandle(payload, false));
break;
default:
Log.Error(LogTag, "Invalid payload type received.");
return;
}
- Interop.AittPlugin.ErrorCode clone_ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
- if (clone_ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode clone_ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
+ if (clone_ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to clone peer info.");
return;
}
OnPayloadReceived(receivedPayload, new PeerInfo(clone));
});
- ret = Interop.AittPluginGroup.AittPluginGroupAddPayloadReceivedCb(_handle, _payloadReceivedCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginGroup.MqttPluginGroupAddPayloadReceivedCb(_handle, _payloadReceivedCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
_handle.Dispose();
- throw AittPluginErrorFactory.GetException(ret, "Failed to add payload received callback.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to add payload received callback.");
}
- _joinedCb = new Interop.AittPluginGroup.AittPluginGroupJoinedCb(
+ _joinedCb = new Interop.MqttPluginGroup.MqttPluginGroupJoinedCb(
(string name, IntPtr peerInfo, IntPtr userData) =>
{
- Interop.AittPlugin.ErrorCode clone_ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
- if (clone_ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode clone_ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
+ if (clone_ret != Interop.MqttPlugin.ErrorCode.None)
{
return;
}
OnJoined(new PeerInfo(clone));
});
- ret = Interop.AittPluginGroup.AittPluginGroupAddJoinedCb(_handle, _joinedCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginGroup.MqttPluginGroupAddJoinedCb(_handle, _joinedCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
_handle.Dispose();
- throw AittPluginErrorFactory.GetException(ret, "Failed to add joined callback.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to add joined callback.");
}
- _leftCb = new Interop.AittPluginGroup.AittPluginGroupLeftCb(
+ _leftCb = new Interop.MqttPluginGroup.MqttPluginGroupLeftCb(
(string name, IntPtr peerInfo, IntPtr userData) =>
{
- Interop.AittPlugin.ErrorCode clone_ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
- if (clone_ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode clone_ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
+ if (clone_ret != Interop.MqttPlugin.ErrorCode.None)
{
return;
}
OnLeft(new PeerInfo(clone));
});
- ret = Interop.AittPluginGroup.AittPluginGroupAddLeftCb(_handle, _leftCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginGroup.MqttPluginGroupAddLeftCb(_handle, _leftCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
_handle.Dispose();
- throw AittPluginErrorFactory.GetException(ret, "Failed to add joined callback.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to add joined callback.");
}
}
public void Subscribe()
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginGroup.AittPluginGroupSubscribe(_handle);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginGroup.MqttPluginGroupSubscribe(_handle);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to subscribe.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to subscribe.");
}
}
public void Unsubscribe()
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginGroup.AittPluginGroupUnsubscribe(_handle);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginGroup.MqttPluginGroupUnsubscribe(_handle);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, string.Format("Failed to unsubscribe: {0}", ret));
}
public void Publish(Payload payload)
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginGroup.AittPluginGroupPublish(_handle, payload?._handle);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginGroup.MqttPluginGroupPublish(_handle, payload?._handle);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to publish payload.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to publish payload.");
}
}
protected override bool ReleaseHandle()
{
- Interop.AittPluginGroup.AittPluginGroupDestroy(this.handle);
+ Interop.MqttPluginGroup.MqttPluginGroupDestroy(this.handle);
SetHandle(IntPtr.Zero);
return true;
}
R"__cs_cb(
public abstract class Payload
{
- private readonly string LogTag = "Tizen.Applications.AittPlugin";
+ private readonly string LogTag = "Tizen.Applications.MqttPlugin";
internal PayloadSafeHandle _handle;
public abstract PayloadType PayloadType { get; }
{
get
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPayload.AittPluginPayloadGetPayloadID(_handle, out string id);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPayload.MqttPluginPayloadGetPayloadID(_handle, out string id);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to get id of payload.");
return "";
internal static PayloadAsyncResult CreateFromHandle(IntPtr handle)
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPayloadAsyncResult.AittPluginPayloadAsyncResultGetResult(handle, out int code);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPayloadAsyncResult.MqttPluginPayloadAsyncResultGetResult(handle, out int code);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Fail to get result code from the AsyncResult");
+ throw MqttPluginErrorFactory.GetException(ret, "Fail to get result code from the AsyncResult");
}
- ret = Interop.AittPluginPayloadAsyncResult.AittPluginPayloadAsyncResultGetPayloadID(handle, out string payloadId);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginPayloadAsyncResult.MqttPluginPayloadAsyncResultGetPayloadID(handle, out string payloadId);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Fail to get payload id from the AsyncResult");
+ throw MqttPluginErrorFactory.GetException(ret, "Fail to get payload id from the AsyncResult");
}
- ret = Interop.AittPluginPayloadAsyncResult.AittPluginPayloadAsyncResultGetPeerInfo(handle, out IntPtr peer);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginPayloadAsyncResult.MqttPluginPayloadAsyncResultGetPeerInfo(handle, out IntPtr peer);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Fail to get peerinfo from the AsyncResult");
+ throw MqttPluginErrorFactory.GetException(ret, "Fail to get peerinfo from the AsyncResult");
}
- ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peer, out PeerInfoSafeHandle clone);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peer, out PeerInfoSafeHandle clone);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to clone peer info.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to clone peer info.");
}
return new PayloadAsyncResult((PayloadAsyncResultCode)code, new PeerInfo(clone), payloadId);
protected override bool ReleaseHandle()
{
- Interop.AittPluginPayload.AittPluginPayloadDestroy(this.handle);
+ Interop.MqttPluginPayload.MqttPluginPayloadDestroy(this.handle);
SetHandle(IntPtr.Zero);
return true;
}
R"__cs_cb(
public class PeerInfo : IDisposable
{
- private readonly string LogTag = "Tizen.Applications.AittPlugin";
+ private readonly string LogTag = "Tizen.Applications.MqttPlugin";
internal PeerInfoSafeHandle _handle;
internal PeerInfo(PeerInfoSafeHandle handle)
{
get
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoGetDeviceId(_handle, out string deviceId);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoGetDeviceId(_handle, out string deviceId);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to get device id.");
return "";
{
get
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoGetDeviceName(_handle, out string deviceName);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoGetDeviceName(_handle, out string deviceName);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to get device name.");
return "";
{
get
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoGetDevicePlatform(_handle, out string devicePlatform);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoGetDevicePlatform(_handle, out string devicePlatform);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to get device platform.");
return "";
{
get
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoGetDevicePlatformVersion(_handle, out string devicePlatformVersion);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoGetDevicePlatformVersion(_handle, out string devicePlatformVersion);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to get device platform version.");
return "";
{
get
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoGetDeviceType(_handle, out string deviceType);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoGetDeviceType(_handle, out string deviceType);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to get device platform type.");
return "";
{
get
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoGetAppId(_handle, out string AppId);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoGetAppId(_handle, out string AppId);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to get application id.");
return "";
{
get
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoGetAppVersion(_handle, out string AppVersion);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoGetAppVersion(_handle, out string AppVersion);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to get application version.");
return "";
{
get
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoGetUuid(_handle, out string uuid);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoGetUuid(_handle, out string uuid);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to get UUID.");
return "";
protected override bool ReleaseHandle()
{
- Interop.AittPluginPeerInfo.AittPluginPeerInfoDestroy(this.handle);
+ Interop.MqttPluginPeerInfo.MqttPluginPeerInfoDestroy(this.handle);
SetHandle(IntPtr.Zero);
return true;
}
R"__cs_cb(
public abstract class ServerBase : IDisposable
{
- private readonly string LogTag = "Tizen.Applications.AittPlugin";
+ private readonly string LogTag = "Tizen.Applications.MqttPlugin";
private string _displayName;
private readonly ServerSafeHandle _handle;
- private Interop.AittPluginServer.AittPluginServerConnectionRequestCb _connectionRequestCb;
- private Interop.AittPluginServer.AittPluginServerConnectionResultCb _connectionResultCb;
- private Interop.AittPluginServer.AittPluginServerDataReceivedCb _dataReceivedCb;
- private Interop.AittPluginServer.AittPluginServerPayloadReceivedCb _payloadRecievedCb;
- private Interop.AittPluginServer.AittPluginServerDisconnectedCb _disconnectedCb;
- private Interop.AittPluginServer.AittPluginServerPayloadAsyncResultCb _payloadAsyncResultCb;
+ private Interop.MqttPluginServer.MqttPluginServerConnectionRequestCb _connectionRequestCb;
+ private Interop.MqttPluginServer.MqttPluginServerConnectionResultCb _connectionResultCb;
+ private Interop.MqttPluginServer.MqttPluginServerDataReceivedCb _dataReceivedCb;
+ private Interop.MqttPluginServer.MqttPluginServerPayloadReceivedCb _payloadRecievedCb;
+ private Interop.MqttPluginServer.MqttPluginServerDisconnectedCb _disconnectedCb;
+ private Interop.MqttPluginServer.MqttPluginServerPayloadAsyncResultCb _payloadAsyncResultCb;
private Dictionary<Tuple<string, string>, TaskCompletionSource<PayloadAsyncResult>> _tcsDictionary = new Dictionary<Tuple<string, string>, TaskCompletionSource<PayloadAsyncResult>>();
public string ServiceName { get; }
set
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginServer.AittPluginServerSetDisplayName(_handle, value);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginServer.MqttPluginServerSetDisplayName(_handle, value);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, string.Format("Failed to set display name: {0}", ret));
}
}
}
- public ServerBase(string serviceName, string displayName, string brokerIp, int brokerPort, string userName, string password, string myIp, int port)
+ public ServerBase(string serviceName, string displayName, string brokerIp, int brokerPort, string userName, string password)
{
ServiceName = serviceName;
_displayName = displayName;
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginServer.AittPluginServerCreate(out _handle, serviceName, displayName, brokerIp, brokerPort, userName, password, myIp, port);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginServer.MqttPluginServerCreate(out _handle, serviceName, displayName, brokerIp, brokerPort, userName, password);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to create server handle.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to create server handle.");
}
- _connectionResultCb = new Interop.AittPluginServer.AittPluginServerConnectionResultCb(
+ _connectionResultCb = new Interop.MqttPluginServer.MqttPluginServerConnectionResultCb(
(string service, IntPtr peerInfo, IntPtr result, IntPtr userData) =>
{
- Interop.AittPlugin.ErrorCode clone_ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
- if (clone_ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode clone_ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
+ if (clone_ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to clone peer info.");
return;
}
OnConnectionResult(new PeerInfo(clone), new ConnectionResult(result));
});
- ret = Interop.AittPluginServer.AittPluginServerAddConnectionResultCb(_handle, _connectionResultCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginServer.MqttPluginServerAddConnectionResultCb(_handle, _connectionResultCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
_handle.Dispose();
- throw AittPluginErrorFactory.GetException(ret, "Failed to add connection status changed callback.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to add connection status changed callback.");
}
- _dataReceivedCb = new Interop.AittPluginServer.AittPluginServerDataReceivedCb(
+ _dataReceivedCb = new Interop.MqttPluginServer.MqttPluginServerDataReceivedCb(
(string service, IntPtr peerInfo, IntPtr data, int dataSize, out IntPtr returnData, out int returnDataSize, IntPtr userData) =>
{
- Interop.AittPlugin.ErrorCode clone_ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
- if (clone_ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode clone_ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
+ if (clone_ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to clone peer info.");
returnData = IntPtr.Zero;
Marshal.Copy(data, receivedData, 0, dataSize);
byte[] returnDataRaw = OnDataReceived(receivedData, new PeerInfo(clone));
returnDataSize = returnDataRaw.Length;
- returnData = Interop.AittPlugin.Malloc(returnDataSize);
+ returnData = Interop.MqttPlugin.Malloc(returnDataSize);
Marshal.Copy(returnDataRaw, 0, returnData, returnDataSize);
});
- ret = Interop.AittPluginServer.AittPluginServerSetDataReceivedCb(_handle, _dataReceivedCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginServer.MqttPluginServerSetDataReceivedCb(_handle, _dataReceivedCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
_handle.Dispose();
- throw AittPluginErrorFactory.GetException(ret, "Failed to set data received callback.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to set data received callback.");
}
- _payloadRecievedCb = new Interop.AittPluginServer.AittPluginServerPayloadReceivedCb(
+ _payloadRecievedCb = new Interop.MqttPluginServer.MqttPluginServerPayloadReceivedCb(
(string service, IntPtr peerInfo, IntPtr payload, int status, IntPtr userData) =>
{
Payload receivedPayload;
- Interop.AittPluginPayload.AittPluginPayloadGetType(payload, out Interop.AittPluginPayload.PayloadType type);
+ Interop.MqttPluginPayload.MqttPluginPayloadGetType(payload, out Interop.MqttPluginPayload.PayloadType type);
switch (type)
{
- case Interop.AittPluginPayload.PayloadType.Data:
+ case Interop.MqttPluginPayload.PayloadType.Data:
receivedPayload = new DataPayload(new PayloadSafeHandle(payload, false));
break;
- case Interop.AittPluginPayload.PayloadType.File:
+ case Interop.MqttPluginPayload.PayloadType.File:
receivedPayload = new FilePayload(new PayloadSafeHandle(payload, false));
break;
default:
Log.Error(LogTag, "Invalid payload type received.");
return;
}
- Interop.AittPlugin.ErrorCode clone_ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
- if (clone_ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode clone_ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
+ if (clone_ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to clone peer info.");
return;
}
OnPayloadReceived(receivedPayload, new PeerInfo(clone), (PayloadTransferStatus)status);
});
- ret = Interop.AittPluginServer.AittPluginServerAddPayloadReceivedCb(_handle, _payloadRecievedCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginServer.MqttPluginServerAddPayloadReceivedCb(_handle, _payloadRecievedCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
_handle.Dispose();
- throw AittPluginErrorFactory.GetException(ret, "Failed to add payload received callback.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to add payload received callback.");
}
- _disconnectedCb = new Interop.AittPluginServer.AittPluginServerDisconnectedCb(
+ _disconnectedCb = new Interop.MqttPluginServer.MqttPluginServerDisconnectedCb(
(string service, IntPtr peerInfo, IntPtr userData) =>
{
- Interop.AittPlugin.ErrorCode clone_ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
- if (clone_ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode clone_ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
+ if (clone_ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, string.Format("Failed to clone peer info."));
return;
}
OnDisconnected(new PeerInfo(clone));
});
- ret = Interop.AittPluginServer.AittPluginServerAddDisconnectedCb(_handle, _disconnectedCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ ret = Interop.MqttPluginServer.MqttPluginServerAddDisconnectedCb(_handle, _disconnectedCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
_handle.Dispose();
- throw AittPluginErrorFactory.GetException(ret, "Failed to add disconnected callback.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to add disconnected callback.");
}
}
{
if (_connectionRequestCb == null)
{
- Interop.AittPluginServer.AittPluginServerConnectionRequestCb cb = new Interop.AittPluginServer.AittPluginServerConnectionRequestCb(
+ Interop.MqttPluginServer.MqttPluginServerConnectionRequestCb cb = new Interop.MqttPluginServer.MqttPluginServerConnectionRequestCb(
(serviceName, peerInfo, userData) =>
{
- Interop.AittPlugin.ErrorCode clone_ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
- if (clone_ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode clone_ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peerInfo, out PeerInfoSafeHandle clone);
+ if (clone_ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to clone peer info");
return;
_connectionRequestCb = cb;
}
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginServer.AittPluginServerListen(_handle, _connectionRequestCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginServer.MqttPluginServerListen(_handle, _connectionRequestCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to listen server.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to listen server.");
}
}
public void Stop()
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginServer.AittPluginServerStop(_handle);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginServer.MqttPluginServerStop(_handle);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to stop server.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to stop server.");
}
}
public void Disconnect(PeerInfo peerInfo)
{
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginServer.AittPluginServerDisconnect(_handle, peerInfo?._handle);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginServer.MqttPluginServerDisconnect(_handle, peerInfo?._handle);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to stop server.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to stop server.");
}
}
if (_payloadAsyncResultCb == null)
{
- Interop.AittPluginServer.AittPluginServerPayloadAsyncResultCb cb = new Interop.AittPluginServer.AittPluginServerPayloadAsyncResultCb(
+ Interop.MqttPluginServer.MqttPluginServerPayloadAsyncResultCb cb = new Interop.MqttPluginServer.MqttPluginServerPayloadAsyncResultCb(
(IntPtr result, IntPtr userData) =>
{
PayloadAsyncResult resultPayload = null;
_payloadAsyncResultCb = cb;
}
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginServer.AittPluginServerSendPayloadAsync(_handle, peerInfo?._handle, payload?._handle, _payloadAsyncResultCb, IntPtr.Zero);
- if (ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginServer.MqttPluginServerSendPayloadAsync(_handle, peerInfo?._handle, payload?._handle, _payloadAsyncResultCb, IntPtr.Zero);
+ if (ret != Interop.MqttPlugin.ErrorCode.None)
{
- throw AittPluginErrorFactory.GetException(ret, "Failed to send payload.");
+ throw MqttPluginErrorFactory.GetException(ret, "Failed to send payload.");
}
return tcs.Task;
public void Accept(PeerInfo peerInfo)
{
- Interop.AittPluginServer.AittPluginServerAccept(_handle, peerInfo?._handle);
+ Interop.MqttPluginServer.MqttPluginServerAccept(_handle, peerInfo?._handle);
}
public void Reject(PeerInfo peerInfo, string reason)
{
- Interop.AittPluginServer.AittPluginServerReject(_handle, peerInfo?._handle, reason);
+ Interop.MqttPluginServer.MqttPluginServerReject(_handle, peerInfo?._handle, reason);
}
public IEnumerable<PeerInfo> GetConnectedPeerList()
{
List<PeerInfo> peerInfoList = new List<PeerInfo>();
- Interop.AittPlugin.ErrorCode ret = Interop.AittPluginServer.AittPluginServerForeachConnectedPeerInfo(_handle, (peer, userData) =>
+ Interop.MqttPlugin.ErrorCode ret = Interop.MqttPluginServer.MqttPluginServerForeachConnectedPeerInfo(_handle, (peer, userData) =>
{
- Interop.AittPlugin.ErrorCode clone_ret = Interop.AittPluginPeerInfo.AittPluginPeerInfoClone(peer, out PeerInfoSafeHandle clone);
- if (clone_ret != Interop.AittPlugin.ErrorCode.None)
+ Interop.MqttPlugin.ErrorCode clone_ret = Interop.MqttPluginPeerInfo.MqttPluginPeerInfoClone(peer, out PeerInfoSafeHandle clone);
+ if (clone_ret != Interop.MqttPlugin.ErrorCode.None)
{
Log.Error(LogTag, "Failed to clone peer info.");
return false;
protected override bool ReleaseHandle()
{
- Interop.AittPluginServer.AittPluginServerDestroy(this.handle);
+ Interop.MqttPluginServer.MqttPluginServerDestroy(this.handle);
SetHandle(IntPtr.Zero);
return true;
}
}
)__cs_cb";
-#endif // IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_BASE_GEN_CB_H_
+#endif // IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_BASE_GEN_CB_H_
* limitations under the License.
*/
-#include "idlc/gen_aitt_plugin/aitt_plugin_cs_interop_gen.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_cs_interop_gen.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_cs_interop_gen_cb.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_cs_interop_gen_cb.h"
namespace tidl {
-AittPluginCsInteropGen::AittPluginCsInteropGen(std::shared_ptr<Document> doc,
+MqttPluginCsInteropGen::MqttPluginCsInteropGen(std::shared_ptr<Document> doc,
std::shared_ptr<tidl::Transportable> trans) : CionPluginBase(doc, trans) {
}
-void AittPluginCsInteropGen::OnInitGen(std::ofstream& stream) {
+void MqttPluginCsInteropGen::OnInitGen(std::ofstream& stream) {
GenUsing(stream);
stream << "internal static partial class Interop\n";
stream << "{\n";
stream << "}\n";
}
-void AittPluginCsInteropGen::OnFiniGen(std::ofstream& stream) {
+void MqttPluginCsInteropGen::OnFiniGen(std::ofstream& stream) {
}
-void AittPluginCsInteropGen::GenUsing(std::ofstream& stream) {
+void MqttPluginCsInteropGen::GenUsing(std::ofstream& stream) {
stream << CB_INTEROP_USING;
}
-void AittPluginCsInteropGen::GenLibraries(std::ofstream& stream) {
+void MqttPluginCsInteropGen::GenLibraries(std::ofstream& stream) {
stream << CB_LIBRARIES;
}
-void AittPluginCsInteropGen::GenErrorCode(std::ofstream& stream) {
+void MqttPluginCsInteropGen::GenErrorCode(std::ofstream& stream) {
stream << CB_ERROR_CODE;
}
-void AittPluginCsInteropGen::GenMalloc(std::ofstream& stream) {
+void MqttPluginCsInteropGen::GenMalloc(std::ofstream& stream) {
stream << CB_INTEROP_MALLOC;
}
-void AittPluginCsInteropGen::GenInterop(std::ofstream& stream) {
+void MqttPluginCsInteropGen::GenInterop(std::ofstream& stream) {
stream << CB_INTEROP_PAYLOAD;
stream << CB_INTEROP_PAYLOAD_ASYNC_RESULT;
stream << CB_INTEROP_PEER_INFO;
* limitations under the License.
*/
-#ifndef IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_INTEROP_GEN_H_
-#define IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_INTEROP_GEN_H_
+#ifndef IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_INTEROP_GEN_H_
+#define IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_INTEROP_GEN_H_
#include <memory>
namespace tidl {
-class AittPluginCsInteropGen : public CionPluginBase {
+class MqttPluginCsInteropGen : public CionPluginBase {
public:
- explicit AittPluginCsInteropGen(std::shared_ptr<Document> doc,
+ explicit MqttPluginCsInteropGen(std::shared_ptr<Document> doc,
std::shared_ptr<tidl::Transportable> trans);
- virtual ~AittPluginCsInteropGen() = default;
+ virtual ~MqttPluginCsInteropGen() = default;
void OnInitGen(std::ofstream& stream) override;
void OnFiniGen(std::ofstream& stream) override;
} // namespace tidl
-#endif // IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_INTEROP_GEN_H_
+#endif // IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_INTEROP_GEN_H_
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ */
+
+#ifndef IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_INTEROP_GEN_CB_H_
+#define IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_INTEROP_GEN_CB_H_
+
+constexpr char CB_INTEROP_USING[] =
+R"__cs_cb(
+using System;
+using System.Runtime.InteropServices;
+using Tizen.Applications.MqttPlugin;
+
+using ErrorCode = Interop.MqttPlugin.ErrorCode;
+
+)__cs_cb";
+
+constexpr char CB_LIBRARIES[] =
+R"__cs_cb(
+ internal static partial class Libraries
+ {
+ public const string MqttPlugin = "libcion-mqtt-plugin.so.1";
+ public const string Libc = "libc.so.6";
+ }
+)__cs_cb";
+
+constexpr char CB_ERROR_CODE[] =
+R"__cs_cb(
+ internal static partial class MqttPlugin
+ {
+ internal enum ErrorCode : int
+ {
+ None = Tizen.Internals.Errors.ErrorCode.None,
+ IoError = Tizen.Internals.Errors.ErrorCode.IoError,
+ OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,
+ PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied,
+ InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter,
+ InvalidOperation = Tizen.Internals.Errors.ErrorCode.InvalidOperation,
+ AlreadyInProgress = Tizen.Internals.Errors.ErrorCode.AlreadyInProgress,
+ NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported,
+ TimedOut = Tizen.Internals.Errors.ErrorCode.TimedOut,
+ OperationFailed = -0x030C0000 | 0x01,
+ }
+ }
+)__cs_cb";
+
+constexpr char CB_INTEROP_MALLOC[] =
+R"__cs_cb(
+ internal static partial class MqttPlugin
+ {
+ [DllImport(Libraries.Libc, EntryPoint = "malloc")]
+ internal static extern IntPtr Malloc(int size);
+ }
+)__cs_cb";
+
+constexpr char CB_INTEROP_CLIENT[] =
+R"__cs_cb(
+ internal static partial class MqttPluginClient
+ {
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginClientServerDiscoveredCb(string serviceName, IntPtr peerInfo, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginClientConnectionResultCb(string serviceName, IntPtr peerInfo, IntPtr result, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginClientPayloadReceivedCb(string serviceName, IntPtr peerInfo, IntPtr payload, int status, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginClientDisconnectedCb(string serviceName, IntPtr peerInfo, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginClientPayloadAsyncResultCb(IntPtr result, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_create")]
+ internal static extern ErrorCode MqttPluginClientCreate(out ClientSafeHandle client, string serviceName, string brokerIp, int brokerPort, string userName, string password);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_destroy")]
+ internal static extern ErrorCode MqttPluginClientDestroy(IntPtr client);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_try_discovery")]
+ internal static extern ErrorCode MqttPluginClientTryDiscovery(ClientSafeHandle client, MqttPluginClientServerDiscoveredCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_stop_discovery")]
+ internal static extern ErrorCode MqttPluginClientStopDiscovery(ClientSafeHandle client);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_connect")]
+ internal static extern ErrorCode MqttPluginClientConnect(ClientSafeHandle client, PeerInfoSafeHandle peerInfo);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_disconnect")]
+ internal static extern ErrorCode MqttPluginClientDisconnect(ClientSafeHandle client);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_send_data")]
+ internal static extern ErrorCode MqttPluginClientSendData(ClientSafeHandle client, byte[] data, int dataSize, int timeout, out IntPtr returnData, out int returnDataSize);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_send_payload_async")]
+ internal static extern ErrorCode MqttPluginClientSendPayloadAsync(ClientSafeHandle client, PayloadSafeHandle payload, MqttPluginClientPayloadAsyncResultCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_add_connection_result_cb")]
+ internal static extern ErrorCode MqttPluginClientAddConnectionResultCb(ClientSafeHandle client, MqttPluginClientConnectionResultCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_remove_connection_result_cb")]
+ internal static extern ErrorCode MqttPluginClientRemoveConnectionResultCb(ClientSafeHandle client, MqttPluginClientConnectionResultCb cb);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_add_payload_received_cb")]
+ internal static extern ErrorCode MqttPluginClientAddPayloadReceivedCb(ClientSafeHandle client, MqttPluginClientPayloadReceivedCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_remove_payload_received_cb")]
+ internal static extern ErrorCode MqttPluginClientRemovePayloadReceivedCb(ClientSafeHandle client, MqttPluginClientPayloadReceivedCb cb);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_add_disconnected_cb")]
+ internal static extern ErrorCode MqttPluginClientAddDisconnectedCb(ClientSafeHandle client, MqttPluginClientDisconnectedCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_client_remove_disconnected_cb")]
+ internal static extern ErrorCode MqttPluginClientRemoveDisconnectedCb(ClientSafeHandle client, MqttPluginClientDisconnectedCb cb);
+ }
+)__cs_cb";
+
+constexpr char CB_INTEROP_CONNECTION_RESULT[] =
+R"__cs_cb(
+ internal static partial class MqttPluginConnectionResult
+ {
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_connection_result_get_status")]
+ internal static extern ErrorCode MqttPluginConnectionResultGetStatus(IntPtr result, out ConnectionStatus status);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_connection_result_get_reason")]
+ internal static extern ErrorCode MqttPluginConnectionResultGetReason(IntPtr result, out string reason);
+ }
+)__cs_cb";
+
+constexpr char CB_INTEROP_GROUP[] =
+R"__cs_cb(
+ internal static partial class MqttPluginGroup
+ {
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginGroupPayloadReceivedCb(IntPtr group, IntPtr peerInfo, IntPtr payload, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginGroupJoinedCb(string topicName, IntPtr peerInfo, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginGroupLeftCb(string topicName, IntPtr peerInfo, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_group_create")]
+ internal static extern ErrorCode MqttPluginGroupCreate(out GroupSafeHandle group, string topicName, string brokerIp, int brokerPort, string userName, string password);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_group_destroy")]
+ internal static extern ErrorCode MqttPluginGroupDestroy(IntPtr group);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_group_subscribe")]
+ internal static extern ErrorCode MqttPluginGroupSubscribe(GroupSafeHandle group);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_group_unsubscribe")]
+ internal static extern ErrorCode MqttPluginGroupUnsubscribe(GroupSafeHandle group);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_group_publish")]
+ internal static extern ErrorCode MqttPluginGroupPublish(GroupSafeHandle group, PayloadSafeHandle data);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_group_add_payload_received_cb")]
+ internal static extern ErrorCode MqttPluginGroupAddPayloadReceivedCb(GroupSafeHandle group, MqttPluginGroupPayloadReceivedCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_group_remove_payload_received_cb")]
+ internal static extern ErrorCode MqttPluginGroupRemovePayloadReceivedCb(GroupSafeHandle group, MqttPluginGroupPayloadReceivedCb cb);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_group_add_joined_cb")]
+ internal static extern ErrorCode MqttPluginGroupAddJoinedCb(GroupSafeHandle group, MqttPluginGroupJoinedCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_group_remove_joined_cb")]
+ internal static extern ErrorCode MqttPluginGroupRemoveJoinedCb(GroupSafeHandle group, MqttPluginGroupJoinedCb cb);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_group_add_left_cb")]
+ internal static extern ErrorCode MqttPluginGroupAddLeftCb(GroupSafeHandle group, MqttPluginGroupLeftCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_group_remove_left_cb")]
+ internal static extern ErrorCode MqttPluginGroupRemoveLeftCb(GroupSafeHandle group, MqttPluginGroupLeftCb cb);
+ }
+)__cs_cb";
+
+constexpr char CB_INTEROP_PAYLOAD[] =
+R"__cs_cb(
+ internal static partial class MqttPluginPayload
+ {
+ internal enum PayloadType : int
+ {
+ Data,
+ File,
+ }
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_create")]
+ internal static extern ErrorCode MqttPluginPayloadCreate(out PayloadSafeHandle payload, PayloadType type);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_destroy")]
+ internal static extern ErrorCode MqttPluginPayloadDestroy(IntPtr payload);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_get_type")]
+ internal static extern ErrorCode MqttPluginPayloadGetType(IntPtr payload, out PayloadType type);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_get_data")]
+ internal static extern ErrorCode MqttPluginPayloadGetData(PayloadSafeHandle payload, out IntPtr data, out int dataSize);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_set_data")]
+ internal static extern ErrorCode MqttPluginPayloadSetData(PayloadSafeHandle payload, byte[] data, int dataSize);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_save_as_file")]
+ internal static extern ErrorCode MqttPluginPayloadSaveAsFile(PayloadSafeHandle payload, string path);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_get_received_file_name")]
+ internal static extern ErrorCode MqttPluginPayloadGetReceivedFileName(PayloadSafeHandle payload, out string path);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_get_received_bytes")]
+ internal static extern ErrorCode MqttPluginPayloadGetReceivedBytes(PayloadSafeHandle payload, out UInt64 bytes);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_get_total_bytes")]
+ internal static extern ErrorCode MqttPluginPayloadGetTotalBytes(PayloadSafeHandle payload, out UInt64 bytes);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_set_file_path")]
+ internal static extern ErrorCode MqttPluginPayloadSetFilePath(PayloadSafeHandle payload, string path);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_get_payload_id")]
+ internal static extern ErrorCode MqttPluginPayloadGetPayloadID(PayloadSafeHandle payload, out string id);
+ }
+)__cs_cb";
+
+constexpr char CB_INTEROP_PAYLOAD_ASYNC_RESULT[] =
+R"__cs_cb(
+ internal static partial class MqttPluginPayloadAsyncResult
+ {
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_async_result_get_result")]
+ internal static extern ErrorCode MqttPluginPayloadAsyncResultGetResult(IntPtr result, out int code);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_async_result_get_peer_info")]
+ internal static extern ErrorCode MqttPluginPayloadAsyncResultGetPeerInfo(IntPtr result, out IntPtr peerInfo);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_payload_async_result_get_payload_id")]
+ internal static extern ErrorCode MqttPluginPayloadAsyncResultGetPayloadID(IntPtr result, out string payloadID);
+ }
+)__cs_cb";
+
+constexpr char CB_INTEROP_PEER_INFO[] =
+R"__cs_cb(
+ internal static partial class MqttPluginPeerInfo
+ {
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_peer_info_clone")]
+ internal static extern ErrorCode MqttPluginPeerInfoClone(IntPtr peerInfo, out PeerInfoSafeHandle peerInfoClone);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_peer_info_destroy")]
+ internal static extern ErrorCode MqttPluginPeerInfoDestroy(IntPtr peerInfo);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_peer_info_get_device_id")]
+ internal static extern ErrorCode MqttPluginPeerInfoGetDeviceId(PeerInfoSafeHandle peerInfo, out string deviceId);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_peer_info_get_device_name")]
+ internal static extern ErrorCode MqttPluginPeerInfoGetDeviceName(PeerInfoSafeHandle peerInfo, out string deviceName);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_peer_info_get_device_platform")]
+ internal static extern ErrorCode MqttPluginPeerInfoGetDevicePlatform(PeerInfoSafeHandle peerInfo, out string devicePlatform);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_peer_info_get_device_platform_version")]
+ internal static extern ErrorCode MqttPluginPeerInfoGetDevicePlatformVersion(PeerInfoSafeHandle peerInfo, out string devicePlatformVersion);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_peer_info_get_device_type")]
+ internal static extern ErrorCode MqttPluginPeerInfoGetDeviceType(PeerInfoSafeHandle peerInfo, out string deviceType);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_peer_info_get_app_id")]
+ internal static extern ErrorCode MqttPluginPeerInfoGetAppId(PeerInfoSafeHandle peerInfo, out string appId);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_peer_info_get_app_version")]
+ internal static extern ErrorCode MqttPluginPeerInfoGetAppVersion(PeerInfoSafeHandle peerInfo, out string appVersion);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_peer_info_get_uuid")]
+ internal static extern ErrorCode MqttPluginPeerInfoGetUuid(PeerInfoSafeHandle peerInfo, out string uuid);
+ }
+)__cs_cb";
+
+constexpr char CB_INTEROP_SERVER[] =
+R"__cs_cb(
+ internal static partial class MqttPluginServer
+ {
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate bool MqttPluginServerPeerInfoIterator(IntPtr peerInfo, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginServerPayloadAsyncResultCb(IntPtr result, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginServerConnectionResultCb(string serviceName, IntPtr peerInfo, IntPtr result, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginServerDataReceivedCb(string serviceName, IntPtr peerInfo, IntPtr data, int dataSize, out IntPtr returnData, out int returnDataSize, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginServerPayloadReceivedCb(string serviceName, IntPtr peerInfo, IntPtr payload, int status, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginServerConnectionRequestCb(string serviceName, IntPtr peerInfo, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginServerErrorReportedCb(string serviceName, IntPtr peerInfo, int error, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void MqttPluginServerDisconnectedCb(string serviceName, IntPtr peerInfo, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_create")]
+ internal static extern ErrorCode MqttPluginServerCreate(out ServerSafeHandle server, string serviceName, string displayName, string brokerIp, int brokerPort, string userName, string password);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_destroy")]
+ internal static extern ErrorCode MqttPluginServerDestroy(IntPtr server);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_listen")]
+ internal static extern ErrorCode MqttPluginServerListen(ServerSafeHandle server, MqttPluginServerConnectionRequestCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_stop")]
+ internal static extern ErrorCode MqttPluginServerStop(ServerSafeHandle server);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_accept")]
+ internal static extern ErrorCode MqttPluginServerAccept(ServerSafeHandle server, PeerInfoSafeHandle peerInfo);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_reject")]
+ internal static extern ErrorCode MqttPluginServerReject(ServerSafeHandle server, PeerInfoSafeHandle peerInfo, string reason);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_disconnect")]
+ internal static extern ErrorCode MqttPluginServerDisconnect(ServerSafeHandle server, PeerInfoSafeHandle peerInfo);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_send_payload_async")]
+ internal static extern ErrorCode MqttPluginServerSendPayloadAsync(ServerSafeHandle server, PeerInfoSafeHandle peerInfo, PayloadSafeHandle payload, MqttPluginServerPayloadAsyncResultCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_foreach_connected_peer_info")]
+ internal static extern ErrorCode MqttPluginServerForeachConnectedPeerInfo(ServerSafeHandle server, MqttPluginServerPeerInfoIterator cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_add_connection_result_cb")]
+ internal static extern ErrorCode MqttPluginServerAddConnectionResultCb(ServerSafeHandle server, MqttPluginServerConnectionResultCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_remove_connection_result_cb")]
+ internal static extern ErrorCode MqttPluginServerRemoveConnectionResultCb(ServerSafeHandle server, MqttPluginServerConnectionResultCb cb);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_add_payload_received_cb")]
+ internal static extern ErrorCode MqttPluginServerAddPayloadReceivedCb(ServerSafeHandle server, MqttPluginServerPayloadReceivedCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_remove_payload_received_cb")]
+ internal static extern ErrorCode MqttPluginServerRemovePayloadReceivedCb(ServerSafeHandle server, MqttPluginServerPayloadReceivedCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_set_data_received_cb")]
+ internal static extern ErrorCode MqttPluginServerSetDataReceivedCb(ServerSafeHandle server, MqttPluginServerDataReceivedCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_unset_data_received_cb")]
+ internal static extern ErrorCode MqttPluginServerUnsetDataReceivedCb(ServerSafeHandle server, MqttPluginServerDataReceivedCb cb);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_add_disconnected_cb")]
+ internal static extern ErrorCode MqttPluginServerAddDisconnectedCb(ServerSafeHandle server, MqttPluginServerDisconnectedCb cb, IntPtr userData);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_remove_disconnected_cb")]
+ internal static extern ErrorCode MqttPluginServerRemoveDisconnectedCb(ServerSafeHandle server, MqttPluginServerDisconnectedCb cb);
+
+ [DllImport(Libraries.MqttPlugin, EntryPoint = "mqtt_plugin_server_set_display_name")]
+ internal static extern ErrorCode MqttPluginServerSetDisplayName(ServerSafeHandle server, string displayName);
+ }
+)__cs_cb";
+
+#endif // IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_INTEROP_GEN_CB_H_
* limitations under the License.
*/
-#include "idlc/gen_aitt_plugin/aitt_plugin_cs_transportable.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_cs_transportable.h"
#include <utility>
using System;
using System.Collections.Generic;
using Tizen.Applications;
-using Tizen.Applications.AittPlugin;
+using Tizen.Applications.MqttPlugin;
using Tizen.Applications.RPCPort;
)__cs_cb";
constexpr const char __CLIENT_CTOR[] =
R"__cs_cb(
- public ##(string serviceName, string brokerIp, int brokerPort, string userName, string password, string myIp, int protocol) : base(serviceName, brokerIp, brokerPort, userName, password, myIp, protocol)
+ public ##(string serviceName, string brokerIp, int brokerPort, string userName, string password) : base(serviceName, brokerIp, brokerPort, userName, password)
{
ServiceName = serviceName;
}
constexpr const char __GROUP_CTOR[] =
R"__cs_cb(
- public ##(string topicName, string brokerIp, int brokerPort, string userName, string password, string myIp, int protocol) : base(topicName, brokerIp, brokerPort, userName, password, myIp, protocol)
+ public ##(string topicName, string brokerIp, int brokerPort, string userName, string password) : base(topicName, brokerIp, brokerPort, userName, password)
{
TopicName = topicName;
try
constexpr const char __SERVER_CTOR[] =
R"__cs_cb(
- public ##(string serviceName, string displayName, string brokerIp, int brokerPort, string userName, string password, string myIp, int protocol) : base(serviceName, displayName, brokerIp, brokerPort, userName, password, myIp, protocol)
+ public ##(string serviceName, string displayName, string brokerIp, int brokerPort, string userName, string password) : base(serviceName, displayName, brokerIp, brokerPort, userName, password)
{
}
)__cs_cb";
namespace tidl {
-std::string AittPluginCsTransportable::GenInclude() const {
+std::string MqttPluginCsTransportable::GenInclude() const {
return __USING;
}
-std::string AittPluginCsTransportable::GenFileSend(std::string path) const {
+std::string MqttPluginCsTransportable::GenFileSend(std::string path) const {
return std::string(ReplaceAll(__FILE_SEND, {
{ "<FILE_PATH>", path } }));
}
-std::string AittPluginCsTransportable::GenGroupType() const {
+std::string MqttPluginCsTransportable::GenGroupType() const {
return "GroupBase";
}
-std::string AittPluginCsTransportable::GenPayloadTransferStatusType() const {
+std::string MqttPluginCsTransportable::GenPayloadTransferStatusType() const {
return "PayloadTransferStatus";
}
-std::string AittPluginCsTransportable::GenPeerInfoType() const {
+std::string MqttPluginCsTransportable::GenPeerInfoType() const {
return "PeerInfo";
}
-std::string AittPluginCsTransportable::GenPayloadType() const {
+std::string MqttPluginCsTransportable::GenPayloadType() const {
return "Payload";
}
-std::string AittPluginCsTransportable::GenClientType() const {
+std::string MqttPluginCsTransportable::GenClientType() const {
return "ClientBase";
}
-std::string AittPluginCsTransportable::GenServerType() const {
+std::string MqttPluginCsTransportable::GenServerType() const {
return "ServerBase";
}
-std::string AittPluginCsTransportable::GenClientExtraHeader() const {
+std::string MqttPluginCsTransportable::GenClientExtraHeader() const {
return "";
}
-std::string AittPluginCsTransportable::GenClientExtraBody() const {
+std::string MqttPluginCsTransportable::GenClientExtraBody() const {
return "";
}
-std::string AittPluginCsTransportable::GenServerExtraHeader() const {
+std::string MqttPluginCsTransportable::GenServerExtraHeader() const {
return "";
}
-std::string AittPluginCsTransportable::GenServerExtraBody() const {
+std::string MqttPluginCsTransportable::GenServerExtraBody() const {
return "";
}
-std::string AittPluginCsTransportable::GenPayloadTypeData() const {
+std::string MqttPluginCsTransportable::GenPayloadTypeData() const {
return "PayloadType.DataPayload";
}
-std::string AittPluginCsTransportable::GenPayloadTypeFile() const {
+std::string MqttPluginCsTransportable::GenPayloadTypeFile() const {
return "PayloadType.FilePayload";
}
-std::string AittPluginCsTransportable::GenClientBaseCtor(
+std::string MqttPluginCsTransportable::GenClientBaseCtor(
const Interface& iface) const {
std::string ctor(ReplaceAll(__CLIENT_CTOR, "##", iface.GetID()));
return ctor;
}
-std::string AittPluginCsTransportable::GenGroupBaseCtor(
+std::string MqttPluginCsTransportable::GenGroupBaseCtor(
const Interface& iface) const {
std::string ctor(ReplaceAll(__GROUP_CTOR, "##", iface.GetID()));
return ctor;
}
-std::string AittPluginCsTransportable::GenServerBaseCtor(
+std::string MqttPluginCsTransportable::GenServerBaseCtor(
const Interface& iface) const {
std::string ctor(ReplaceAll(__SERVER_CTOR, "##", iface.GetID()));
return ctor;
* limitations under the License.
*/
-#ifndef IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_TRANSPORTABLE_H_
-#define IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_TRANSPORTABLE_H_
+#ifndef IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_TRANSPORTABLE_H_
+#define IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_TRANSPORTABLE_H_
#include <string>
namespace tidl {
-class AittPluginCsTransportable : public CsTransportable {
+class MqttPluginCsTransportable : public CsTransportable {
public:
- virtual ~AittPluginCsTransportable() = default;
+ virtual ~MqttPluginCsTransportable() = default;
std::string GenInclude() const override;
std::string GenFileSend(std::string path) const override;
std::string GenGroupType() const override;
} // namespace tidl
-#endif // IDLC_GEN_AITT_PLUGIN_AITT_PLUGIN_CS_TRANSPORTABLE_H_
+#endif // IDLC_GEN_MQTT_PLUGIN_MQTT_PLUGIN_CS_TRANSPORTABLE_H_
#include <algorithm>
-#include "idlc/gen_aitt_plugin/aitt_plugin_internal_body_gen.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_internal_body_gen_cb.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_internal_body_gen.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_internal_body_gen_cb.h"
namespace tidl {
-AittPluginInternalBodyGen::AittPluginInternalBodyGen(std::shared_ptr<Document> doc, std::shared_ptr<tidl::Transportable> trans)
+MqttPluginInternalBodyGen::MqttPluginInternalBodyGen(std::shared_ptr<Document> doc, std::shared_ptr<tidl::Transportable> trans)
: CCionBodyGeneratorBase(doc, trans) {
}
-void AittPluginInternalBodyGen::OnInitGen(std::ofstream& stream) {
+void MqttPluginInternalBodyGen::OnInitGen(std::ofstream& stream) {
GenVersion(stream);
GenGNUSourceDefinition(stream);
GenIncludeHeader(stream);
- GenLogTag(stream, std::string("AITT_PLUGIN_INTERNAL"));
+ GenLogTag(stream, std::string("MQTT_PLUGIN_INTERNAL"));
GenLogDefinition(stream);
GenBody(stream);
GenPluginInit(stream);
}
-void AittPluginInternalBodyGen::GenPluginInit(std::ofstream& stream) {
+void MqttPluginInternalBodyGen::GenPluginInit(std::ofstream& stream) {
stream << CB_PLUGIN_INIT_BASE;
}
-void AittPluginInternalBodyGen::GenIncludeHeader(std::ofstream& stream) {
+void MqttPluginInternalBodyGen::GenIncludeHeader(std::ofstream& stream) {
stream << tidl::ReplaceAll(CB_INTERNAL_HEADER, "<FILENAME>", GetFileNamespace());
}
-void AittPluginInternalBodyGen::GenLoadModule(std::ofstream& stream) {
+void MqttPluginInternalBodyGen::GenLoadModule(std::ofstream& stream) {
std::string code;
code = CB_LOAD_MOUDLE_BASE;
code += CB_LOAD_MOUDLE_PAYLOAD;
stream << tidl::ReplaceAll(code, "<PREFIX>", GetHandlePrefix());
}
-void AittPluginInternalBodyGen::GenBody(std::ofstream& stream) {
+void MqttPluginInternalBodyGen::GenBody(std::ofstream& stream) {
stream << tidl::ReplaceAll(CB_BODY_BASE, "<PREFIX>", GetHandlePrefix());
switch (GetType()) {
case 1:
GenLoadModule(stream);
}
-void AittPluginInternalBodyGen::OnFiniGen(std::ofstream& stream) {
+void MqttPluginInternalBodyGen::OnFiniGen(std::ofstream& stream) {
}
} // namespace tidl
* limitations under the License.
*/
-#ifndef IDLC_AITT_PLUGIN_C_INTERNAL_BODY_GEN_H_
-#define IDLC_AITT_PLUGIN_C_INTERNAL_BODY_GEN_H_
+#ifndef IDLC_MQTT_PLUGIN_C_INTERNAL_BODY_GEN_H_
+#define IDLC_MQTT_PLUGIN_C_INTERNAL_BODY_GEN_H_
#include <memory>
#include <string>
namespace tidl {
-class AittPluginInternalBodyGen : public CCionBodyGeneratorBase {
+class MqttPluginInternalBodyGen : public CCionBodyGeneratorBase {
public:
- explicit AittPluginInternalBodyGen(std::shared_ptr<Document> doc, std::shared_ptr<tidl::Transportable> trans);
- virtual ~AittPluginInternalBodyGen() = default;
+ explicit MqttPluginInternalBodyGen(std::shared_ptr<Document> doc, std::shared_ptr<tidl::Transportable> trans);
+ virtual ~MqttPluginInternalBodyGen() = default;
void OnInitGen(std::ofstream& stream) override;
void OnFiniGen(std::ofstream& stream) override;
} // namespace tidl
-#endif // IDLC_AITT_PLUGIN_C_INTERNAL_BODY_GEN_H_
+#endif // IDLC_MQTT_PLUGIN_C_INTERNAL_BODY_GEN_H_
* limitations under the License.
*/
-#ifndef IDLC_C_AITT_PLUGIN_GEN_INTERNAL_BODY_GEN_CB_H_
-#define IDLC_C_AITT_PLUGIN_GEN_INTERNAL_BODY_GEN_CB_H_
+#ifndef IDLC_C_MQTT_PLUGIN_GEN_INTERNAL_BODY_GEN_CB_H_
+#define IDLC_C_MQTT_PLUGIN_GEN_INTERNAL_BODY_GEN_CB_H_
constexpr const char CB_INTERNAL_HEADER[] =
R"__c_cb(
constexpr const char CB_LOAD_MOUDLE_BASE[] =
R"__c_cb(
static void __load_module() {
- plugin_handle = dlopen(LIBAITT_PLUGIN_INFO, RTLD_LAZY | RTLD_GLOBAL);
+ plugin_handle = dlopen(LIBMQTT_PLUGIN_INFO, RTLD_LAZY | RTLD_GLOBAL);
if (!plugin_handle) {
LOGE("Failed to load - %s", dlerror());
return;
constexpr const char CB_BODY_BASE[] =
R"__c_cb(
-#define LIBAITT_PLUGIN_INFO "/usr/lib/libaitt_plugin.so.1"
+#define LIBMQTT_PLUGIN_INFO "/usr/lib/libcion-mqtt-plugin.so.1"
static void *plugin_handle;
#define PLUGIN_CTOR __attribute__((constructor))
static bool __load_payload() {
<PREFIX>_payload_create = dlsym(plugin_handle,
- "aitt_plugin_payload_create");
+ "mqtt_plugin_payload_create");
if (!<PREFIX>_payload_create) {
LOGE("Failed to find plugin_payload_create");
return false;
}
<PREFIX>_payload_destroy = dlsym(plugin_handle,
- "aitt_plugin_payload_destroy");
+ "mqtt_plugin_payload_destroy");
if (!<PREFIX>_payload_destroy) {
LOGE("Failed to find plugin_payload_destroy");
return false;
}
<PREFIX>_payload_get_type = dlsym(plugin_handle,
- "aitt_plugin_payload_get_type");
+ "mqtt_plugin_payload_get_type");
if (!<PREFIX>_payload_get_type) {
LOGE("Failed to find plugin_payload_get_type");
return false;
}
<PREFIX>_payload_get_data = dlsym(plugin_handle,
- "aitt_plugin_payload_get_data");
+ "mqtt_plugin_payload_get_data");
if (!<PREFIX>_payload_get_data) {
LOGE("Failed to find plugin_payload_get_data");
return false;
}
<PREFIX>_payload_set_data = dlsym(plugin_handle,
- "aitt_plugin_payload_set_data");
+ "mqtt_plugin_payload_set_data");
if (!<PREFIX>_payload_set_data) {
LOGE("Failed to find plugin_payload_set_data");
return false;
}
<PREFIX>_payload_save_as_file = dlsym(plugin_handle,
- "aitt_plugin_payload_save_as_file");
+ "mqtt_plugin_payload_save_as_file");
if (!<PREFIX>_payload_save_as_file) {
LOGE("Failed to find plugin_payload_save_as_file");
return false;
}
<PREFIX>_payload_get_received_file_name = dlsym(plugin_handle,
- "aitt_plugin_payload_get_received_file_name");
+ "mqtt_plugin_payload_get_received_file_name");
if (!<PREFIX>_payload_get_received_file_name) {
LOGE("Failed to find plugin_payload_get_received_file_name");
return false;
}
<PREFIX>_payload_get_received_bytes = dlsym(plugin_handle,
- "aitt_plugin_payload_get_received_bytes");
+ "mqtt_plugin_payload_get_received_bytes");
if (!<PREFIX>_payload_get_received_bytes) {
LOGE("Failed to init plugin_payload_get_received_bytes");
return false;
}
<PREFIX>_payload_get_total_bytes = dlsym(plugin_handle,
- "aitt_plugin_payload_get_total_bytes");
+ "mqtt_plugin_payload_get_total_bytes");
if (!<PREFIX>_payload_get_total_bytes) {
LOGE("Failed to find plugin_payload_get_total_bytes");
return false;
}
<PREFIX>_payload_set_file_path = dlsym(plugin_handle,
- "aitt_plugin_payload_set_file_path");
+ "mqtt_plugin_payload_set_file_path");
if (!<PREFIX>_payload_set_file_path) {
LOGE("Failed to find plugin_payload_set_file_path");
return false;
}
<PREFIX>_payload_get_payload_id = dlsym(plugin_handle,
- "aitt_plugin_payload_get_payload_id");
+ "mqtt_plugin_payload_get_payload_id");
if (!<PREFIX>_payload_get_payload_id) {
LOGE("Failed to find plugin_payload_get_payload_id");
return false;
static bool __load_peerinfo() {
<PREFIX>_peer_info_clone = dlsym(plugin_handle,
- "aitt_plugin_peer_info_clone");
+ "mqtt_plugin_peer_info_clone");
if (!<PREFIX>_peer_info_clone) {
LOGE("Failed to find plugin_peer_info_clone");
return false;
}
<PREFIX>_peer_info_destroy = dlsym(plugin_handle,
- "aitt_plugin_peer_info_destroy");
+ "mqtt_plugin_peer_info_destroy");
if (!<PREFIX>_peer_info_destroy) {
LOGE("Failed to find plugin_peer_info_destroy");
return false;
}
<PREFIX>_peer_info_get_device_id = dlsym(plugin_handle,
- "aitt_plugin_peer_info_get_device_id");
+ "mqtt_plugin_peer_info_get_device_id");
if (!<PREFIX>_peer_info_get_device_id) {
LOGE("Failed to find plugin_peer_info_get_device_id");
return false;
}
<PREFIX>_peer_info_get_device_name = dlsym(plugin_handle,
- "aitt_plugin_peer_info_get_device_name");
+ "mqtt_plugin_peer_info_get_device_name");
if (!<PREFIX>_peer_info_get_device_name) {
LOGE("Failed to find plugin_peer_info_get_device_name");
return false;
}
<PREFIX>_peer_info_get_device_platform = dlsym(plugin_handle,
- "aitt_plugin_peer_info_get_device_platform");
+ "mqtt_plugin_peer_info_get_device_platform");
if (!<PREFIX>_peer_info_get_device_platform) {
LOGE("Failed to find plugin_peer_info_get_device_platform");
return false;
}
<PREFIX>_peer_info_get_device_platform_version = dlsym(plugin_handle,
- "aitt_plugin_peer_info_get_device_platform_version");
+ "mqtt_plugin_peer_info_get_device_platform_version");
if (!<PREFIX>_peer_info_get_device_platform_version) {
LOGE("Failed to find plugin_peer_info_get_device_platform_version");
return false;
}
<PREFIX>_peer_info_get_device_type = dlsym(plugin_handle,
- "aitt_plugin_peer_info_get_device_type");
+ "mqtt_plugin_peer_info_get_device_type");
if (!<PREFIX>_peer_info_get_device_type) {
LOGE("Failed to find plugin_peer_info_get_device_type");
return false;
}
<PREFIX>_peer_info_get_app_id = dlsym(plugin_handle,
- "aitt_plugin_peer_info_get_app_id");
+ "mqtt_plugin_peer_info_get_app_id");
if (!<PREFIX>_peer_info_get_app_id) {
LOGE("Failed to init plugin_peer_info_get_app_id");
return false;
}
<PREFIX>_peer_info_get_app_version = dlsym(plugin_handle,
- "aitt_plugin_peer_info_get_app_version");
+ "mqtt_plugin_peer_info_get_app_version");
if (!<PREFIX>_peer_info_get_app_version) {
LOGE("Failed to find plugin_peer_info_get_app_version");
return false;
}
<PREFIX>_peer_info_get_uuid = dlsym(plugin_handle,
- "aitt_plugin_peer_info_get_uuid");
+ "mqtt_plugin_peer_info_get_uuid");
if (!<PREFIX>_peer_info_get_uuid) {
LOGE("Failed to find plugin_peer_info_get_uuid");
return false;
}
<PREFIX>_peer_info_get_display_name = dlsym(plugin_handle,
- "aitt_plugin_peer_info_get_display_name");
+ "mqtt_plugin_peer_info_get_display_name");
if (!<PREFIX>_peer_info_get_display_name) {
LOGE("Failed to find plugin_peer_info_get_display_name");
return false;
static bool __load_connection() {
<PREFIX>_connection_result_get_status = dlsym(plugin_handle,
- "aitt_plugin_connection_result_get_status");
+ "mqtt_plugin_connection_result_get_status");
if (!<PREFIX>_connection_result_get_status) {
LOGE("Failed to find plugin_connection_result_get_status");
return false;
}
<PREFIX>_connection_result_get_reason = dlsym(plugin_handle,
- "aitt_plugin_connection_result_get_reason");
+ "mqtt_plugin_connection_result_get_reason");
if (!<PREFIX>_connection_result_get_reason) {
LOGE("Failed to find plugin_connection_result_get_reason");
return false;
constexpr const char CB_BODY_GROUP[] =
R"__c_cb(
static bool __load_group_channel() {
- <PREFIX>_group_create = dlsym(plugin_handle, "aitt_plugin_group_create");
+ <PREFIX>_group_create = dlsym(plugin_handle, "mqtt_plugin_group_create");
if (!<PREFIX>_group_create) {
LOGE("Failed to find plugin_group_create");
return false;
}
<PREFIX>_group_destroy = dlsym(plugin_handle,
- "aitt_plugin_group_destroy");
+ "mqtt_plugin_group_destroy");
if (!<PREFIX>_group_destroy) {
LOGE("Failed to find plugin_group_destroy");
return false;
}
<PREFIX>_group_subscribe = dlsym(plugin_handle,
- "aitt_plugin_group_subscribe");
+ "mqtt_plugin_group_subscribe");
if (!<PREFIX>_group_subscribe) {
LOGE("Failed to find plugin_group_subscribe");
return false;
}
<PREFIX>_group_unsubscribe = dlsym(plugin_handle,
- "aitt_plugin_group_unsubscribe");
+ "mqtt_plugin_group_unsubscribe");
if (!<PREFIX>_group_unsubscribe) {
LOGE("Failed to find plugin_group_unsubscribe");
return false;
}
<PREFIX>_group_publish = dlsym(plugin_handle,
- "aitt_plugin_group_publish");
+ "mqtt_plugin_group_publish");
if (!<PREFIX>_group_publish) {
LOGE("Failed to find plugin_group_publish");
return false;
}
<PREFIX>_group_add_payload_received_cb = dlsym(plugin_handle,
- "aitt_plugin_group_add_payload_received_cb");
+ "mqtt_plugin_group_add_payload_received_cb");
if (!<PREFIX>_group_add_payload_received_cb) {
LOGE("Failed to find plugin_group_add_payload_received_cb");
return false;
}
<PREFIX>_group_add_joined_cb = dlsym(plugin_handle,
- "aitt_plugin_group_add_joined_cb");
+ "mqtt_plugin_group_add_joined_cb");
if (!<PREFIX>_group_add_joined_cb) {
LOGE("Failed to find plugin_group_add_joined_cb");
return false;
}
<PREFIX>_group_add_left_cb = dlsym(plugin_handle,
- "aitt_plugin_group_add_left_cb");
+ "mqtt_plugin_group_add_left_cb");
if (!<PREFIX>_group_add_left_cb) {
LOGE("Failed to init plugin_group_add_left_cb");
return false;
constexpr const char CB_BODY_CLIENT[] =
R"__c_cb(
static bool __load_client_channel() {
- <PREFIX>_client_create = dlsym(plugin_handle, "aitt_plugin_client_create");
+ <PREFIX>_client_create = dlsym(plugin_handle, "mqtt_plugin_client_create");
if (!<PREFIX>_client_create) {
LOGE("Failed to find plugin_client_create");
return false;
}
<PREFIX>_client_destroy = dlsym(plugin_handle,
- "aitt_plugin_client_destroy");
+ "mqtt_plugin_client_destroy");
if (!<PREFIX>_client_destroy) {
LOGE("Failed to find plugin_client_destroy");
return false;
}
<PREFIX>_client_try_discovery = dlsym(plugin_handle,
- "aitt_plugin_client_try_discovery");
+ "mqtt_plugin_client_try_discovery");
if (!<PREFIX>_client_try_discovery) {
LOGE("Failed to find plugin_client_try_discovery");
return false;
}
<PREFIX>_client_stop_discovery = dlsym(plugin_handle,
- "aitt_plugin_client_stop_discovery");
+ "mqtt_plugin_client_stop_discovery");
if (!<PREFIX>_client_stop_discovery) {
LOGE("Failed to find plugin_client_stop_discovery");
return false;
}
<PREFIX>_client_connect = dlsym(plugin_handle,
- "aitt_plugin_client_connect");
+ "mqtt_plugin_client_connect");
if (!<PREFIX>_client_connect) {
LOGE("Failed to find plugin_client_connect");
return false;
}
<PREFIX>_client_disconnect = dlsym(plugin_handle,
- "aitt_plugin_client_disconnect");
+ "mqtt_plugin_client_disconnect");
if (!<PREFIX>_client_disconnect) {
LOGE("Failed to find plugin_client_disconnect");
return false;
}
<PREFIX>_client_send_data = dlsym(plugin_handle,
- "aitt_plugin_client_send_data");
+ "mqtt_plugin_client_send_data");
if (!<PREFIX>_client_send_data) {
LOGE("Failed to find plugin_client_send_data");
return false;
}
<PREFIX>_client_send_payload_async = dlsym(plugin_handle,
- "aitt_plugin_client_send_payload_async");
+ "mqtt_plugin_client_send_payload_async");
if (!<PREFIX>_client_send_payload_async) {
LOGE("Failed to init plugin_client_send_payload_async");
return false;
}
<PREFIX>_client_add_connection_result_cb = dlsym(plugin_handle,
- "aitt_plugin_client_add_connection_result_cb");
+ "mqtt_plugin_client_add_connection_result_cb");
if (!<PREFIX>_client_add_connection_result_cb) {
LOGE("Failed to find plugin_client_add_connection_result_cb");
return false;
}
<PREFIX>_client_add_payload_received_cb = dlsym(plugin_handle,
- "aitt_plugin_client_add_payload_received_cb");
+ "mqtt_plugin_client_add_payload_received_cb");
if (!<PREFIX>_client_add_payload_received_cb) {
LOGE("Failed to find plugin_client_add_payload_received_cb");
return false;
}
<PREFIX>_client_add_disconnected_cb = dlsym(plugin_handle,
- "aitt_plugin_client_add_disconnected_cb");
+ "mqtt_plugin_client_add_disconnected_cb");
if (!<PREFIX>_client_add_disconnected_cb) {
LOGE("Failed to find plugin_client_add_disconnected_cb");
return false;
constexpr const char CB_BODY_SERVER[] =
R"__c_cb(
static bool __load_server_channel() {
- <PREFIX>_server_create = dlsym(plugin_handle, "aitt_plugin_server_create");
+ <PREFIX>_server_create = dlsym(plugin_handle, "mqtt_plugin_server_create");
if (!<PREFIX>_server_create) {
LOGE("Failed to find plugin_server_create");
return false;
}
<PREFIX>_server_add_connection_result_cb = dlsym(plugin_handle,
- "aitt_plugin_server_add_connection_result_cb");
+ "mqtt_plugin_server_add_connection_result_cb");
if (!<PREFIX>_server_add_connection_result_cb) {
LOGE("Failed to find plugin_server_add_connection_result_cb");
return false;
}
<PREFIX>_server_add_payload_received_cb = dlsym(plugin_handle,
- "aitt_plugin_server_add_payload_received_cb");
+ "mqtt_plugin_server_add_payload_received_cb");
if (!<PREFIX>_server_add_payload_received_cb) {
LOGE("Failed to find plugin_server_add_payload_received_cb");
return false;
}
<PREFIX>_server_add_disconnected_cb = dlsym(plugin_handle,
- "aitt_plugin_server_add_disconnected_cb");
+ "mqtt_plugin_server_add_disconnected_cb");
if (!<PREFIX>_server_add_disconnected_cb) {
LOGE("Failed to find plugin_server_add_disconnected_cb");
return false;
}
<PREFIX>_server_set_data_received_cb = dlsym(plugin_handle,
- "aitt_plugin_server_set_data_received_cb");
+ "mqtt_plugin_server_set_data_received_cb");
if (!<PREFIX>_server_set_data_received_cb) {
LOGE("Failed to find plugin_server_set_data_received_cb");
return false;
}
- <PREFIX>_server_listen = dlsym(plugin_handle, "aitt_plugin_server_listen");
+ <PREFIX>_server_listen = dlsym(plugin_handle, "mqtt_plugin_server_listen");
if (!<PREFIX>_server_listen) {
LOGE("Failed to find plugin_server_listen");
return false;
}
<PREFIX>_server_foreach_connected_peer_info = dlsym(plugin_handle,
- "aitt_plugin_server_foreach_connected_peer_info");
+ "mqtt_plugin_server_foreach_connected_peer_info");
if (!<PREFIX>_server_foreach_connected_peer_info) {
LOGE("Failed to find <PREFIX>_server_foreach_connected_peer_info");
return false;
}
- <PREFIX>_server_accept = dlsym(plugin_handle, "aitt_plugin_server_accept");
+ <PREFIX>_server_accept = dlsym(plugin_handle, "mqtt_plugin_server_accept");
if (!<PREFIX>_server_accept) {
LOGE("Failed to init plugin_server_accept");
return false;
}
- <PREFIX>_server_reject = dlsym(plugin_handle, "aitt_plugin_server_reject");
+ <PREFIX>_server_reject = dlsym(plugin_handle, "mqtt_plugin_server_reject");
if (!<PREFIX>_server_reject) {
LOGE("Failed to find plugin_server_reject");
return false;
}
<PREFIX>_server_set_display_name = dlsym(plugin_handle,
- "aitt_plugin_server_set_display_name");
+ "mqtt_plugin_server_set_display_name");
if (!<PREFIX>_server_set_display_name) {
LOGE("Failed to find plugin_server_set_display_name");
return false;
}
<PREFIX>_server_send_payload_async = dlsym(plugin_handle,
- "aitt_plugin_server_send_payload_async");
+ "mqtt_plugin_server_send_payload_async");
if (!<PREFIX>_server_send_payload_async) {
LOGE("Failed to find plugin_server_send_payload_async");
return false;
}
<PREFIX>_server_destroy = dlsym(plugin_handle,
- "aitt_plugin_server_destroy");
+ "mqtt_plugin_server_destroy");
if (!<PREFIX>_server_destroy) {
LOGE("Failed to find plugin_server_destroy");
return false;
}
<PREFIX>_server_disconnect = dlsym(plugin_handle,
- "aitt_plugin_server_disconnect");
+ "mqtt_plugin_server_disconnect");
if (!<PREFIX>_server_disconnect) {
LOGE("Failed to find plugin_server_disconnect");
return false;
}
)__c_cb";
-#endif // IDLC_C_AITT_PLUGIN_GEN_INTERNAL_BODY_GEN_CB_H_
+#endif // IDLC_C_MQTT_PLUGIN_GEN_INTERNAL_BODY_GEN_CB_H_
* limitations under the License.
*/
-#include "idlc/gen_aitt_plugin/aitt_plugin_internal_header_gen.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_internal_header_gen.h"
namespace {
-#include "idlc/gen_aitt_plugin/aitt_plugin_internal_header_gen_cb.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_internal_header_gen_cb.h"
}
namespace tidl {
-AittPluginInternalHeaderGen::AittPluginInternalHeaderGen(std::shared_ptr<Document> doc, std::shared_ptr<tidl::Transportable> trans)
+MqttPluginInternalHeaderGen::MqttPluginInternalHeaderGen(std::shared_ptr<Document> doc, std::shared_ptr<tidl::Transportable> trans)
: CCionHeaderGeneratorBase(doc, trans) {}
-void AittPluginInternalHeaderGen::OnInitGen(std::ofstream& stream) {
+void MqttPluginInternalHeaderGen::OnInitGen(std::ofstream& stream) {
GenVersion(stream);
stream << tidl::ReplaceAll(CB_HEADER_START, "<PREFIX>", GetHandlePrefix());
stream << tidl::ReplaceAll(CB_HEADER_FUN_COMMOM, "<PREFIX>", GetHandlePrefix());
}
-void AittPluginInternalHeaderGen::OnFiniGen(std::ofstream& stream) {
+void MqttPluginInternalHeaderGen::OnFiniGen(std::ofstream& stream) {
GenExplicitLinkageClose(stream);
}
* limitations under the License.
*/
-#ifndef IDLC_AITT_PLUGIN_C_INTERNAL_HEADER_GEN_H_
-#define IDLC_AITT_PLUGIN_C_INTERNAL_HEADER_GEN_H_
+#ifndef IDLC_MQTT_PLUGIN_C_INTERNAL_HEADER_GEN_H_
+#define IDLC_MQTT_PLUGIN_C_INTERNAL_HEADER_GEN_H_
#include <memory>
#include <string>
namespace tidl {
-class AittPluginInternalHeaderGen : public CCionHeaderGeneratorBase {
+class MqttPluginInternalHeaderGen : public CCionHeaderGeneratorBase {
public:
- explicit AittPluginInternalHeaderGen(std::shared_ptr<Document> doc, std::shared_ptr<tidl::Transportable> trans);
- virtual ~AittPluginInternalHeaderGen() = default;
+ explicit MqttPluginInternalHeaderGen(std::shared_ptr<Document> doc, std::shared_ptr<tidl::Transportable> trans);
+ virtual ~MqttPluginInternalHeaderGen() = default;
void OnInitGen(std::ofstream& stream) override;
void OnFiniGen(std::ofstream& stream) override;
} // namespace tidl
-#endif // IDLC_AITT_PLUGIN_C_INTERNAL_HEADER_GEN_H_
\ No newline at end of file
+#endif // IDLC_MQTT_PLUGIN_C_INTERNAL_HEADER_GEN_H_
\ No newline at end of file
* limitations under the License.
*/
-#ifndef IDLC_C_AITT_PLUGIN_GEN_INTERNAL_HEADER_GEN_CB_H_
-#define IDLC_C_AITT_PLUGIN_GEN_INTERNAL_HEADER_GEN_CB_H_
+#ifndef IDLC_C_MQTT_PLUGIN_GEN_INTERNAL_HEADER_GEN_CB_H_
+#define IDLC_C_MQTT_PLUGIN_GEN_INTERNAL_HEADER_GEN_CB_H_
constexpr const char CB_HEADER_START[] =
R"__c_cb(
} <PREFIX>_transfer_status_e;
typedef enum _<PREFIX>_payload_type_e {
- AITT_PLUGIN_PAYLOAD_TYPE_DATA, /**< Data type payload **/
- AITT_PLUGIN_PAYLOAD_TYPE_FILE, /**< File type payload **/
+ MQTT_PLUGIN_PAYLOAD_TYPE_DATA, /**< Data type payload **/
+ MQTT_PLUGIN_PAYLOAD_TYPE_FILE, /**< File type payload **/
} <PREFIX>_payload_type_e;
typedef enum _<PREFIX>_connection_status_e {
int (*<PREFIX>_connection_result_get_reason)(const <PREFIX>_connection_result_h, char **reason);
)__c_cb";
-#endif // IDLC_C_AITT_PLUGIN_GEN_INTERNAL_HEADER_GEN_CB_H_
+#endif // IDLC_C_MQTT_PLUGIN_GEN_INTERNAL_HEADER_GEN_CB_H_
* limitations under the License.
*/
-#include "idlc/gen_aitt_plugin/aitt_plugin_java_transportable.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_java_transportable.h"
#include <utility>
namespace tidl {
-std::string AittPluginJavaTransportable::GenInclude() const {
- return "import org.tizen.aitt.*;";
+std::string MqttPluginJavaTransportable::GenInclude() const {
+ return "import org.tizen.mqtt.*;";
}
-std::string AittPluginJavaTransportable::GenParcelInclude() const {
- return "import org.tizen.aitt.AittParcel;";
+std::string MqttPluginJavaTransportable::GenParcelInclude() const {
+ return "import org.tizen.mqtt.MqttParcel;";
}
-std::string AittPluginJavaTransportable::GenParcel() const {
- return "AittParcel";
+std::string MqttPluginJavaTransportable::GenParcel() const {
+ return "MqttParcel";
}
-std::string AittPluginJavaTransportable::GenClientBaseConstructor() const {
+std::string MqttPluginJavaTransportable::GenClientBaseConstructor() const {
return __CLIENT_BASE_CONSTRUCTOR;
}
-std::string AittPluginJavaTransportable::GenServerBaseConstructor() const {
+std::string MqttPluginJavaTransportable::GenServerBaseConstructor() const {
return __SERVER_BASE_CONSTRUCTOR;
}
-std::string AittPluginJavaTransportable::GenGroupBaseConstructor() const {
+std::string MqttPluginJavaTransportable::GenGroupBaseConstructor() const {
return __GROUP_BASE_CONSTRUCTOR;
}
-std::string AittPluginJavaTransportable::GenOnLeftEventMethod() const {
+std::string MqttPluginJavaTransportable::GenOnLeftEventMethod() const {
return __ON_LEFT_EVENT_METHOD;
}
-std::string AittPluginJavaTransportable::GenOnJoinedEventMethod() const {
+std::string MqttPluginJavaTransportable::GenOnJoinedEventMethod() const {
return __ON_JOINED_EVENT_METHOD;
}
-std::string AittPluginJavaTransportable::GenInheritedClassConstructor(
+std::string MqttPluginJavaTransportable::GenInheritedClassConstructor(
std::vector<std::string> params, std::vector<std::string> base_class_params,
std::string extra_operation) const {
return std::string(ReplaceAll(__INHERITED_CLASS_CONSTRUCTOR, {
* limitations under the License.
*/
-#ifndef IDLC_GEN_AITT_PLUGIN_JAVA_TRANSPORTABLE_H_
-#define IDLC_GEN_AITT_PLUGIN_JAVA_TRANSPORTABLE_H_
+#ifndef IDLC_GEN_MQTT_PLUGIN_JAVA_TRANSPORTABLE_H_
+#define IDLC_GEN_MQTT_PLUGIN_JAVA_TRANSPORTABLE_H_
#include <string>
namespace tidl {
-class AittPluginJavaTransportable : public DefaultJavaTransportable {
+class MqttPluginJavaTransportable : public DefaultJavaTransportable {
public:
std::string GenInclude() const override;
std::string GenParcelInclude() const override;
} // namespace tidl
-#endif // IDLC_GEN_AITT_PLUGIN_JAVA_TRANSPORTABLE_H_
+#endif // IDLC_GEN_MQTT_PLUGIN_JAVA_TRANSPORTABLE_H_
* limitations under the License.
*/
-#include "idlc/gen_aitt_plugin/aitt_plugin_loader.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_loader.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_c_transportable.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_cs_transportable.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_java_transportable.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_cpp_transportable.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_c_transportable.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_cs_transportable.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_java_transportable.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_cpp_transportable.h"
#include "idlc/gen_cion/default_cpp_transportable.h"
#include "idlc/gen_cion/default_java_transportable.h"
#include "idlc/gen_cion/default_cs_transportable.h"
namespace tidl {
-AIttPluginLoader::AIttPluginLoader(const std::string& plugin_path) {
+MqttPluginLoader::MqttPluginLoader(const std::string& plugin_path) {
if (plugin_path.empty()) {
- C_.reset(new AittPluginCTransportable());
- Cs_.reset(new AittPluginCsTransportable());
- Cpp_.reset(new AittPluginCppTransportable());
- Java_.reset(new AittPluginJavaTransportable());
+ C_.reset(new MqttPluginCTransportable());
+ Cs_.reset(new MqttPluginCsTransportable());
+ Cpp_.reset(new MqttPluginCppTransportable());
+ Java_.reset(new MqttPluginJavaTransportable());
} else {
// TODO
}
}
-const CTransportable& AIttPluginLoader::C() {
+const CTransportable& MqttPluginLoader::C() {
return *C_;
}
-const CppTransportable& AIttPluginLoader::Cpp() {
+const CppTransportable& MqttPluginLoader::Cpp() {
return *Cpp_;
}
-const CsTransportable& AIttPluginLoader::Cs() {
+const CsTransportable& MqttPluginLoader::Cs() {
return *Cs_;
}
-const JavaTransportable& AIttPluginLoader::Java() {
+const JavaTransportable& MqttPluginLoader::Java() {
return *Java_;
}
} // namespace tidl
* limitations under the License.
*/
-#ifndef IDLC_GEN_AITT_PLUGIN_LOADER_H_
-#define IDLC_GEN_AITT_PLUGIN_LOADER_H_
+#ifndef IDLC_GEN_MQTT_PLUGIN_LOADER_H_
+#define IDLC_GEN_MQTT_PLUGIN_LOADER_H_
#include <memory>
#include <string>
namespace tidl {
-class AIttPluginLoader : public Transportable {
+class MqttPluginLoader : public Transportable {
public:
- explicit AIttPluginLoader(const std::string& plugin_path);
+ explicit MqttPluginLoader(const std::string& plugin_path);
const CTransportable& C() override;
const CppTransportable& Cpp() override;
} // namespace tidl
-#endif // IDLC_GEN_AITT_PLUGIN_LOADER_H_
\ No newline at end of file
+#endif // IDLC_GEN_MQTT_PLUGIN_LOADER_H_
\ No newline at end of file
#include "idlc/gen_cion/cpp_cion_group_header_gen.h"
#include "idlc/gen_cion/cpp_cion_group_body_gen.h"
#include "idlc/gen_cion/plugin_loader.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_internal_header_gen.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_internal_body_gen.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_c_transportable.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_loader.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_cs_base_gen.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_cs_interop_gen.h"
-#include "idlc/gen_aitt_plugin/aitt_plugin_cpp_transportable.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_internal_header_gen.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_internal_body_gen.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_c_transportable.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_loader.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_cs_base_gen.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_cs_interop_gen.h"
+#include "idlc/gen_mqtt_plugin/mqtt_plugin_cpp_transportable.h"
#include "idlc/options.h"
default:
break;
}
- } else if (options->IsAitt()) {
+ } else if (options->IsMqtt()) {
auto trans = std::shared_ptr<tidl::Transportable>(
- new tidl::AIttPluginLoader(""));
+ new tidl::MqttPluginLoader(""));
switch (options->GetLanguage()) {
case tidl::Options::LANGUAGE_TYPE_C:
{
- tidl::AittPluginInternalHeaderGen internal_header(ps.GetDoc(), trans);
+ tidl::MqttPluginInternalHeaderGen internal_header(ps.GetDoc(), trans);
internal_header.EnableNamespace(options->HasNamespace());
internal_header.EnableGeneratedAPI(true);
internal_header.SetType(static_cast<int>(options->GetType()));
internal_header.Run(options->GetOutput() + "_internal.h");
- tidl::AittPluginInternalBodyGen internal_body(ps.GetDoc(), trans);
+ tidl::MqttPluginInternalBodyGen internal_body(ps.GetDoc(), trans);
internal_body.EnableNamespace(options->HasNamespace());
internal_body.EnableGeneratedAPI(true);
internal_body.SetType(static_cast<int>(options->GetType()));
}
case tidl::Options::LANGUAGE_TYPE_CPP:
{
- tidl::AittPluginInternalHeaderGen internal_header(ps.GetDoc(), trans);
+ tidl::MqttPluginInternalHeaderGen internal_header(ps.GetDoc(), trans);
internal_header.EnableNamespace(options->HasNamespace());
internal_header.EnableGeneratedAPI(true);
internal_header.SetType(static_cast<int>(options->GetType()));
internal_header.Run(options->GetOutput() + "_internal.h");
- tidl::AittPluginInternalBodyGen internal_body(ps.GetDoc(), trans);
+ tidl::MqttPluginInternalBodyGen internal_body(ps.GetDoc(), trans);
internal_body.EnableNamespace(options->HasNamespace());
internal_body.EnableGeneratedAPI(true);
internal_body.SetType(static_cast<int>(options->GetType()));
}
case tidl::Options::LANGUAGE_TYPE_CSHARP:
{
- tidl::AittPluginCsInteropGen interop(ps.GetDoc(), trans);
+ tidl::MqttPluginCsInteropGen interop(ps.GetDoc(), trans);
interop.SetType(static_cast<int>(options->GetType()));
- interop.Run("Interop.AittPlugin.cs");
- tidl::AittPluginCsBaseGen base(ps.GetDoc(), trans);
+ interop.Run("Interop.MqttPlugin.cs");
+ tidl::MqttPluginCsBaseGen base(ps.GetDoc(), trans);
base.SetType(static_cast<int>(options->GetType()));
- base.Run("AittPluginBase.cs");
+ base.Run("MqttPluginBase.cs");
tidl::CsCionStubGen stub(ps.GetDoc(), trans);
stub.Run(options->GetOutput() + ".cs");
default:
break;
}
- } else if (options->IsAitt()) {
+ } else if (options->IsMqtt()) {
auto trans = std::shared_ptr<tidl::Transportable>(
- new tidl::AIttPluginLoader(""));
+ new tidl::MqttPluginLoader(""));
switch (options->GetLanguage()) {
case tidl::Options::LANGUAGE_TYPE_C:
{
- tidl::AittPluginInternalHeaderGen internal_header(ps.GetDoc(), trans);
+ tidl::MqttPluginInternalHeaderGen internal_header(ps.GetDoc(), trans);
internal_header.EnableNamespace(options->HasNamespace());
internal_header.EnableGeneratedAPI(true);
internal_header.SetType(static_cast<int>(options->GetType()));
internal_header.Run(options->GetOutput() + "_internal.h");
- tidl::AittPluginInternalBodyGen internal_body(ps.GetDoc(), trans);
+ tidl::MqttPluginInternalBodyGen internal_body(ps.GetDoc(), trans);
internal_body.EnableNamespace(options->HasNamespace());
internal_body.EnableGeneratedAPI(true);
internal_body.SetType(static_cast<int>(options->GetType()));
}
case tidl::Options::LANGUAGE_TYPE_CPP:
{
- tidl::AittPluginInternalHeaderGen internal_header(ps.GetDoc(), trans);
+ tidl::MqttPluginInternalHeaderGen internal_header(ps.GetDoc(), trans);
internal_header.SetType(static_cast<int>(options->GetType()));
internal_header.EnableNamespace(options->HasNamespace());
internal_header.EnableGeneratedAPI(true);
internal_header.Run(options->GetOutput() + "_internal.h");
- tidl::AittPluginInternalBodyGen internal_body(ps.GetDoc(), trans);
+ tidl::MqttPluginInternalBodyGen internal_body(ps.GetDoc(), trans);
internal_body.SetType(static_cast<int>(options->GetType()));
internal_body.EnableNamespace(options->HasNamespace());
internal_body.EnableGeneratedAPI(true);
}
case tidl::Options::LANGUAGE_TYPE_CSHARP:
{
- tidl::AittPluginCsInteropGen interop(ps.GetDoc(), trans);
+ tidl::MqttPluginCsInteropGen interop(ps.GetDoc(), trans);
interop.SetType(static_cast<int>(options->GetType()));
- interop.Run("Interop.AittPlugin.cs");
- tidl::AittPluginCsBaseGen base(ps.GetDoc(), trans);
+ interop.Run("Interop.MqttPlugin.cs");
+ tidl::MqttPluginCsBaseGen base(ps.GetDoc(), trans);
base.SetType(static_cast<int>(options->GetType()));
- base.Run("AittPluginBase.cs");
+ base.Run("MqttPluginBase.cs");
tidl::CsCionProxyGen proxy(ps.GetDoc(), trans);
proxy.Run(options->GetOutput() + ".cs");
default:
break;
}
- } else if (options->IsAitt()) {
+ } else if (options->IsMqtt()) {
auto trans = std::shared_ptr<tidl::Transportable>(
- new tidl::AIttPluginLoader(""));
+ new tidl::MqttPluginLoader(""));
switch (options->GetLanguage()) {
case tidl::Options::LANGUAGE_TYPE_C:
{
- tidl::AittPluginInternalHeaderGen internal_header(ps.GetDoc(), trans);
+ tidl::MqttPluginInternalHeaderGen internal_header(ps.GetDoc(), trans);
internal_header.EnableNamespace(options->HasNamespace());
internal_header.EnableGeneratedAPI(true);
internal_header.SetType(static_cast<int>(options->GetType()));
internal_header.Run(options->GetOutput() + "_internal.h");
- tidl::AittPluginInternalBodyGen internal_body(ps.GetDoc(), trans);
+ tidl::MqttPluginInternalBodyGen internal_body(ps.GetDoc(), trans);
internal_body.EnableNamespace(options->HasNamespace());
internal_body.EnableGeneratedAPI(true);
internal_body.SetType(static_cast<int>(options->GetType()));
}
case tidl::Options::LANGUAGE_TYPE_CPP:
{
- tidl::AittPluginInternalHeaderGen internal_header(ps.GetDoc(), trans);
+ tidl::MqttPluginInternalHeaderGen internal_header(ps.GetDoc(), trans);
internal_header.SetType(static_cast<int>(options->GetType()));
internal_header.EnableNamespace(options->HasNamespace());
internal_header.EnableGeneratedAPI(true);
internal_header.Run(options->GetOutput() + "_internal.h");
- tidl::AittPluginInternalBodyGen internal_body(ps.GetDoc(), trans);
+ tidl::MqttPluginInternalBodyGen internal_body(ps.GetDoc(), trans);
internal_body.SetType(static_cast<int>(options->GetType()));
internal_body.EnableNamespace(options->HasNamespace());
internal_body.EnableGeneratedAPI(true);
}
case tidl::Options::LANGUAGE_TYPE_CSHARP:
{
- tidl::AittPluginCsInteropGen interop(ps.GetDoc(), trans);
+ tidl::MqttPluginCsInteropGen interop(ps.GetDoc(), trans);
interop.SetType(static_cast<int>(options->GetType()));
- interop.Run("Interop.AittPlugin.cs");
- tidl::AittPluginCsBaseGen base(ps.GetDoc(), trans);
+ interop.Run("Interop.MqttPlugin.cs");
+ tidl::MqttPluginCsBaseGen base(ps.GetDoc(), trans);
base.SetType(static_cast<int>(options->GetType()));
- base.Run("AittPluginBase.cs");
+ base.Run("MqttPluginBase.cs");
tidl::CsCionGroupGen group(ps.GetDoc(), trans);
group.Run(options->GetOutput() + ".cs");
exit(1);
tidl::Parser ps(options->IsBetaEnabled(), options->IsCion(),
- options->IsAitt(),
+ options->IsMqtt(),
options->GetType() == tidl::Options::Type::TYPE_GROUP ? true : false);
std::string path(options->GetInput());
-h, --help Show help options
Additional Options:
- -l, --language=LANGUAGE Select generating language (C, C++, C#, Java(CION & AITT only), Dart).
+ -l, --language=LANGUAGE Select generating language (C, C++, C#, Java(CION & MQTT only), Dart).
-i, --input=INPUT A tidl interface file.
-o, --output=OUTPUT The generated interface file.
-n, --namespace Add the prefix in the funtion name as output file name (C language only).
-b, --beta Use beta version (Support private file sharing).
-t, --thread Generate thread code (Stub only).
-c, --cion Generate CION code.
- -a, --aitt Generate AITT code.
+ -m, --mqtt Generate MQTT code.
Application Options:
-p, --proxy Generate proxy code
-s, --stub Generate stub code
- -g, --group Generate group code (CION and AITT only)
+ -g, --group Generate group code (CION and MQTT only)
-v, --version Show version information
)__option_cb";
}
{"beta", no_argument, NULL, 'b'},
{"thread", no_argument, NULL, 't'},
{"cion", no_argument, NULL, 'c'},
- {"aitt", no_argument, NULL, 'a'},
+ {"mqtt", no_argument, NULL, 'm'},
{0, 0, 0, 0}
};
while (true) {
- int c = getopt_long(argc, argv, "tcbpsgvhal:i:o:nr", long_options,
+ int c = getopt_long(argc, argv, "tcbpsgvhml:i:o:nr", long_options,
&option_index);
if (c == -1)
break;
options->isCion_ = true;
break;
- case 'a':
- options->isAitt_ = true;
+ case 'm':
+ options->isMqtt_ = true;
break;
default:
return std::shared_ptr<Options>(nullptr);
}
- if (options->isCion_ && options->isAitt_) {
- std::cerr << "Only one of cion and aitt is allowed." << std::endl;
+ if (options->isCion_ && options->isMqtt_) {
+ std::cerr << "Only one of cion and mqtt is allowed." << std::endl;
return std::shared_ptr<Options>(nullptr);
}
switch (static_cast<int>(options->type_)) {
switch (static_cast<int>(options->language_)) {
case LANGUAGE_TYPE_UNKNOWN:
std::cerr <<
- "Select a language (C, C++, C#, Java(CION & AITT only)).." << std::endl;
+ "Select a language (C, C++, C#, Java(CION & MQTT only)).." << std::endl;
options->PrintSample();
return std::shared_ptr<Options>(nullptr);
case LANGUAGE_TYPE_JAVA:
- if (!options->isCion_ && !options->isAitt_) {
+ if (!options->isCion_ && !options->isMqtt_) {
std::cerr <<
"Java language is only allowed for the CION and "
- "AITT codes." << std::endl;
+ "MQTT codes." << std::endl;
options->PrintSample();
return std::shared_ptr<Options>(nullptr);
}
static std::shared_ptr<Options> Parse(int argc, char** argv);
bool IsCion() const { return isCion_; }
- bool IsAitt() const { return isAitt_; }
+ bool IsMqtt() const { return isMqtt_; }
Type GetType() const { return type_; }
bool IsBetaEnabled() const { return isBetaEnabled_; }
bool IsThreadEnabled() const { return isThreadEnabled_; }
private:
bool isCion_ = false;
- bool isAitt_ = false;
+ bool isMqtt_ = false;
LanguageType language_;
std::string input_;
std::string output_;
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} TIDL_BUILD_TESTS_SRCS)
SET(TIDL_GEN_SRCS
- BufferAittPluginProxy.cc
- BufferAittPluginStub.cc
- BufferAittPluginProxyC.c
- BufferAittPluginStubC.c
+ BufferMqttPluginProxy.cc
+ BufferMqttPluginStub.cc
+ BufferMqttPluginProxyC.c
+ BufferMqttPluginStubC.c
BufferCionProxy.cc
BufferCionProxyC.c
BufferCionStub.cc
BufferStub.cc
BufferStubThread.cc
BufferStubC.c
- DataPortAittPluginProxy.cc
- DataPortAittPluginStub.cc
- DataPortAittPluginProxyC.c
- DataPortAittPluginStubC.c
+ DataPortMqttPluginProxy.cc
+ DataPortMqttPluginStub.cc
+ DataPortMqttPluginProxyC.c
+ DataPortMqttPluginStubC.c
DataPortCionProxy.cc
DataPortCionProxyC.c
DataPortCionStub.cc
DataPortStub.cc
DataPortStubThread.cc
DataPortStubC.c
- ExCionAittPluginProxy.cc
- ExCionAittPluginStub.cc
- ExCionAittPluginProxyC.c
- ExCionAittPluginStubC.c
+ ExCionMqttPluginProxy.cc
+ ExCionMqttPluginStub.cc
+ ExCionMqttPluginProxyC.c
+ ExCionMqttPluginStubC.c
ExCionCionProxy.cc
ExCionCionProxyC.c
ExCionCionStub.cc
ExStub.cc
ExStubThread.cc
ExStubC.c
- FooAittPluginProxy.cc
- FooAittPluginStub.cc
- FooAittPluginProxyC.c
- FooAittPluginStubC.c
+ FooMqttPluginProxy.cc
+ FooMqttPluginStub.cc
+ FooMqttPluginProxyC.c
+ FooMqttPluginStubC.c
FooCionProxy.cc
FooCionProxyC.c
FooCionStub.cc
FooStub.cc
FooStubThread.cc
FooStubC.c
- MessageAittPluginProxy.cc
- MessageAittPluginStub.cc
- MessageAittPluginProxyC.c
- MessageAittPluginStubC.c
+ MessageMqttPluginProxy.cc
+ MessageMqttPluginStub.cc
+ MessageMqttPluginProxyC.c
+ MessageMqttPluginStubC.c
MessageCionProxy.cc
MessageCionProxyC.c
MessageCionStub.cc
MessageProxyC.c
MessageStub.cc
MessageStubThread.cc
- FooPubsubAittPluginGroup.cc
- FooPubsubAittPluginGroupC.c
+ FooPubsubMqttPluginGroup.cc
+ FooPubsubMqttPluginGroupC.c
FooPubsubGroup.cc
FooPubsubGroupC.c
FooPubsubCionGroup.cc
INPUT="${FILES_CION[index]}.tidl"
- OUTPUT="${FILES_CION[index]}AittPluginProxyC"
+ OUTPUT="${FILES_CION[index]}MqttPluginProxyC"
${TIDLC} -b -p -n -a -l C -i ${SCRIPT_DIR}/tidl/${INPUT} -o ${TARGET_DIR}/${OUTPUT}
- OUTPUT="${FILES_CION[index]}AittPluginStubC"
+ OUTPUT="${FILES_CION[index]}MqttPluginStubC"
${TIDLC} -b -s -n -a -l C -i ${SCRIPT_DIR}/tidl/${INPUT} -o ${TARGET_DIR}/${OUTPUT}
- OUTPUT="${FILES_CION[index]}AittPluginProxy"
+ OUTPUT="${FILES_CION[index]}MqttPluginProxy"
${TIDLC} -b -p -n -a -l C++ -i ${SCRIPT_DIR}/tidl/${INPUT} -o ${TARGET_DIR}/${OUTPUT}
- OUTPUT="${FILES_CION[index]}AittPluginStub"
+ OUTPUT="${FILES_CION[index]}MqttPluginStub"
${TIDLC} -b -s -n -a -l C++ -i ${SCRIPT_DIR}/tidl/${INPUT} -o ${TARGET_DIR}/${OUTPUT}
done
INPUT="${FILES_FOR_GROUP[index]}.tidl"
- OUTPUT="${FILES_FOR_GROUP[index]}AittPluginGroupC"
+ OUTPUT="${FILES_FOR_GROUP[index]}MqttPluginGroupC"
${TIDLC} -b -a -n -g -l C -i ${SCRIPT_DIR}/tidl/${INPUT} -o ${TARGET_DIR}/${OUTPUT}
- OUTPUT="${FILES_FOR_GROUP[index]}AittPluginGroup"
+ OUTPUT="${FILES_FOR_GROUP[index]}MqttPluginGroup"
${TIDLC} -b -a -n -g -l C++ -i ${SCRIPT_DIR}/tidl/${INPUT} -o ${TARGET_DIR}/${OUTPUT}
done
}