/usr/include/libgdamm-5.0/libgdamm/serveroperation.h is in libgdamm5.0-dev 4.99.6-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 | // -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGDAMM_SERVEROPERATION_H
#define _LIBGDAMM_SERVEROPERATION_H
#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>
/* $Id: serveroperation.hg,v 1.2 2006/11/08 00:52:25 murrayc Exp $ */
// -*- C++ -*- //
/* serveroperation.h
*
* Copyright 2001 Free Software Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgdamm/value.h>
#include <glibmm/object.h>
#include <glibmm/error.h>
#include <libgda/gda-server-provider.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GdaServerOperation GdaServerOperation;
typedef struct _GdaServerOperationClass GdaServerOperationClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Gda
{ class ServerOperation_Class; } // namespace Gda
} // namespace Gnome
namespace Gnome
{
namespace Gda
{
class Connection;
class ServerProvider;
//_WRAP_ENUM(ClientSpecsType, GdaClientSpecsType)
/** @addtogroup libgdammEnums libgdamm Enums and Flags */
/**
* @ingroup libgdammEnums
*/
enum ServerOperationNodeType
{
SERVER_OPERATION_NODE_PARAMLIST,
SERVER_OPERATION_NODE_DATA_MODEL,
SERVER_OPERATION_NODE_PARAM,
SERVER_OPERATION_NODE_SEQUENCE,
SERVER_OPERATION_NODE_SEQUENCE_ITEM,
SERVER_OPERATION_NODE_DATA_MODEL_COLUMN,
SERVER_OPERATION_NODE_UNKNOWN
};
} // namespace Gda
} // namespace Gnome
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{
template <>
class Value<Gnome::Gda::ServerOperationNodeType> : public Glib::Value_Enum<Gnome::Gda::ServerOperationNodeType>
{
public:
static GType value_type() G_GNUC_CONST;
};
} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Gda
{
/**
* @ingroup libgdammEnums
*/
enum ServerOperationNodeStatus
{
SERVER_OPERATION_STATUS_OPTIONAL,
SERVER_OPERATION_STATUS_REQUIRED,
SERVER_OPERATION_STATUS_UNKNOWN
};
} // namespace Gda
} // namespace Gnome
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{
template <>
class Value<Gnome::Gda::ServerOperationNodeStatus> : public Glib::Value_Enum<Gnome::Gda::ServerOperationNodeStatus>
{
public:
static GType value_type() G_GNUC_CONST;
};
} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Gda
{
/**
* @ingroup libgdammEnums
*/
enum ServerOperationType
{
SERVER_OPERATION_CREATE_DB,
SERVER_OPERATION_DROP_DB,
SERVER_OPERATION_CREATE_TABLE,
SERVER_OPERATION_DROP_TABLE,
SERVER_OPERATION_RENAME_TABLE,
SERVER_OPERATION_ADD_COLUMN,
SERVER_OPERATION_DROP_COLUMN,
SERVER_OPERATION_CREATE_INDEX,
SERVER_OPERATION_DROP_INDEX,
SERVER_OPERATION_CREATE_VIEW,
SERVER_OPERATION_DROP_VIEW,
SERVER_OPERATION_COMMENT_TABLE,
SERVER_OPERATION_COMMENT_COLUMN,
SERVER_OPERATION_CREATE_USER,
SERVER_OPERATION_ALTER_USER,
SERVER_OPERATION_DROP_USER,
SERVER_OPERATION_LAST
};
} // namespace Gda
} // namespace Gnome
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{
template <>
class Value<Gnome::Gda::ServerOperationType> : public Glib::Value_Enum<Gnome::Gda::ServerOperationType>
{
public:
static GType value_type() G_GNUC_CONST;
};
} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Gda
{
typedef GdaServerOperationNode ServerOperationNode;
/** @defgroup DDL Data definition (DDL) queries
*/
/** Handles any DDL query in an abstract way.
*
* Basically this object is just a named data store: it can store named values,
* the values being organized hirarchically. A value can be read from its path
* (similar to a Unix file path) using the get_value_at() method.
*
* @ingroup DDL
*/
class ServerOperation : public Glib::Object
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
public:
typedef ServerOperation CppObjectType;
typedef ServerOperation_Class CppClassType;
typedef GdaServerOperation BaseObjectType;
typedef GdaServerOperationClass BaseClassType;
private: friend class ServerOperation_Class;
static CppClassType serveroperation_class_;
private:
// noncopyable
ServerOperation(const ServerOperation&);
ServerOperation& operator=(const ServerOperation&);
protected:
explicit ServerOperation(const Glib::ConstructParams& construct_params);
explicit ServerOperation(GdaServerOperation* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
virtual ~ServerOperation();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GObject.
GdaServerOperation* gobj() { return reinterpret_cast<GdaServerOperation*>(gobject_); }
///Provides access to the underlying C GObject.
const GdaServerOperation* gobj() const { return reinterpret_cast<GdaServerOperation*>(gobject_); }
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
GdaServerOperation* gobj_copy();
private:
public:
// These are from gda-easy but they fit in here best
static Glib::RefPtr<ServerOperation> prepare_create_database(const Glib::ustring& provider,
const Glib::ustring& db_name);
static Glib::RefPtr<ServerOperation> prepare_drop_database(const Glib::ustring& provider,
const Glib::ustring& db_name);
bool perform_drop_database(const Glib::ustring& provider);
bool perform_create_database(const Glib::ustring& provider);
// The C version of these take varargs for some reason.
/** Get the value for the node at the path formed using @a path_format and ... (the rules are the same as
* for Glib::strdup_printf())
* @param path_format A complete path to a node (starting with "/").
* @param Varargs Arguments to use with @a path_format to make a complete path.
* @return A constant Value if a value has been defined, or <tt>0</tt> if the value is undefined or
* if the @a path is not defined or @a path does not hold any value.
*/
Value get_value_at(const Glib::ustring& path_format) const;
template <class ValueType>
void set_value_at(const Glib::ustring& path_format, const ValueType& value);
void set_value_at_as_value(const Glib::ustring& path_format, const Glib::ValueBase& value);
//TODO: See http://bugzilla.gnome.org/show_bug.cgi?id=574742
/** Convenience function to get the type of a node.
* @param path A complete path to a node (starting with "/").
* @param status A place to store the status of the node, or <tt>0</tt>.
* @return The type of node, or GDA_SERVER_OPERATION_NODE_UNKNOWN if the node was not found.
*/
ServerOperationNodeType get_node_type(const Glib::ustring& path, ServerOperationNodeStatus& status) const;
/**
* @param path A complete path to a sequence node (starting with "/").
* @return The number of items in the sequence at @a path, or 0 if @a path is not a sequence node.
*/
guint get_sequence_size(const Glib::ustring& path) const;
/**
* @param path A complete path to a sequence node (starting with "/").
* @return The maximum number of items in the sequence at @a path, or 0 if @a path is not a sequence node.
*/
guint get_sequence_max_size(const Glib::ustring& path) const;
/**
* @param path A complete path to a sequence node (starting with "/").
* @return The minimum number of items in the sequence at @a path, or 0 if @a path is not a sequence node.
*/
guint get_sequence_min_size(const Glib::ustring& path) const;
/** Fetch the contents of a sequence. @a path can describe either a sequence (for example "/SEQNAME") or an item in a sequence
* (for example "/SEQNAME/3")
* @param path A complete path to a sequence node (starting with "/").
* @return A array of strings containing the complete paths of the nodes contained at @a path (free with Glib::strfreev()).
*/
std::vector<Glib::ustring> get_sequence_item_names(const Glib::ustring& path) const;
/**
* @param path A complete path to a sequence node (starting with "/").
* @return The name of the sequence at @a path.
*/
Glib::ustring get_sequence_name(const std::string& path) const;
//TODO: Is this XML stuff really public API? murrayc.
//TODO: get_node_info => varargs
/** Tells if all the required values in @a op have been defined.
*
* if @a xml_file is not <tt>0</tt>, the validity of @a op is tested against that specification,
* and not against the current @a op's specification.
* @param xml_file An XML specification file (see new()).
* @return <tt>true</tt> if @a op is valid.
*/
bool is_valid(const std::string& xml_file) const;
/** Loads the contents of @a node into @a op. The XML tree passed through the @a node
* argument must correspond to an XML tree saved using save_data_to_xml().
* @param node A #xmlNodePtr.
* @return <tt>true</tt> if no error occurred.
*/
bool load_data_from_xml(xmlNodePtr node);
xmlNodePtr save_data_to_xml();
/** Get the last part of @a path
* @param path A complete path to a node (starting with "/").
* @return A new string, or <tt>0</tt> if an error occurred.
*/
Glib::ustring get_node_path_portion(const Glib::ustring& path) const;
/** Get the complete path to the parent of the node defined by @a path
* @param path A complete path to a node (starting with "/").
* @return A new string or <tt>0</tt> if the node does not have any parent or does not exist.
*/
Glib::ustring get_node_parent(const Glib::ustring& path) const;
/** Get the type of operation @a op is for
* @return A Gda::ServerOperationType enum.
*/
ServerOperationType get_op_type() const;
/**
* @param item_path The path to the sequence's item to remove (like "/SEQ_NAME/5" for instance).
* @return <tt>true</tt> if the specified node has been removed from the sequence.
*/
bool del_item_from_sequence(const std::string& item_path);
/**
* @param seq_path The path to the sequence to which an item must be added (like "/SEQ_NAME" for instance).
* @return The index of the new entry in the sequence (like 5 for example if a 6th item has
* been added to the sequence.
*/
guint add_item_to_sequence(const std::string& item_path);
/** Get an array of strings containing the paths of nodes situated at the root of @a op.
* @return A new array, which must be freed with Glib::strfreev().
*/
std::vector<Glib::ustring> get_root_nodes() const;
/**
* @par Prototype:
* <tt>void on_my_%signal_sequence_item_added(Glib::ustring arg1, int arg2)</tt>
*/
Glib::SignalProxy2< void,Glib::ustring,int > signal_signal_sequence_item_added();
/**
* @par Prototype:
* <tt>void on_my_%signal_sequence_item_remove(Glib::ustring arg1, int arg2)</tt>
*/
Glib::SignalProxy2< void,Glib::ustring,int > signal_signal_sequence_item_remove();
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Connection to use.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Connection> > property_connection() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Type of operation to be done.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<gint> property_op_type() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
//TODO: vfuncs.
public:
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
};
#ifndef DOXYGEN_SHOULD_SKIP_THIS
template <class ValueType> inline
void ServerOperation::set_value_at(const Glib::ustring& path_format, const ValueType& value)
{
Gnome::Gda::Value gdavalue(value);
this->set_value_at_as_value(path_format.c_str(), gdavalue);
}
#endif //DOXYGEN_SHOULD_SKIP_THIS
} // namespace Gda
} // namespace Gnome
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates Gnome::Gda::ServerOperation
*/
Glib::RefPtr<Gnome::Gda::ServerOperation> wrap(GdaServerOperation* object, bool take_copy = false);
}
#endif /* _LIBGDAMM_SERVEROPERATION_H */
|