dbusmenu-qt 0.8.1

src/dbusmenuadaptor.h

00001 /*
00002  * This file was generated by qdbusxml2cpp version 0.7
00003  * Command line was: qdbusxml2cpp -m -a dbusmenuadaptor -i /root/32-source/testing/l/libdbusmenu-qt/0.8.1/tmp/libdbusmenu-qt-0.8.1/src/dbusmenuexporterdbus_p.h -l DBusMenuExporterDBus /root/32-source/testing/l/libdbusmenu-qt/0.8.1/tmp/libdbusmenu-qt-0.8.1/src/com.canonical.dbusmenu.xml
00004  *
00005  * qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
00006  *
00007  * This is an auto-generated file.
00008  * This file may have been hand-edited. Look for HAND-EDIT comments
00009  * before re-generating it.
00010  */
00011 
00012 #ifndef DBUSMENUADAPTOR_H_1318289053
00013 #define DBUSMENUADAPTOR_H_1318289053
00014 
00015 #include <QtCore/QObject>
00016 #include <QtDBus/QtDBus>
00017 #include "/root/32-source/testing/l/libdbusmenu-qt/0.8.1/tmp/libdbusmenu-qt-0.8.1/src/dbusmenuexporterdbus_p.h"
00018 class QByteArray;
00019 template<class T> class QList;
00020 template<class Key, class Value> class QMap;
00021 class QString;
00022 class QStringList;
00023 class QVariant;
00024 
00025 /*
00026  * Adaptor class for interface com.canonical.dbusmenu
00027  */
00028 class DbusmenuAdaptor: public QDBusAbstractAdaptor
00029 {
00030     Q_OBJECT
00031     Q_CLASSINFO("D-Bus Interface", "com.canonical.dbusmenu")
00032     Q_CLASSINFO("D-Bus Introspection", ""
00033 "  <interface name=\"com.canonical.dbusmenu\">\n"
00034 "    <dox:d><![CDATA[\n"
00035 "       A DBus interface to expose menus on DBus.\n"
00036 "\n"
00037 "       Menu items are represented with a unique numeric id and a dictionary of\n"
00038 "       properties.\n"
00039 "\n"
00040 "       To reduce the amount of DBus traffic, a property should only be returned\n"
00041 "       if its value is not the default value.\n"
00042 "\n"
00043 "       Available properties are:\n"
00044 "\n"
00045 "       <table>\n"
00046 "       <tr>\n"
00047 "           <th>Name</th>\n"
00048 "           <th>Type</th>\n"
00049 "           <th>Description</th>\n"
00050 "           <th>Default Value</th>\n"
00051 "       </tr>\n"
00052 "       <tr>\n"
00053 "           <td>type</td>\n"
00054 "           <td>String</td>\n"
00055 "           <td>Can be one of:\n"
00056 "           - \"standard\": an item which can be clicked to trigger an action or\n"
00057 "             show another menu\n"
00058 "           - \"separator\": a separator\n"
00059 "\n"
00060 "           Vendor specific types can be added by prefixing them with\n"
00061 "           \"x-<vendor>-\".\n"
00062 "           </td>\n"
00063 "           <td>\"standard\"</td>\n"
00064 "       </tr>\n"
00065 "       <tr>\n"
00066 "           <td>label</td>\n"
00067 "           <td>string</td>\n"
00068 "           <td>Text of the item, except that:\n"
00069 "           -# two consecutive underscore characters \"__\" are displayed as a\n"
00070 "           single underscore,\n"
00071 "           -# any remaining underscore characters are not displayed at all,\n"
00072 "           -# the first of those remaining underscore characters (unless it is\n"
00073 "           the last character in the string) indicates that the following\n"
00074 "           character is the access key.\n"
00075 "           </td>\n"
00076 "           <td>\"\"</td>\n"
00077 "       </tr>\n"
00078 "       <tr>\n"
00079 "           <td>enabled</td>\n"
00080 "           <td>boolean</td>\n"
00081 "           <td>Whether the item can be activated or not.</td>\n"
00082 "           <td>true</td>\n"
00083 "       </tr>\n"
00084 "       <tr>\n"
00085 "           <td>visible</td>\n"
00086 "           <td>boolean</td>\n"
00087 "           <td>True if the item is visible in the menu.</td>\n"
00088 "           <td>true</td>\n"
00089 "       </tr>\n"
00090 "       <tr>\n"
00091 "           <td>icon-name</td>\n"
00092 "           <td>string</td>\n"
00093 "           <td>Icon name of the item, following the freedesktop.org icon spec.</td>\n"
00094 "           <td>\"\"</td>\n"
00095 "       </tr>\n"
00096 "       <tr>\n"
00097 "           <td>icon-data</td>\n"
00098 "           <td>binary</td>\n"
00099 "           <td>PNG data of the icon.</td>\n"
00100 "           <td>Empty</td>\n"
00101 "       </tr>\n"
00102 "       <tr>\n"
00103 "           <td>shortcut</td>\n"
00104 "           <td>array of arrays of strings</td>\n"
00105 "           <td>The shortcut of the item. Each array represents the key press\n"
00106 "           in the list of keypresses. Each list of strings contains a list of\n"
00107 "           modifiers and then the key that is used. The modifier strings\n"
00108 "           allowed are: \"Control\", \"Alt\", \"Shift\" and \"Super\".\n"
00109 "\n"
00110 "           - A simple shortcut like Ctrl+S is represented as:\n"
00111 "             [[\"Control\", \"S\"]]\n"
00112 "           - A complex shortcut like Ctrl+Q, Alt+X is represented as:\n"
00113 "             [[\"Control\", \"Q\"], [\"Alt\", \"X\"]]</td>\n"
00114 "           <td>Empty</td>\n"
00115 "       </tr>\n"
00116 "       <tr>\n"
00117 "           <td>toggle-type</td>\n"
00118 "           <td>string</td>\n"
00119 "           <td>\n"
00120 "           If the item can be toggled, this property should be set to:\n"
00121 "           - \"checkmark\": Item is an independent togglable item\n"
00122 "           - \"radio\": Item is part of a group where only one item can be\n"
00123 "             toggled at a time\n"
00124 "           - \"\": Item cannot be toggled\n"
00125 "           </td>\n"
00126 "           <td>\"\"</td>\n"
00127 "       </tr>\n"
00128 "       <tr>\n"
00129 "           <td>toggle-state</td>\n"
00130 "           <td>int</td>\n"
00131 "           <td>\n"
00132 "           Describe the current state of a \"togglable\" item. Can be one of:\n"
00133 "           - 0 = off\n"
00134 "           - 1 = on\n"
00135 "           - anything else = indeterminate\n"
00136 "\n"
00137 "           Note:\n"
00138 "           The implementation does not itself handle ensuring that only one\n"
00139 "           item in a radio group is set to \"on\", or that a group does not have\n"
00140 "           \"on\" and \"indeterminate\" items simultaneously; maintaining this\n"
00141 "           policy is up to the toolkit wrappers.\n"
00142 "           </td>\n"
00143 "           <td>-1</td>\n"
00144 "       </tr>\n"
00145 "       <tr>\n"
00146 "           <td>children-display</td>\n"
00147 "           <td>string</td>\n"
00148 "           <td>\n"
00149 "           If the menu item has children this property should be set to\n"
00150 "           \"submenu\".\n"
00151 "           </td>\n"
00152 "           <td>\"\"</td>\n"
00153 "       </tr>\n"
00154 "       </table>\n"
00155 "\n"
00156 "       Vendor specific properties can be added by prefixing them with\n"
00157 "       \"x-<vendor>-\".\n"
00158 "       ]]></dox:d>\n"
00159 "    <!-- Properties -->\n"
00160 "    <property access=\"read\" type=\"u\" name=\"Version\">\n"
00161 "      <dox:d>\n"
00162 "           Provides the version of the DBusmenu API that this API is\n"
00163 "           implementing.\n"
00164 "           </dox:d>\n"
00165 "    </property>\n"
00166 "    <!-- Functions -->\n"
00167 "    <method name=\"GetLayout\">\n"
00168 "      <annotation value=\"DBusMenuLayoutItem\" name=\"com.trolltech.QtDBus.QtTypeName.Out1\"/>\n"
00169 "      <dox:d>\n"
00170 "             Provides the layout and propertiers that are attached to the entries\n"
00171 "             that are in the layout.  It only gives the items that are children\n"
00172 "             of the item that is specified in @a parentId.  It will return all of the\n"
00173 "             properties or specific ones depending of the value in @a propertyNames.\n"
00174 "\n"
00175 "             The format is recursive, where the second 'v' is in the same format\n"
00176 "             as the original 'a(ia{sv}av)'.  Its content depends on the value\n"
00177 "             of @a recursionDepth.\n"
00178 "           </dox:d>\n"
00179 "      <arg direction=\"in\" type=\"i\" name=\"parentId\">\n"
00180 "        <dox:d>The ID of the parent node for the layout.  For\n"
00181 "               grabbing the layout from the root node use zero.</dox:d>\n"
00182 "      </arg>\n"
00183 "      <arg direction=\"in\" type=\"i\" name=\"recursionDepth\">\n"
00184 "        <dox:d>\n"
00185 "                 The amount of levels of recursion to use.  This affects the\n"
00186 "                 content of the second variant array.\n"
00187 "                 - -1: deliver all the items under the @a parentId.\n"
00188 "                 - 0: no recursion, the array will be empty.\n"
00189 "                 - n: array will contains items up to 'n' level depth.\n"
00190 "               </dox:d>\n"
00191 "      </arg>\n"
00192 "      <arg direction=\"in\" type=\"as\" name=\"propertyNames\">\n"
00193 "        <dox:d>\n"
00194 "                   The list of item properties we are\n"
00195 "                   interested in.  If there are no entries in the list all of\n"
00196 "                   the properties will be sent.\n"
00197 "               </dox:d>\n"
00198 "      </arg>\n"
00199 "      <arg direction=\"out\" type=\"u\" name=\"revision\">\n"
00200 "        <dox:d>The revision number of the layout.  For matching\n"
00201 "               with layoutUpdated signals.</dox:d>\n"
00202 "      </arg>\n"
00203 "      <arg direction=\"out\" type=\"(ia{sv}av)\" name=\"layout\">\n"
00204 "        <dox:d>The layout, as a recursive structure.</dox:d>\n"
00205 "      </arg>\n"
00206 "    </method>\n"
00207 "    <method name=\"GetGroupProperties\">\n"
00208 "      <annotation value=\"QList&lt;int>\" name=\"com.trolltech.QtDBus.QtTypeName.In0\"/>\n"
00209 "      <annotation value=\"DBusMenuItemList\" name=\"com.trolltech.QtDBus.QtTypeName.Out0\"/>\n"
00210 "      <dox:d>\n"
00211 "           Returns the list of items which are children of @a parentId.\n"
00212 "           </dox:d>\n"
00213 "      <arg direction=\"in\" type=\"ai\" name=\"ids\">\n"
00214 "        <dox:d>\n"
00215 "                   A list of ids that we should be finding the properties\n"
00216 "                   on.  If the list is empty, all menu items should be sent.\n"
00217 "               </dox:d>\n"
00218 "      </arg>\n"
00219 "      <arg direction=\"in\" type=\"as\" name=\"propertyNames\">\n"
00220 "        <dox:d>\n"
00221 "                   The list of item properties we are\n"
00222 "                   interested in.  If there are no entries in the list all of\n"
00223 "                   the properties will be sent.\n"
00224 "               </dox:d>\n"
00225 "      </arg>\n"
00226 "      <arg direction=\"out\" type=\"a(ia{sv})\" name=\"properties\">\n"
00227 "        <dox:d>\n"
00228 "                   An array of property values.\n"
00229 "                   An item in this area is represented as a struct following\n"
00230 "                   this format:\n"
00231 "                   @li id unsigned the item id\n"
00232 "                   @li properties map(string => variant) the requested item properties\n"
00233 "               </dox:d>\n"
00234 "      </arg>\n"
00235 "    </method>\n"
00236 "    <method name=\"GetProperty\">\n"
00237 "      <dox:d>\n"
00238 "             Get a signal property on a single item.  This is not useful if you're\n"
00239 "             going to implement this interface, it should only be used if you're\n"
00240 "             debugging via a commandline tool.\n"
00241 "           </dox:d>\n"
00242 "      <arg direction=\"in\" type=\"i\" name=\"id\">\n"
00243 "        <dox:d>the id of the item which received the event</dox:d>\n"
00244 "      </arg>\n"
00245 "      <arg direction=\"in\" type=\"s\" name=\"name\">\n"
00246 "        <dox:d>the name of the property to get</dox:d>\n"
00247 "      </arg>\n"
00248 "      <arg direction=\"out\" type=\"v\" name=\"value\">\n"
00249 "        <dox:d>the value of the property</dox:d>\n"
00250 "      </arg>\n"
00251 "    </method>\n"
00252 "    <method name=\"Event\">\n"
00253 "      <dox:d><![CDATA[\n"
00254 "           This is called by the applet to notify the application an event happened on a\n"
00255 "           menu item.\n"
00256 "\n"
00257 "           @a type can be one of the following:\n"
00258 "\n"
00259 "           @li \"clicked\"\n"
00260 "           @li \"hovered\"\n"
00261 "\n"
00262 "           Vendor specific events can be added by prefixing them with \"x-<vendor>-\"\n"
00263 "           ]]></dox:d>\n"
00264 "      <arg direction=\"in\" type=\"i\" name=\"id\">\n"
00265 "        <dox:d>the id of the item which received the event</dox:d>\n"
00266 "      </arg>\n"
00267 "      <arg direction=\"in\" type=\"s\" name=\"eventId\">\n"
00268 "        <dox:d>the type of event</dox:d>\n"
00269 "      </arg>\n"
00270 "      <arg direction=\"in\" type=\"v\" name=\"data\">\n"
00271 "        <dox:d>event-specific data</dox:d>\n"
00272 "      </arg>\n"
00273 "      <arg direction=\"in\" type=\"u\" name=\"timestamp\">\n"
00274 "        <dox:d>The time that the event occured if available or the time the message was sent if not</dox:d>\n"
00275 "      </arg>\n"
00276 "    </method>\n"
00277 "    <method name=\"AboutToShow\">\n"
00278 "      <dox:d>\n"
00279 "           This is called by the applet to notify the application that it is about\n"
00280 "           to show the menu under the specified item.\n"
00281 "           </dox:d>\n"
00282 "      <arg direction=\"in\" type=\"i\" name=\"id\">\n"
00283 "        <dox:d>\n"
00284 "               Which menu item represents the parent of the item about to be shown.\n"
00285 "               </dox:d>\n"
00286 "      </arg>\n"
00287 "      <arg direction=\"out\" type=\"b\" name=\"needUpdate\">\n"
00288 "        <dox:d>\n"
00289 "               Whether this AboutToShow event should result in the menu being updated.\n"
00290 "               </dox:d>\n"
00291 "      </arg>\n"
00292 "    </method>\n"
00293 "    <!-- Signals -->\n"
00294 "    <signal name=\"ItemsPropertiesUpdated\">\n"
00295 "      <annotation value=\"DBusMenuItemList\" name=\"com.trolltech.QtDBus.QtTypeName.In0\"/>\n"
00296 "      <annotation value=\"DBusMenuItemKeysList\" name=\"com.trolltech.QtDBus.QtTypeName.In1\"/>\n"
00297 "      <dox:d>\n"
00298 "           Triggered when there are lots of property updates across many items\n"
00299 "           so they all get grouped into a single dbus message.  The format is\n"
00300 "           the ID of the item with a hashtable of names and values for those\n"
00301 "           properties.\n"
00302 "           </dox:d>\n"
00303 "      <arg direction=\"out\" type=\"a(ia{sv})\" name=\"updatedProps\"/>\n"
00304 "      <arg direction=\"out\" type=\"a(ias)\" name=\"removedProps\"/>\n"
00305 "    </signal>\n"
00306 "    <signal name=\"LayoutUpdated\">\n"
00307 "      <dox:d>\n"
00308 "           Triggered by the application to notify display of a layout update, up to\n"
00309 "           revision\n"
00310 "           </dox:d>\n"
00311 "      <arg direction=\"out\" type=\"u\" name=\"revision\">\n"
00312 "        <dox:d>The revision of the layout that we're currently on</dox:d>\n"
00313 "      </arg>\n"
00314 "      <arg direction=\"out\" type=\"i\" name=\"parent\">\n"
00315 "        <dox:d>\n"
00316 "               If the layout update is only of a subtree, this is the\n"
00317 "               parent item for the entries that have changed.  It is zero if\n"
00318 "               the whole layout should be considered invalid.\n"
00319 "               </dox:d>\n"
00320 "      </arg>\n"
00321 "    </signal>\n"
00322 "    <signal name=\"ItemActivationRequested\">\n"
00323 "      <dox:d>\n"
00324 "             The server is requesting that all clients displaying this\n"
00325 "             menu open it to the user.  This would be for things like\n"
00326 "             hotkeys that when the user presses them the menu should\n"
00327 "             open and display itself to the user.\n"
00328 "           </dox:d>\n"
00329 "      <arg direction=\"out\" type=\"i\" name=\"id\">\n"
00330 "        <dox:d>ID of the menu that should be activated</dox:d>\n"
00331 "      </arg>\n"
00332 "      <arg direction=\"out\" type=\"u\" name=\"timestamp\">\n"
00333 "        <dox:d>The time that the event occured</dox:d>\n"
00334 "      </arg>\n"
00335 "    </signal>\n"
00336 "    <!-- End of interesting stuff -->\n"
00337 "  </interface>\n"
00338         "")
00339 public:
00340     DbusmenuAdaptor(DBusMenuExporterDBus *parent);
00341     virtual ~DbusmenuAdaptor();
00342 
00343     inline DBusMenuExporterDBus *parent() const
00344     { return static_cast<DBusMenuExporterDBus *>(QObject::parent()); }
00345 
00346 public: // PROPERTIES
00347     Q_PROPERTY(uint Version READ version)
00348     uint version() const;
00349 
00350 public Q_SLOTS: // METHODS
00351     bool AboutToShow(int id);
00352     void Event(int id, const QString &eventId, const QDBusVariant &data, uint timestamp);
00353     DBusMenuItemList GetGroupProperties(const QList<int> &ids, const QStringList &propertyNames);
00354     uint GetLayout(int parentId, int recursionDepth, const QStringList &propertyNames, DBusMenuLayoutItem &layout);
00355     QDBusVariant GetProperty(int id, const QString &name);
00356 Q_SIGNALS: // SIGNALS
00357     void ItemActivationRequested(int id, uint timestamp);
00358     void ItemsPropertiesUpdated(DBusMenuItemList updatedProps, DBusMenuItemKeysList removedProps);
00359     void LayoutUpdated(uint revision, int parent);
00360 };
00361 
00362 #endif
 All Classes Functions