caflib_LTLIBRARIES += libCommAmqpIntegration.la
libCommAmqpIntegration_la_SOURCES=
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQChannel.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQChannelManager.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQCommand.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQConnection.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQUtil.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/Address.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpAuthPlain.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpChannel.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpCommon.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpConnection.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpUtil.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/BlockingRpcContinuation.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpAuthMechanism.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpChannel.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpConnection.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpFrame.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CertInfo.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CommandAssembler.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConnectionFactoryImpl.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConnectionWeakReference.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConsumerDispatcher.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConsumerWorkService.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpClient.cpp
libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AMQExceptions.cpp
+libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AMQPImpl.cpp
libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AmqpClientImpl.cpp
libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AmqpContentHeadersImpl.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AMQPImpl.cpp
libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.cpp
libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.cpp
libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.cpp
libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.cpp
libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.cpp
libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/Address.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQChannel.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQChannelManager.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQCommand.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQConnection.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpAuthPlain.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpChannel.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpClient.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpCommon.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpConnection.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpUtil.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQUtil.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/BlockingRpcContinuation.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpAuthMechanism.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpChannel.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpConnection.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpFrame.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CertInfo.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CommandAssembler.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConnectionFactoryImpl.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConnectionWeakReference.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConsumerDispatcher.cpp
-libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConsumerWorkService.cpp
libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AbstractConnectionFactory.cpp
libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AmqpHeaderMapper.cpp
libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AmqpIntegrationExceptions.cpp
libCommAmqpIntegration_la_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@
libCommAmqpIntegration_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-libCommAmqpIntegration_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
+libCommAmqpIntegration_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpListener/include
+libCommAmqpIntegration_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpCore/include
libCommAmqpIntegration_la_LIBADD =
libCommAmqpIntegration_la_LIBADD += @GLIB2_LIBS@
libCommAmqpIntegration_la_LIBADD += @LOG4CPP_LIBS@
libCommAmqpIntegrationSubsys_la_SOURCES=
libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.cpp
-libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/amqpIntegration.cpp
libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.cpp
libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/BindingInstance.cpp
libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.cpp
libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/RabbitAdminInstance.cpp
libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/RabbitTemplateInstance.cpp
libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.cpp
+libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/amqpIntegration.cpp
libCommAmqpIntegrationSubsys_la_CPPFLAGS =
libCommAmqpIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@
libCommAmqpIntegrationSubsys_la_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@
libCommAmqpIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-libCommAmqpIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
+libCommAmqpIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpListener/include
+libCommAmqpIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpCore/include
libCommAmqpIntegrationSubsys_la_LIBADD =
libCommAmqpIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@
libCommAmqpIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@
cafbin_PROGRAMS += CommAmqpListener
CommAmqpListener_SOURCES=
-CommAmqpListener_SOURCES += amqpListener/src/amqpListenerMain.cpp
CommAmqpListener_SOURCES += amqpListener/src/AmqpListenerWorker.cpp
+CommAmqpListener_SOURCES += amqpListener/src/amqpListenerMain.cpp
CommAmqpListener_CPPFLAGS =
CommAmqpListener_CPPFLAGS += @GLIB2_CPPFLAGS@
CommAmqpListener_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@
CommAmqpListener_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-CommAmqpListener_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
+CommAmqpListener_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpListener/include
+CommAmqpListener_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpCore/include
CommAmqpListener_LDADD =
CommAmqpListener_LDADD += @GLIB2_LIBS@
CommAmqpListener_LDADD += @LOG4CPP_LIBS@
libCommIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@
libCommIntegrationSubsys_la_SOURCES=
-libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageAttachments.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessage.cpp
+libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageAttachments.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageTransformer.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageTransformerInstance.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageUtils.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CIncomingMessageHandler.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessageDeliveryRecord.cpp
-libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartDescriptor.cpp
+libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartRecord.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartsBuilder.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartsHeader.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartsParser.cpp
-libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/commIntegration.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/COutgoingMessageHandler.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CProtocolHeaderEnricher.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CReplyToCacher.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CReplyToCacherInstance.cpp
libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CReplyToResolverInstance.cpp
+libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/commIntegration.cpp
libCommIntegrationSubsys_la_CPPFLAGS =
libCommIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@
libCommIntegrationSubsys_la_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@
libCommIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-libCommIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
+libCommIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpListener/include
+libCommIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpCore/include
+libCommIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/Subsystems/commIntegration/include
libCommIntegrationSubsys_la_LIBADD =
libCommIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@
libCommIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@
+++ /dev/null
-# Doxyfile 1.7.5.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or sequence of words) that should
-# identify the project. Note that if you do not use Doxywizard you need
-# to put quotes around the project name if it contains spaces.
-
-PROJECT_NAME = "CAF AMQP Integration Library"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = 1.0
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer
-# a quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF = "INTERNAL LIBRARY DEVELOPMENT DOCUMENTATION"
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is
-# included in the documentation. The maximum height of the logo should not
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
-
-PROJECT_LOGO =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 3
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-# unions with only public data fields will be shown inline in the documentation
-# of the scope in which they are defined (i.e. file, namespace, or group
-# documentation), provided this scope is documented. If set to NO (the default),
-# structs, classes, and unions are shown on a separate page (for HTML and Man
-# pages) or section (for LaTeX and RTF).
-
-INLINE_SIMPLE_STRUCTS = NO
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = NO
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = YES
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = YES
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
-
-STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST = YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE = DoxygenLayout.xml
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files
-# containing the references data. This must be a list of .bib files. The
-# .bib extension is automatically appended if omitted. Using this command
-# requires the bibtex tool to be installed. See also
-# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
-# of the bibliography can be controlled using LATEX_BIB_STYLE.
-
-CITE_BIB_FILES =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = NO
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = ../amqpClient/api ../amqpIntegrationCore .
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
-
-FILE_PATTERNS =
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-# Note that relative paths are relative to directory from which doxygen is run.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
-
-FILTER_SOURCE_PATTERNS =
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 2
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-# for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is adviced to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that
-# the files will be copied as-is; there are no commands or markers available.
-
-HTML_EXTRA_FILES =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = NO
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the
-# mathjax.org site, so you can quickly see the result without installing
-# MathJax, but it is strongly recommended to install a local copy of MathJax
-# before deployment.
-
-MATHJAX_RELPATH = http://www.mathjax.org/mathjax
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
-# names that should be enabled during MathJax rendering.
-
-MATHJAX_EXTENSIONS =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvantages are that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# the last chapter. If it is left blank doxygen will generate a
-# standard footer. Notice: only use this tag if you know what you are doing!
-
-LATEX_FOOTER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
-# http://en.wikipedia.org/wiki/BibTeX for more info.
-
-LATEX_BIB_STYLE = plain
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = YES
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = YES
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED = __declspec(x)= AMQPCLIENT_LINKAGE= AMQPINTEGRATIONSUPPORT_LINKAGE=
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition that
-# overrules the definition found in the source code.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these will confuse the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will use the Helvetica font for all dot files that
-# doxygen generates. When you want a differently looking font you can specify
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find
-# the font, which can be done by putting it in a standard location or by setting
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
-# directory containing the font.
-
-DOT_FONTNAME = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the Helvetica font.
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
-# set the path where dot can find it.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are svg, png, jpg, or gif.
-# If left blank png will be used. If you choose svg you need to set
-# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible in IE 9+ (other browsers do not have this requirement).
-
-DOT_IMAGE_FORMAT = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-# Note that this requires a modern browser other than Internet Explorer.
-# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
-# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible. Older versions of IE do not have SVG support.
-
-INTERACTIVE_SVG = NO
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
-MSCFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
+++ /dev/null
-<doxygenlayout version="1.0">
- <!-- Navigation index tabs for HTML output -->
- <navindex>
- <tab type="mainpage" visible="yes" title=""/>
- <tab type="modules" visible="yes" title="" intro=""/>
- <tab type="namespaces" visible="yes" title="">
- <tab type="namespaces" visible="yes" title="" intro=""/>
- <tab type="namespacemembers" visible="yes" title="" intro=""/>
- </tab>
- <tab type="classes" visible="yes" title="">
- <tab type="classes" visible="yes" title="" intro=""/>
- <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
- <tab type="hierarchy" visible="yes" title="" intro=""/>
- <tab type="classmembers" visible="yes" title="" intro=""/>
- </tab>
- <tab type="pages" visible="yes" title="" intro=""/>
- <tab type="files" visible="yes" title="">
- <tab type="files" visible="yes" title="" intro=""/>
- <tab type="globals" visible="yes" title="" intro=""/>
- </tab>
- <tab type="dirs" visible="yes" title="" intro=""/>
- <tab type="examples" visible="yes" title="" intro=""/>
- </navindex>
-
- <!-- Layout definition for a class page -->
- <class>
- <briefdescription visible="yes"/>
- <includes visible="$SHOW_INCLUDE_FILES"/>
- <inheritancegraph visible="$CLASS_GRAPH"/>
- <collaborationgraph visible="$COLLABORATION_GRAPH"/>
- <detaileddescription title=""/>
- <allmemberslink visible="yes"/>
- <memberdecl>
- <nestedclasses visible="yes" title=""/>
- <publictypes title=""/>
- <publicslots title=""/>
- <signals title=""/>
- <publicmethods title=""/>
- <publicstaticmethods title=""/>
- <publicattributes title=""/>
- <publicstaticattributes title=""/>
- <protectedtypes title=""/>
- <protectedslots title=""/>
- <protectedmethods title=""/>
- <protectedstaticmethods title=""/>
- <protectedattributes title=""/>
- <protectedstaticattributes title=""/>
- <packagetypes title=""/>
- <packagemethods title=""/>
- <packagestaticmethods title=""/>
- <packageattributes title=""/>
- <packagestaticattributes title=""/>
- <properties title=""/>
- <events title=""/>
- <privatetypes title=""/>
- <privateslots title=""/>
- <privatemethods title=""/>
- <privatestaticmethods title=""/>
- <privateattributes title=""/>
- <privatestaticattributes title=""/>
- <friends title=""/>
- <related title="" subtitle=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <memberdef>
- <inlineclasses title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <constructors title=""/>
- <functions title=""/>
- <related title=""/>
- <variables title=""/>
- <properties title=""/>
- <events title=""/>
- </memberdef>
- <usedfiles visible="$SHOW_USED_FILES"/>
- <authorsection visible="yes"/>
- </class>
-
- <!-- Layout definition for a namespace page -->
- <namespace>
- <briefdescription visible="yes"/>
- <memberdecl>
- <nestednamespaces visible="yes" title=""/>
- <classes visible="yes" title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <inlineclasses title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- </memberdef>
- <authorsection visible="yes"/>
- </namespace>
-
- <!-- Layout definition for a file page -->
- <file>
- <briefdescription visible="yes"/>
- <includes visible="$SHOW_INCLUDE_FILES"/>
- <includegraph visible="$INCLUDE_GRAPH"/>
- <includedbygraph visible="$INCLUDED_BY_GRAPH"/>
- <sourcelink visible="yes"/>
- <memberdecl>
- <classes visible="yes" title=""/>
- <namespaces visible="yes" title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <inlineclasses title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- </memberdef>
- <authorsection/>
- </file>
-
- <!-- Layout definition for a group page -->
- <group>
- <briefdescription visible="yes"/>
- <detaileddescription title=""/>
- <groupgraph visible="$GROUP_GRAPHS"/>
- <memberdecl>
- <classes visible="yes" title=""/>
- <namespaces visible="yes" title=""/>
- <dirs visible="yes" title=""/>
- <nestedgroups visible="yes" title=""/>
- <files visible="yes" title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <enumvalues title=""/>
- <functions title=""/>
- <variables title=""/>
- <signals title=""/>
- <publicslots title=""/>
- <protectedslots title=""/>
- <privateslots title=""/>
- <events title=""/>
- <properties title=""/>
- <friends title=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <memberdef>
- <pagedocs/>
- <inlineclasses title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <enumvalues title=""/>
- <functions title=""/>
- <variables title=""/>
- <signals title=""/>
- <publicslots title=""/>
- <protectedslots title=""/>
- <privateslots title=""/>
- <events title=""/>
- <properties title=""/>
- <friends title=""/>
- </memberdef>
- <authorsection visible="yes"/>
- </group>
-
- <!-- Layout definition for a directory page -->
- <directory>
- <briefdescription visible="yes"/>
- <directorygraph visible="yes"/>
- <memberdecl>
- <dirs visible="yes"/>
- <files visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- </directory>
-</doxygenlayout>
+++ /dev/null
-#!/bin/sh
-set -e
-if [ "" = "$CAF_WEB_SERVER" ]; then
- CAFWEBSVR=10.25.57.32
- echo 'Using default CAFWEBSVR address'
-fi
-echo 'CAFWEBSVR='${CAFWEBSVR}
-doxygen Doxyfile
-ssh autodb@$CAFWEBSVR mkdir -p caf-downloads/doxy/communication/amqpIntegration
-ssh autodb@$CAFWEBSVR rm -rf caf-downloads/doxy/communication/amqpIntegration/*
-scp -r html/* autodb@$CAFWEBSVR:caf-downloads/doxy/communication/amqpIntegration
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCmsMessage_h_
-#define CCmsMessage_h_
-
-#include <openssl/ssl.h>
-
-namespace Caf {
-
-class CCmsMessage {
-public:
- CCmsMessage();
- virtual ~CCmsMessage();
-
-public:
- void initialize(
- const std::string& appId,
- const std::string& pmeId);
-
-public:
- void signBufferToBuffer(
- const SmartPtrCDynamicByteArray& inputBuffer,
- SmartPtrCDynamicByteArray& outputBuffer) const;
-
- void verifyBufferToBuffer(
- const SmartPtrCDynamicByteArray& inputBuffer,
- SmartPtrCDynamicByteArray& outputBuffer) const;
-
- void encryptBufferToBuffer(
- const SmartPtrCDynamicByteArray& inputBuffer,
- SmartPtrCDynamicByteArray& outputBuffer) const;
-
- void decryptBufferToBuffer(
- const SmartPtrCDynamicByteArray& inputBuffer,
- SmartPtrCDynamicByteArray& outputBuffer) const;
-
- void compressBufferToBuffer(
- const SmartPtrCDynamicByteArray& inputBuffer,
- SmartPtrCDynamicByteArray& outputBuffer) const;
-
- void uncompressBufferToBuffer(
- const SmartPtrCDynamicByteArray& inputBuffer,
- SmartPtrCDynamicByteArray& outputBuffer) const;
-
-public:
- void signBufferToFile(
- const SmartPtrCDynamicByteArray& inputBuffer,
- const std::string& outputPath) const;
-
- void verifyBufferToFile(
- const SmartPtrCDynamicByteArray& inputBuffer,
- const std::string& outputPath) const;
-
- void encryptBufferToFile(
- const SmartPtrCDynamicByteArray& inputBuffer,
- const std::string& outputPath) const;
-
- void decryptBufferToFile(
- const SmartPtrCDynamicByteArray& inputBuffer,
- const std::string& outputPath) const;
-
- void compressBufferToFile(
- const SmartPtrCDynamicByteArray& inputBuffer,
- const std::string& outputPath) const;
-
- void uncompressBufferToFile(
- const SmartPtrCDynamicByteArray& inputBuffer,
- const std::string& outputPath) const;
-
-public:
- void signFileToBuffer(
- const std::string& inputPath,
- SmartPtrCDynamicByteArray& outputBuffer) const;
-
- void verifyFileToBuffer(
- const std::string& inputPath,
- SmartPtrCDynamicByteArray& outputBuffer) const;
-
- void encryptFileToBuffer(
- const std::string& inputPath,
- SmartPtrCDynamicByteArray& outputBuffer) const;
-
- void decryptFileToBuffer(
- const std::string& inputPath,
- SmartPtrCDynamicByteArray& outputBuffer) const;
-
- void compressFileToBuffer(
- const std::string& inputPath,
- SmartPtrCDynamicByteArray& outputBuffer) const;
-
- void uncompressFileToBuffer(
- const std::string& inputPath,
- SmartPtrCDynamicByteArray& outputBuffer) const;
-
-public:
- void signFileToFile(
- const std::string& inputPath,
- const std::string& outputPath) const;
-
- void verifyFileToFile(
- const std::string& inputPath,
- const std::string& outputPath) const;
-
- void encryptFileToFile(
- const std::string& inputPath,
- const std::string& outputPath) const;
-
- void decryptFileToFile(
- const std::string& inputPath,
- const std::string& outputPath) const;
-
- void compressFileToFile(
- const std::string& inputPath,
- const std::string& outputPath) const;
-
- void uncompressFileToFile(
- const std::string& inputPath,
- const std::string& outputPath) const;
-
-private:
- void sign(
- const SmartPtrCDynamicByteArray& inputBuffer,
- const std::string& inputPath,
- SmartPtrCDynamicByteArray& outputBuffer,
- const std::string& outputPath) const;
-
- void verify(
- const SmartPtrCDynamicByteArray& inputBuffer,
- const std::string& inputPath,
- SmartPtrCDynamicByteArray& outputBuffer,
- const std::string& outputPath) const;
-
- void encrypt(
- const SmartPtrCDynamicByteArray& inputBuffer,
- const std::string& inputPath,
- SmartPtrCDynamicByteArray& outputBuffer,
- const std::string& outputPath) const;
-
- void decrypt(
- const SmartPtrCDynamicByteArray& inputBuffer,
- const std::string& inputPath,
- SmartPtrCDynamicByteArray& outputBuffer,
- const std::string& outputPath) const;
-
- void compress(
- const SmartPtrCDynamicByteArray& inputBuffer,
- const std::string& inputPath,
- SmartPtrCDynamicByteArray& outputBuffer,
- const std::string& outputPath) const;
-
- void uncompress(
- const SmartPtrCDynamicByteArray& inputBuffer,
- const std::string& inputPath,
- SmartPtrCDynamicByteArray& outputBuffer,
- const std::string& outputPath) const;
-
-private:
- void checkCrlf(
- const std::string& funcName,
- const std::string& direction,
- const SmartPtrCDynamicByteArray& buffer,
- const std::string& path) const;
-
- void checkCrlf(
- const std::string& funcName,
- const std::string& direction,
- const SmartPtrCDynamicByteArray& buffer) const;
-
- void checkCrlf(
- const std::string& funcName,
- const std::string& direction,
- const std::string& path) const;
-
-private:
- std::string getReqDirPath(
- const std::string& directory,
- const std::string& subdir,
- const std::string& subdir1 = std::string()) const;
-
- std::string getReqFilePath(
- const std::string& directory,
- const std::string& filename) const;
-
- Cdeqstr getReqFilePaths(
- const std::string& directory,
- const std::string& subdir) const;
-
- std::string getReqRmtCertsDir(
- const std::string& appId,
- const std::string& pmeId) const;
-
- void getExistingDir(
- const std::string& parentDir,
- const std::string& childDir,
- std::string& result,
- std::string& errDirs) const;
-
-private:
- bool _isInitialized;
-
- EVP_CIPHER* _cipher;
- std::string _persistenceDir;
-
- std::string _nullPath;
- SmartPtrCDynamicByteArray _nullBuffer;
-
- std::string _encryptPublicKeyPath;
- std::string _decryptPublicKeyPath;
- std::string _decryptPrivateKeyPath;
- std::string _signPublicKeyPath;
- std::string _signPrivateKeyPath;
- Cdeqstr _caCertificatePaths;
-
- bool _checkCrlf;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CCmsMessage);
-};
-
-CAF_DECLARE_SMART_POINTER(CCmsMessage);
-
-}
-
-#endif // #ifndef CCmsMessage_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: July 3, 2015
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCmsMessageAttachments_h_
-#define CCmsMessageAttachments_h_
-
-#include "CCmsMessage.h"
-
-namespace Caf {
-
-class CCmsMessageAttachments {
-public:
- CCmsMessageAttachments();
- virtual ~CCmsMessageAttachments();
-
-public:
- void initialize(
- const SmartPtrCCmsMessage& cmsMessage);
-
-public:
- void enforceSecurityOnAttachments(
- const std::deque<SmartPtrCAttachmentDoc>& attachmentCollection,
- const bool isSigningEnforced,
- const bool isEncryptionEnforced) const;
-
- std::deque<SmartPtrCAttachmentDoc> encryptAndSignAttachments(
- const std::deque<SmartPtrCAttachmentDoc>& sourceAttachmentCollection) const;
-
- SmartPtrCAttachmentDoc encryptAndSignAttachment(
- const std::string& sourceAttachmentPath,
- const SmartPtrCAttachmentDoc& sourceAttachment,
- const std::map<std::string, std::string>& uriParameters = std::map<std::string, std::string>()) const;
-
- std::deque<SmartPtrCAttachmentDoc> decryptAndVerifyAttachments(
- const std::deque<SmartPtrCAttachmentDoc>& sourceAttachmentCollection) const;
-
- SmartPtrCAttachmentDoc decryptAndVerifyAttachment(
- const std::string& sourceAttachmentPath,
- const SmartPtrCAttachmentDoc& sourceAttachment,
- const std::map<std::string, std::string>& uriParameters) const;
-
-private:
- void signAttachment(
- const std::string& sourceAttachmentPath,
- const SmartPtrCAttachmentDoc& sourceAttachment,
- const std::map<std::string, std::string>& uriParameters,
- std::string& destAttachmentPath,
- SmartPtrCAttachmentDoc& destAttachment) const;
-
- void verifyAttachment(
- const std::string& sourceAttachmentPath,
- const SmartPtrCAttachmentDoc& sourceAttachment,
- const std::map<std::string, std::string>& uriParameters,
- std::string& destAttachmentPath,
- SmartPtrCAttachmentDoc& destAttachment) const;
-
- void encryptAttachment(
- const std::string& sourceAttachmentPath,
- const SmartPtrCAttachmentDoc& sourceAttachment,
- const std::map<std::string, std::string>& uriParameters,
- std::string& destAttachmentPath,
- SmartPtrCAttachmentDoc& destAttachment) const;
-
- void decryptAttachment(
- const std::string& sourceAttachmentPath,
- const SmartPtrCAttachmentDoc& sourceAttachment,
- const std::map<std::string, std::string>& uriParameters,
- std::string& destAttachmentPath,
- SmartPtrCAttachmentDoc& destAttachment) const;
-
-private:
- void removeStr(
- std::string& sourceStr,
- const std::string& strToRemove) const;
-
- void enforceSigning(
- const bool isSigningEnforced,
- const SmartPtrCAttachmentDoc& attachment) const;
-
- void enforceEncryption(
- const bool isEncryptionEnforced,
- const SmartPtrCAttachmentDoc& attachment) const;
-
-private:
- bool _isInitialized;
-
- SmartPtrCCmsMessage _cmsMessage;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CCmsMessageAttachments);
-};
-
-CAF_DECLARE_SMART_POINTER(CCmsMessageAttachments);
-
-}
-
-#endif // #ifndef CCmsMessageAttachments_h_
+++ /dev/null
-/*
- * Created on: Nov 26, 2014
- * Author: bwilliams
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CMessageDeliveryRecord_h
-#define CMessageDeliveryRecord_h
-
-namespace Caf {
-
-class CMessageDeliveryRecord {
-public:
- CMessageDeliveryRecord();
- virtual ~CMessageDeliveryRecord();
-
-public:
- void initialize(
- const UUID& correlationId,
- const uint32 numberOfParts,
- const uint32 startingPartNumber,
- const std::deque<SmartPtrCMessagePartDescriptorSourceRecord>& messagePartSources,
- const IIntMessage::SmartPtrCHeaders& messageHeaders);
-
-public:
- UUID getCorrelationId() const;
-
- std::string getCorrelationIdStr() const;
-
- uint32 getNumberOfParts() const;
-
- uint32 getStartingPartNumber() const;
-
- std::deque<SmartPtrCMessagePartDescriptorSourceRecord> getMessagePartSources() const;
-
- IIntMessage::SmartPtrCHeaders getMessageHeaders() const;
-
-private:
- bool _isInitialized;
- UUID _correlationId;
- uint32 _numberOfParts;
- uint32 _startingPartNumber;
- std::deque<SmartPtrCMessagePartDescriptorSourceRecord> _messagePartSources;
- IIntMessage::SmartPtrCHeaders _messageHeaders;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CMessageDeliveryRecord);
-};
-
-CAF_DECLARE_SMART_POINTER(CMessageDeliveryRecord);
-
-}
-
-#endif /* CMessageDeliveryRecord_h */
+++ /dev/null
-/*
- * Created on: Nov 19, 2014
- * Author: bwilliams
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CMessagePartDescriptor_h
-#define CMessagePartDescriptor_h
-
-namespace Caf {
-
-class CMessagePartDescriptor;
-CAF_DECLARE_SMART_POINTER(CMessagePartDescriptor);
-
-/**
- * Class that emits and parses message parts header blocks.<br>
- */
-class CMessagePartDescriptor {
-public:
- /**
- * Converts the BLOCK_SIZE data in a ByteBuffer into a MessagePartsHeader
- * <p>
- * The incoming ByteBuffer position will be modified.
- * @param buffer ByteBuffer to convert
- * @return a MessagePartsHeader
- */
- static SmartPtrCMessagePartDescriptor fromByteBuffer(SmartPtrCDynamicByteArray& buffer);
-
- /**
- * Converts a byte array into a MessagePartsHeader
- * @param blockData byte array to convert
- * @return a MessagePartsHeader
- */
- static SmartPtrCMessagePartDescriptor fromArray(SmartPtrCDynamicByteArray& blockData);
-
- static SmartPtrCDynamicByteArray toArray(const uint16 attachmentNumber,
- const uint32 partNumber, const uint32 dataSize, const uint32 dataOffset);
-
-public:
- CMessagePartDescriptor();
- virtual ~CMessagePartDescriptor();
-
-public:
- /**
- * @param correlationId the correlation id
- * @param numberOfParts the total number of parts
- */
- void initialize(
- const uint16 attachmentNumber,
- const uint32 partNumber,
- const uint32 dataSize,
- const uint32 dataOffset);
-
- /**
- * @return the attachmentNumber
- */
- uint16 getAttachmentNumber() const;
- std::string getAttachmentNumberStr() const;
-
- /**
- * @return the partNumber
- */
- uint32 getPartNumber() const;
-
- /**
- * @return the dataSize
- */
- uint32 getDataSize() const;
-
- /**
- * @return the dataOffset
- */
- uint32 getDataOffset() const;
-
-public:
- /**
- * The <code>BLOCK_SIZE</code> field stores the size of a <code>MessagePartsHeader</code> in byte array form.<br>
- */
- static const uint32 BLOCK_SIZE = 20;
- static const byte CAF_MSG_VERSION = 1;
-
-private:
- static const byte RESERVED = (byte)0xcd;
-
-private:
- bool _isInitialized;
- uint16 _attachmentNumber;
- uint32 _partNumber;
- uint32 _dataSize;
- uint32 _dataOffset;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CMessagePartDescriptor);
-};
-
-}
-
-#endif /* CMessagePartDescriptor_h */
+++ /dev/null
-/*
- * Created on: Nov 26, 2014
- * Author: bwilliams
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CMessagePartDescriptorSourceRecord_h
-#define CMessagePartDescriptorSourceRecord_h
-
-namespace Caf {
-
-class CMessagePartDescriptorSourceRecord {
-public:
- CMessagePartDescriptorSourceRecord();
- virtual ~CMessagePartDescriptorSourceRecord();
-
-public:
- void initialize(
- const uint16 attachmentNumber,
- const std::string filePath,
- const uint32 dataOffset,
- const uint32 dataLength);
-
-public:
- uint16 getAttachmentNumber() const;
-
- std::string getFilePath() const;
-
- uint32 getDataOffset() const;
-
- uint32 getDataLength() const;
-
-private:
- bool _isInitialized;
- uint16 _attachmentNumber;
- std::string _filePath;
- uint32 _dataOffset;
- uint32 _dataLength;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CMessagePartDescriptorSourceRecord);
-};
-
-CAF_DECLARE_SMART_POINTER(CMessagePartDescriptorSourceRecord);
-
-}
-
-#endif /* CMessagePartDescriptorSourceRecord_h */
+++ /dev/null
-/*
- * Created on: Nov 26, 2014
- * Author: bwilliams
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CMessagePartRecord_h
-#define CMessagePartRecord_h
-
-namespace Caf {
-
-class CMessagePartRecord {
-public:
- CMessagePartRecord();
- virtual ~CMessagePartRecord();
-
-public:
- void initialize(
- const uint16 attachmentNumber,
- const std::string filePath,
- const uint64 dataOffset,
- const uint64 dataLength);
-
-public:
- uint16 getAttachmentNumber() const;
-
- std::string getFilePath() const;
-
- uint64 getDataOffset() const;
-
- uint64 getDataLength() const;
-
- void setAttachmentNumber(const uint16 attachmentNumber);
-
- void setFilePath(const std::string& filePath);
-
- void setDataOffset(const uint64 dataOffset);
-
- void setDataLength(const uint64 dataLength);
-
-private:
- bool _isInitialized;
- uint16 _attachmentNumber;
- std::string _filePath;
- uint64 _dataOffset;
- uint64 _dataLength;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CMessagePartRecord);
-};
-
-CAF_DECLARE_SMART_POINTER(CMessagePartRecord);
-
-}
-
-#endif /* CMessagePartRecord_h */
+++ /dev/null
-/*
- * Created on: Nov 19, 2014
- * Author: bwilliams
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CMessagePartsHeader_h
-#define CMessagePartsHeader_h
-
-namespace Caf {
-
-class CMessagePartsHeader;
-CAF_DECLARE_SMART_POINTER(CMessagePartsHeader);
-
-/**
- * Class that emits and parses message parts header blocks.<br>
- */
-class CMessagePartsHeader {
-public:
- /**
- * Converts the BLOCK_SIZE data in a ByteBuffer into a MessagePartsHeader
- * <p>
- * The incoming ByteBuffer position will be modified.
- * @param buffer ByteBuffer to convert
- * @return a MessagePartsHeader
- */
- static SmartPtrCMessagePartsHeader fromByteBuffer(SmartPtrCDynamicByteArray& buffer);
-
- /**
- * Converts a byte array into a MessagePartsHeader
- * @param blockData byte array to convert
- * @return a MessagePartsHeader
- */
- static SmartPtrCMessagePartsHeader fromArray(SmartPtrCDynamicByteArray& blockData);
-
- static SmartPtrCDynamicByteArray toArray(const UUID correlationId,
- const uint32 numberOfParts);
-
-public:
- CMessagePartsHeader();
- virtual ~CMessagePartsHeader();
-
-public:
- /**
- * @param correlationId the correlation id
- * @param numberOfParts the total number of parts
- */
- void initialize(
- const UUID correlationId,
- const uint32 numberOfParts);
-
- /**
- * @return the correlationId
- */
- UUID getCorrelationId() const;
- std::string getCorrelationIdStr() const;
-
- /**
- * @return the numberOfParts
- */
- uint32 getNumberOfParts() const;
-
-public:
- /**
- * The <code>BLOCK_SIZE</code> field stores the size of a <code>MessagePartsHeader</code> in byte array form.<br>
- */
- static const uint32 BLOCK_SIZE = 24;
- static const byte CAF_MSG_VERSION = 1;
-
-private:
- static const byte RESERVED1 = (byte)0xcd;
- static const byte RESERVED2 = (byte)0xcd;
- static const byte RESERVED3 = (byte)0xcd;
-
-private:
- bool _isInitialized;
- UUID _correlationId;
- uint32 _numberOfParts;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CMessagePartsHeader);
-};
-
-}
-
-#endif /* CMessagePartsHeader_h */
+++ /dev/null
-/*
- * Created on: Aug 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef ReplyToResolver_h
-#define ReplyToResolver_h
-
-namespace Caf {
-struct __declspec(novtable) ReplyToResolver : public ICafObject {
- CAF_DECL_UUID("4D306795-4475-4D2C-BEF0-0ADE28843BBC")
-
- virtual std::string cacheReplyTo(const SmartPtrIIntMessage& message) = 0;
-
- virtual std::string lookupReplyTo(const SmartPtrIIntMessage& message) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(ReplyToResolver);
-}
-#endif /* ReplyToResolver_h */
+++ /dev/null
-/*
- * Created on: May 2, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQCHANNEL_H_
-#define AMQCHANNEL_H_
-
-#include "IConnectionInt.h"
-#include "AMQCommand.h"
-#include "IRpcContinuation.h"
-#include "ConsumerDispatcher.h"
-#include "TCopyOnWriteContainer.h"
-
-namespace Caf { namespace AmqpClient {
-
-class AMQChannel;
-CAF_DECLARE_SMART_POINTER(AMQChannel);
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Concrete implementation of a Channel object representing an AMQP channel.
- */
-class AMQChannel : public Channel {
-public:
- AMQChannel();
- virtual ~AMQChannel();
-
- /**
- * @brief Initializer
- * @param connection the owning connection
- * @param workService the work service to add channel tasks to
- */
- void init(
- const SmartPtrIConnectionInt& connection,
- const SmartPtrConsumerWorkService& workService);
-
- /**
- * @brief Notification of connection closure
- * <p>
- * Called by the AMQChannelManager to notify the channel that the parent connect
- * has closed for the supplied reason.
- * @param exception the reason for the closure
- */
- void notifyConnectionClosed(SmartPtrCCafException& exception);
-
- /**
- * @brief Close the channel with the given reason
- * @param exception reason for closure
- */
- void close(SmartPtrCCafException& exception);
-
-public: // Channel
- uint16 getChannelNumber();
-
- void close();
-
- bool isOpen();
-
-public: // Basic
- void basicAck(
- const uint64 deliveryTag,
- const bool ackMultiple);
-
- SmartPtrGetResponse basicGet(
- const std::string& queue,
- const bool noAck);
-
- void basicPublish(
- const std::string& exchange,
- const std::string& routingKey,
- const AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body);
-
- void basicPublish(
- const std::string& exchange,
- const std::string& routingKey,
- const bool mandatory,
- const bool immediate,
- const AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body);
-
- AmqpMethods::Basic::SmartPtrConsumeOk basicConsume(
- const std::string& queue,
- const SmartPtrConsumer& consumer);
-
- AmqpMethods::Basic::SmartPtrConsumeOk basicConsume(
- const std::string& queue,
- const bool noAck,
- const SmartPtrConsumer& consumer);
-
- AmqpMethods::Basic::SmartPtrConsumeOk basicConsume(
- const std::string& queue,
- const std::string& consumerTag,
- const bool noAck,
- const bool noLocal,
- const bool exclusive,
- const SmartPtrConsumer& consumer,
- const SmartPtrTable& arguments = SmartPtrTable());
-
- AmqpMethods::Basic::SmartPtrCancelOk basicCancel(
- const std::string& consumerTag);
-
- AmqpMethods::Basic::SmartPtrRecoverOk basicRecover(
- const bool requeue);
-
- AmqpMethods::Basic::SmartPtrQosOk basicQos(
- const uint32 prefetchSize,
- const uint32 prefetchCount,
- const bool global);
-
- void basicReject(
- const uint64 deliveryTag,
- const bool requeue);
-
-public: // Exchange
- AmqpMethods::Exchange::SmartPtrDeclareOk exchangeDeclare(
- const std::string& exchange,
- const std::string& type,
- const bool durable = false,
- const SmartPtrTable& arguments = SmartPtrTable());
-
- AmqpMethods::Exchange::SmartPtrDeleteOk exchangeDelete(
- const std::string& exchange,
- const bool ifUnused);
-
-public: // Queue
- AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare();
-
- AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare(
- const std::string& queue,
- const bool durable,
- const bool exclusive,
- const bool autoDelete,
- const SmartPtrTable& arguments = SmartPtrTable());
-
- AmqpMethods::Queue::SmartPtrDeclareOk queueDeclarePassive(
- const std::string& queue);
-
- AmqpMethods::Queue::SmartPtrDeleteOk queueDelete(
- const std::string& queue,
- const bool ifUnused,
- const bool ifEmpty);
-
- AmqpMethods::Queue::SmartPtrPurgeOk queuePurge(
- const std::string& queue);
-
- AmqpMethods::Queue::SmartPtrBindOk queueBind(
- const std::string& queue,
- const std::string& exchange,
- const std::string& routingKey,
- const SmartPtrTable& arguments = SmartPtrTable());
-
- AmqpMethods::Queue::SmartPtrUnbindOk queueUnbind(
- const std::string& queue,
- const std::string& exchange,
- const std::string& routingKey,
- const SmartPtrTable& arguments = SmartPtrTable());
-
- void addReturnListener(
- const SmartPtrReturnListener& listener);
-
- bool removeReturnListener(
- const SmartPtrReturnListener& listener);
-
-private:
- bool taskHandler();
-
- void handleCompleteInboundCommand(const SmartPtrAMQCommand& command);
-
- bool processAsync(const SmartPtrAMQCommand& command);
-
- void ensureIsOpen();
-
- SmartPtrAMQCommand execRpc(const SmartPtrIServerMethod& method);
-
- SmartPtrIRpcContinuation nextOutstandingRpc();
-
- void transmit(const SmartPtrIServerMethod& method);
-
- void channelCloseByServerShutdown(const AmqpMethods::Channel::SmartPtrClose& closeMethod);
-
- void callReturnListeners(const SmartPtrAMQCommand& command);
-
-private:
- /*
- * This class hooks the channel into the worker service
- * thread pool for channel inbound AMQP frame processing
- */
- class ChannelTask : public CManagedThreadPool::IThreadTask {
- public:
- ChannelTask();
-
- virtual ~ChannelTask();
-
- /*
- * Initialize the thread task
- * channel is the pointer to the parent channel
- */
- void init(SmartPtrAMQChannel channel);
-
- /*
- * Thread pool task execution callback
- *
- * Calls through to the channel to do the actual work
- * returns 'true' if the thread pool should remove this task
- * returns 'false' if the thread pool should requeue this task
- */
- bool run();
-
- private:
- SmartPtrAMQChannel _channel;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(ChannelTask);
- };
- CAF_DECLARE_SMART_POINTER(ChannelTask);
-
-private:
- static const uint8 DEBUGLOG_FLAG_ENTRYEXIT;
- static const uint8 DEBUGLOG_FLAG_AMQP;
-
- bool _isInitialized;
- volatile bool _isOpen;
- uint8 _debugLogFlags;
- SmartPtrIConnectionInt _connection;
- SmartPtrConsumerWorkService _workService;
- SmartPtrConsumerDispatcher _dispatcher;
- uint16 _channelNumber;
- SmartPtrCAmqpChannel _channelHandle;
- SmartPtrAMQCommand _command;
- SmartPtrIRpcContinuation _activeRpc;
- SmartPtrCAutoMutex _channelMutex;
- CThreadSignal _channelSignal;
-
- typedef std::deque<SmartPtrReturnListener> ReturnListenerCollection;
- typedef TCopyOnWriteContainer<ReturnListenerCollection> CowReturnListenerCollection;
- CowReturnListenerCollection _returnListeners;
-
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(AMQChannel);
-};
-
-}}
-
-#endif /* AMQCHANNEL_H_ */
+++ /dev/null
-/*
- * Created on: May 7, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQCHANNELMANAGER_H_
-#define AMQCHANNELMANAGER_H_
-
-#include "AMQChannel.h"
-#include "ConsumerWorkService.h"
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Manages a set of channels for a connection.
- * Channels are indexed by channel number (<code><b>1.._channelMax</b></code>).
- */
-class AMQChannelManager {
-public:
- AMQChannelManager();
- virtual ~AMQChannelManager();
-
-public:
- /**
- * @brief Initialize the manager to control <code><b>channelMax</b></code> channels.
- * @param workService the service (thread pool) to run the channels in
- */
- void init(const SmartPtrConsumerWorkService& workService);
-
- /**
- * @brief Create a new channel
- * @param connection The controlling #Caf::AmqpClient::IConnectionInt connection
- * @return the new Channel
- */
- SmartPtrChannel createChannel(const SmartPtrIConnectionInt& connection);
-
- /**
- * @brief Return an existing channel on this connection.
- * @param channelNumber the number of the required channel
- * @return the #Caf::AmqpClient::Channel interface to the channel if it exists else
- * throws an exception
- */
- SmartPtrChannel getChannel(const uint16 channelNumber);
-
- /**
- * @brief Return the number of open channels
- * @return the number of open channels
- */
- size_t getOpenChannelCount();
-
- /**
- * @brief Notify all channels that the connection is closed and the reason for it
- * @param shutdownException the exception (reason) for the closure
- */
- void notifyConnectionClose(SmartPtrCCafException& shutdownException);
-
- /**
- * @brief Close achannel with the supplied reason
- * @param channelNumber the channel to close
- * @param reason the reason for closure
- */
- void closeChannel(const uint16 channelNumber, SmartPtrCCafException& reason);
-
- /**
- * @brief Remove a channel from management
- * @param channelNumber channel number
- */
- void removeChannel(const uint16 channelNumber);
-
-private:
- typedef std::map<uint16, SmartPtrAMQChannel> ChannelMap;
-
- bool _isInitialized;
- ChannelMap _channelMap;
- SmartPtrConsumerWorkService _workService;
-
- CAF_CM_CREATE;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(AMQChannelManager);
-};
-CAF_DECLARE_SMART_POINTER(AMQChannelManager);
-
-}}
-
-#endif /* AMQCHANNELMANAGER_H_ */
+++ /dev/null
-/*
- * Created on: May 9, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQCOMMAND_H_
-#define AMQCOMMAND_H_
-
-#include "CommandAssembler.h"
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief This class represents an AMQP command
- * <p>
- * This class wraps up the method, content header and body information for an
- * incoming AMQP command.
- */
-class AMQCommand {
-public:
- AMQCommand();
- virtual ~AMQCommand();
-
- /**
- * @brief Prepare the object for frame processing
- */
- void init();
-
- /**
- * @brief Process an AMQP frame
- * @param frame amqp frame data
- */
- bool handleFrame(const SmartPtrCAmqpFrame& frame);
-
- /**
- * @brief Return the body if available
- * @return the body's raw bytes if available or a <code><i>null</i></code> object
- */
- SmartPtrCDynamicByteArray getContentBody();
-
- /**
- * @brief Return the content header if available
- * @return the IContentHeader if available or a
- * <code><i>null</i></code> object
- */
- SmartPtrIContentHeader getContentHeader();
-
- /**
- * @brief Return the method
- * @return the IMethod object interface representing the method.
- * QueryInterface must be used to get to the actual method object
- */
- SmartPtrIMethod getMethod();
-
-private:
- SmartPtrCommandAssembler _assembler;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(AMQCommand);
-};
-CAF_DECLARE_SMART_POINTER(AMQCommand);
-
-}}
-
-#endif /* AMQCOMMAND_H_ */
+++ /dev/null
-/*
- * Created on: May 2, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQCONNECTION_H_
-#define AMQCONNECTION_H_
-
-#include "AMQChannelManager.h"
-#include "ConnectionWeakReference.h"
-#include "ConsumerWorkService.h"
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Concrete class representing and managing an AMQP connection to a broker.
- * <p>
- * To create a broker connection, use a ConnectionFactory created
- * by calling #createConnectionFactory
- */
-class AMQConnection : public Connection, public IConnectionInt {
-public:
- AMQConnection();
- virtual ~AMQConnection();
-
-public:
- /**
- * @brief Initialize the connection.
- * @param username name used to establish connection
- * @param password for <code><b>username</b></code>
- * @param address info needed to establish connection
- * @param certInfo info needed to establish a secure connection
- * @param requestedFrameMax max size of frame
- * @param requestedChannelMax max number of channels
- * @param requestedHeartbeat hearbeat in seconds
- * @param connectionTimeout connection timeout in milliseconds
- * @param consumerThreadCount number of consumer threads
- */
- void init(
- const std::string username,
- const std::string password,
- const SmartPtrAddress& address,
- const SmartPtrCertInfo& certInfo,
- const uint32 requestedFrameMax,
- const uint32 requestedChannelMax,
- const uint32 requestedHeartbeat,
- const uint32 connectionTimeout,
- const uint32 consumerThreadCount,
- const uint16 retries,
- const uint16 secondsToWait);
-
- /**
- * @brief Start up the connection.
- */
- void start();
-
-
-public: // Connection
- SmartPtrChannel createChannel();
-
- void closeChannel(const SmartPtrChannel& channel);
-
- void close();
-
- bool isOpen();
-
-public: // IConnectionInt
- AMQPStatus amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel);
-
- void notifyChannelClosedByServer(const uint16 channelNumber);
-
- void channelCloseChannel(Channel *channel);
-
-private:
- void initConnection();
-
- static void closeChannel(
- const bool isRunning,
- const SmartPtrAMQChannelManager channelManager,
- const SmartPtrChannel& channel);
-
- static SmartPtrChannel createChannel(
- const bool isRunning,
- const SmartPtrAMQChannelManager& channelManager,
- const SmartPtrConnectionWeakReference& weakReferenceSelf);
-
- static void* threadFunc(void* context);
-
- void threadWorker();
-
-private:
- bool _isInitialized;
- volatile bool _isRunning;
- volatile bool _shouldShutdown;
- bool _wasCloseCalled;
- GThread* _thread;
- CThreadSignal _connectionSignal;
- SmartPtrAddress _address;
- SmartPtrCertInfo _certInfo;
- uint32 _connectionTimeout;
- SmartPtrCAmqpConnection _connectionHandle;
- uint32 _requestedFrameMax;
- uint32 _requestedChannelMax;
- uint32 _requestedHeartbeat;
- uint16 _retries;
- uint16 _secondsToWait;
- SmartPtrCAmqpAuthMechanism _authMechanism;
- SmartPtrAMQChannelManager _channelManager;
- SmartPtrConnectionWeakReference _weakReferenceSelf;
- SmartPtrCManagedThreadPool _threadPool;
- SmartPtrConsumerWorkService _workService;
-
- CAF_CM_CREATE;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_CREATE_LOG;
- CAF_THREADSIGNAL_CREATE;
- CAF_CM_DECLARE_NOCOPY(AMQConnection);
-};
-
-CAF_DECLARE_SMART_POINTER(AMQConnection);
-
-}}
-
-#endif /* AMQCONNECTION_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: 10/19/2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQP_CLIENTLINK_H_
-#define AMQP_CLIENTLINK_H_
-
-#ifndef AMQPCLIENT_LINKAGE
- #ifdef WIN32
- #ifdef AMQP_CLIENT
- #define AMQPCLIENT_LINKAGE __declspec(dllexport)
- #else
- #define AMQPCLIENT_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define AMQPCLIENT_LINKAGE
- #endif
-#endif
-
-#endif /* AMQP_CLIENTLINK_H_ */
+++ /dev/null
-/*
- * Created on: May 15, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef BLOCKINGRPCCONTINUATION_H_
-#define BLOCKINGRPCCONTINUATION_H_
-
-#include "AMQCommand.h"
-#include "IRpcContinuation.h"
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @brief A IRpcContinuation that blocks until the response is received.
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- */
-class BlockingRpcContinuation : public IRpcContinuation {
-public:
- BlockingRpcContinuation();
- virtual ~BlockingRpcContinuation();
-
- /**
- * @brief Initialize the object
- */
- void init();
-
- /**
- * @brief Waits indefinately for a response to an AMQP method call
- * @retval null if an error occured. In this case call getException to get the exception
- * @retval non-null AMQCommand response
- */
- SmartPtrAMQCommand getReply();
-
- /**
- * @brief Waits for a time for a response to an AMQP method call
- * @param timeout time in milliseconds to wait for a response
- * @retval null if an error occured. In this case call getException to get the exception
- * @retval non-null AMQCommand response
- */
- SmartPtrAMQCommand getReply(uint32 timeout);
-
- /**
- * @brief Returns the exception that occured if getReply returns <code><i>null</i></code>.
- * @return the exception. The returned exception will have its reference count increased.
- */
- SmartPtrCCafException getException();
-
-public: // IRpcContinuation
- void handleCommand(const SmartPtrAMQCommand& command);
-
- void handleAbort(SmartPtrCCafException exception);
-
-private:
- bool _isInitialized;
- TBlockingCell<SmartPtrAMQCommand> _blocker;
- SmartPtrCCafException _exception;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(BlockingRpcContinuation);
-};
-CAF_DECLARE_SMART_POINTER(BlockingRpcContinuation);
-
-}}
-
-#endif /* BLOCKINGRPCCONTINUATION_H_ */
+++ /dev/null
-/*
- * Created on: May 7, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENT_CAMQPAUTHMECHANISM_H_
-#define AMQPCLIENT_CAMQPAUTHMECHANISM_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Manages a set of channels for a connection.
- * Channels are indexed by channel number (<code><b>1.._channelMax</b></code>).
- */
-class CAmqpAuthMechanism {
-public:
- CAmqpAuthMechanism();
- virtual ~CAmqpAuthMechanism();
-
-public:
- AMQPStatus createClient(
- const std::string& username,
- const std::string& password);
-
- std::string getUsername() const;
- std::string getPassword() const;
-
-private:
- std::string _username;
- std::string _password;
-
- CAF_CM_CREATE;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(CAmqpAuthMechanism);
-};
-CAF_DECLARE_SMART_POINTER(CAmqpAuthMechanism);
-
-}}
-
-#endif /* AMQPCLIENT_CAMQPAUTHMECHANISM_H_ */
+++ /dev/null
-/*
- * Created on: May 7, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENT_CAMQPCHANNEL_H_
-#define AMQPCLIENT_CAMQPCHANNEL_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Manages a set of channels for a connection.
- * Channels are indexed by channel number (<code><b>1.._channelMax</b></code>).
- */
-class CAmqpChannel {
-public:
- CAmqpChannel();
- virtual ~CAmqpChannel();
-
- void initialize(
- const SmartPtrCAmqpConnection& connection,
- const amqp_channel_t& channel);
-
-public:
- AMQPStatus close();
-
- AMQPStatus closeOk();
-
- AMQPStatus receive(
- SmartPtrCAmqpFrame& frame,
- int32 timeout);
-
- AMQPStatus getId(
- uint16 *id);
-
- AMQPStatus basicAck(
- const uint64 deliveryTag,
- const bool multiple);
-
- AMQPStatus basicCancel(
- const std::string& consumerTag,
- const bool noWait);
-
- AMQPStatus basicConsume(
- const std::string& queue,
- const std::string& consumerTag,
- const bool noLocal,
- const bool noAck,
- const bool exclusive,
- const bool noWait,
- const amqp_table_t *arguments);
-
- AMQPStatus basicGet(
- const std::string& queue,
- const bool noAck);
-
- AMQPStatus basicPublish(
- const std::string& exchange,
- const std::string& routingKey,
- const bool mandatory,
- const bool immediate,
- const amqp_basic_properties_t *basicProps,
- const SmartPtrCDynamicByteArray& body);
-
- AMQPStatus basicRecover(
- const bool requeue);
-
- AMQPStatus basicQos(
- const uint32 prefetchSize,
- const uint16 prefetchCount,
- bool global);
-
- AMQPStatus exchangeDeclare(
- const std::string& exchange,
- const std::string& type,
- const bool passive,
- const bool durable,
- const bool noWait,
- const amqp_table_t *arguments);
-
- AMQPStatus exchangeDelete(
- const std::string& exchange,
- const bool ifUnused,
- const bool noWait);
-
- AMQPStatus queueBind(
- const std::string& queue,
- const std::string& exchange,
- const std::string& routingKey,
- const bool noWait,
- const amqp_table_t *arguments);
-
- AMQPStatus queueDeclare(
- const std::string& queue,
- const bool passive,
- const bool durable,
- const bool exclusive,
- const bool autoDelete,
- const bool noWait,
- const amqp_table_t *arguments);
-
- AMQPStatus queueDelete(
- const std::string& queue,
- const bool ifUnused,
- const bool ifEmpty,
- const bool noWait);
-
- AMQPStatus queuePurge(
- const std::string& queue,
- const bool noWait);
-
- AMQPStatus queueUnbind(
- const std::string& queue,
- const std::string& exchange,
- const std::string& bindingKey,
- const amqp_table_t *arguments);
-
-private:
- bool _isInitialized;
- SmartPtrCAmqpConnection _connection;
- amqp_channel_t _channel;
-
- CAF_CM_CREATE;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(CAmqpChannel);
-};
-
-}}
-
-#endif /* AMQPCLIENT_CAMQPCHANNEL_H_ */
+++ /dev/null
-/*
- * Created on: May 7, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENT_CAMQPCONNECTION_H_
-#define AMQPCLIENT_CAMQPCONNECTION_H_
-
-namespace Caf { namespace AmqpClient {
-
-/** Connection states. */
-typedef enum {
- AMQP_STATE_INITIALIZED = 0, /*!< New connection. */
- AMQP_STATE_CONNECTING, /*!< Connection in progress. */
- AMQP_STATE_CONNECTED, /*!< Connected. */
- AMQP_STATE_DISCONNECTING, /*!< Disconnection in process. */
- AMQP_STATE_DISCONNECTED, /*!< Disconnected. */
-} AMQPConnectionState;
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Manages a set of channels for a connection.
- * Channels are indexed by channel number (<code><b>1.._channelMax</b></code>).
- */
-class CAmqpConnection {
-private:
- typedef std::deque<SmartPtrCAmqpFrame> CAmqpFrames;
- typedef std::map<amqp_channel_t, CAmqpFrames> CChannelFrames;
- CAF_DECLARE_SMART_POINTER(CChannelFrames);
-
- typedef std::set<amqp_channel_t> COpenChannels;
- CAF_DECLARE_SMART_POINTER(COpenChannels);
-
-public:
- CAmqpConnection();
- virtual ~CAmqpConnection();
-
-public:
- AMQPStatus connectionCreate(
- const SmartPtrAddress& address,
- const SmartPtrCAmqpAuthMechanism& auth,
- const SmartPtrCertInfo& certInfo,
- const uint16 channelMax,
- const uint32 frameMax,
- const uint16 heartbeat,
- const uint16 retries,
- const uint16 secondsToWait);
-
- AMQPStatus connectionConnect(
- const int32 flags);
-
- AMQPStatus connectionClose();
-
- AMQPStatus connectionProcessIO();
-
- AMQPStatus connectionWaitForIO(
- const int32 timeout);
-
- AMQPStatus connectionGetState(
- AMQPConnectionState *state);
-
- AMQPStatus connectionGetMaxChannels(
- uint16 *channels);
-
- AMQPStatus connectionGetMaxFrameSize(
- uint32 *frameSize);
-
- AMQPStatus connectionGetHeartbeatInterval(
- uint16 *interval);
-
- AMQPStatus connectionGetLastError(
- const char **error);
-
- AMQPStatus channelOpen(
- SmartPtrCAmqpChannel& chan);
-
- AMQPStatus channelClose(
- const amqp_channel_t& channel);
-
- AMQPStatus channelCloseOk(
- const amqp_channel_t& channel);
-
- AMQPStatus receive(
- const amqp_channel_t& channel,
- SmartPtrCAmqpFrame& frame,
- const int32 timeout);
-
- AMQPStatus basicAck(
- const amqp_channel_t& channel,
- const uint64 deliveryTag,
- const bool multiple);
-
- AMQPStatus basicCancel(
- const amqp_channel_t& channel,
- const std::string& consumerTag,
- const bool noWait);
-
- AMQPStatus basicConsume(
- const amqp_channel_t& channel,
- const std::string& queue,
- const std::string& consumerTag,
- const bool noLocal,
- const bool noAck,
- const bool exclusive,
- const bool noWait,
- const amqp_table_t *arguments);
-
- AMQPStatus basicGet(
- const amqp_channel_t& channel,
- const std::string& queue,
- const bool noAck);
-
- AMQPStatus basicPublish(
- const amqp_channel_t& channel,
- const std::string& exchange,
- const std::string& routingKey,
- const bool mandatory,
- const bool immediate,
- const amqp_basic_properties_t *basicProps,
- const SmartPtrCDynamicByteArray& body);
-
- AMQPStatus basicRecover(
- const amqp_channel_t& channel,
- const bool requeue);
-
- AMQPStatus basicQos(
- const amqp_channel_t& channel,
- const uint32 prefetchSize,
- const uint16 prefetchCount,
- const bool global);
-
- AMQPStatus exchangeDeclare(
- const amqp_channel_t& channel,
- const std::string& exchange,
- const std::string& type,
- const bool passive,
- const bool durable,
- const bool noWait,
- const amqp_table_t *arguments);
-
- AMQPStatus exchangeDelete(
- const amqp_channel_t& channel,
- const std::string& exchange,
- const bool ifUnused,
- const bool noWait);
-
- AMQPStatus queueBind(
- const amqp_channel_t& channel,
- const std::string& queue,
- const std::string& exchange,
- const std::string& routingKey,
- const bool noWait,
- const amqp_table_t *arguments);
-
- AMQPStatus queueDeclare(
- const amqp_channel_t& channel,
- const std::string& queue,
- const bool passive,
- const bool durable,
- const bool exclusive,
- const bool autoDelete,
- const bool noWait,
- const amqp_table_t *arguments);
-
- AMQPStatus queueDelete(
- const amqp_channel_t& channel,
- const std::string& queue,
- const bool ifUnused,
- const bool ifEmpty,
- const bool noWait);
-
- AMQPStatus queuePurge(
- const amqp_channel_t& channel,
- const std::string& queue,
- const bool noWait);
-
- AMQPStatus queueUnbind(
- const amqp_channel_t& channel,
- const std::string& queue,
- const std::string& exchange,
- const std::string& routingKey,
- const amqp_table_t *arguments);
-
-private:
- AMQPStatus createConnection();
- AMQPStatus createSslConnection();
-
- AMQPStatus connectConnection();
-
- AMQPStatus closeConnection();
-
- AMQPStatus closeChannel(
- const amqp_channel_t& channel);
-
- int32 receiveFrame(
- const amqp_connection_state_t& connectionState,
- SmartPtrCAmqpFrame& frame) const;
-
- void addFrames(
- const CAmqpFrames& frames,
- const SmartPtrCChannelFrames& channelFrames) const;
-
- bool isDataAvail(
- const amqp_connection_state_t& connectionState) const;
-
- void validateOpenChannel(
- const amqp_channel_t& channel) const;
-
- void restartListener(
- const std::string& reason) const;
-
-private:
- amqp_connection_state_t _connectionState;
- amqp_socket_t* _socket;
- amqp_channel_t _curChannel;
- AMQPConnectionState _connectionStateEnum;
- bool _isConnectionLost;
- int32 _lastStatus;
-
- SmartPtrCAmqpAuthMechanism _auth;
- uint16 _channelMax;
- uint32 _frameMax;
- uint16 _heartbeat;
- uint16 _retries;
- uint16 _secondsToWait;
- SmartPtrAddress _address;
- SmartPtrCertInfo _certInfo;
- SmartPtrCChannelFrames _channelFrames;
-
- Csetstr _cachedStrings;
- COpenChannels _openChannels;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CAmqpConnection);
-};
-
-}}
-
-#endif /* AMQPCLIENT_CAMQPCONNECTION_H_ */
+++ /dev/null
-/*
- * Created on: May 7, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENT_CAMQPFRAME_H_
-#define AMQPCLIENT_CAMQPFRAME_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Manages a set of channels for a connection.
- * Channels are indexed by channel number (<code><b>1.._channelMax</b></code>).
- */
-class CAmqpFrame {
-public:
- CAmqpFrame();
- virtual ~CAmqpFrame();
-
-public:
- void initialize(
- const amqp_frame_t& frame);
-
- uint8_t getFrameType() const;
- amqp_channel_t getChannel() const;
-
- const amqp_method_t* const getPayloadAsMethod() const;
-
- uint16_t getHeaderClassId() const;
- uint64_t getHeaderBodySize() const;
- const amqp_basic_properties_t* const getHeaderProperties() const;
-
- const amqp_bytes_t* const getBodyFragment() const;
-
- void log(const std::string& prefix) const;
-
-private:
- bool _isInitialized;
-
- uint8_t _frameType;
- amqp_channel_t _channel;
-
- amqp_method_t _method;
-
- uint16_t _propertiesClassId;
- uint64_t _propertiesBodySize;
- amqp_basic_properties_t* _propertiesDecoded;
-
- amqp_bytes_t _bodyFragment;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CAmqpFrame);
-};
-CAF_DECLARE_SMART_POINTER(CAmqpFrame);
-
-}}
-
-#endif /* AMQPCLIENT_CAMQPFRAME_H_ */
+++ /dev/null
-/*
- * Created on: May 9, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef COMMANDASSEMBLER_H_
-#define COMMANDASSEMBLER_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief A class that manages the assembly of AMQP frames into a complete AMQP method
- */
-class CommandAssembler {
-public:
- CommandAssembler();
- virtual ~CommandAssembler();
-
- /**
- * @brief Initialize the object
- */
- void init();
-
- /**
- * @brief Process the AMQP frame
- * @param frame AMQP frame
- * @retval true all of the frames have been received and the AMQP method is complete
- * @retval false more frames are required to complete the AMQP method
- */
- bool handleFrame(const SmartPtrCAmqpFrame& frame);
-
- /**
- * @brief Return the completion status of the method
- * @retval true all frames have been received and the AMQP method is complete
- * @retval false more frames are required to complete the AMQP method
- */
- bool isComplete();
-
- /**
- * @brief Return the Method
- * @return the interface to the Method. QueryInterface to the appropriate
- * derived type based on the class ID and method ID.
- */
- SmartPtrIMethod getMethod();
-
- /**
- * @brief Return the ContentHeader
- * @return the interface to the ContentHeader. QueryInterface to the appropriate
- * derived type based on the class ID.
- */
- SmartPtrIContentHeader getContentHeader();
-
- /**
- * @brief Return the method body
- * @return the method body data as raw bytes
- */
- SmartPtrCDynamicByteArray getContentBody();
-
-private:
- typedef enum {
- EXPECTING_METHOD,
- EXPECTING_CONTENT_HEADER,
- EXPECTING_CONTENT_BODY,
- COMPLETE
- } CAState;
-
- typedef std::deque<SmartPtrCDynamicByteArray> CBodyCollection;
-
-private:
- void consumeBodyFrame(const SmartPtrCAmqpFrame& frame);
- void consumeHeaderFrame(const SmartPtrCAmqpFrame& frame);
- void consumeMethodFrame(const SmartPtrCAmqpFrame& frame);
- void updateContentBodyState();
- void appendBodyFragment(const amqp_bytes_t * const fragment);
- SmartPtrCDynamicByteArray coalesceContentBody();
-
-private:
- bool _isInitialized;
- CAState _state;
- SmartPtrIMethod _method;
- SmartPtrIContentHeader _contentHeader;
- uint32 _remainingBodyBytes;
- CBodyCollection _bodyCollection;
- uint32 _bodyLength;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CommandAssembler);
-};
-CAF_DECLARE_SMART_POINTER(CommandAssembler);
-
-}}
-#endif /* COMMANDASSEMBLER_H_ */
+++ /dev/null
-/*
- * Created on: May 2, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CONNECTIONFACTORYIMPL_H_
-#define CONNECTIONFACTORYIMPL_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of ConnectionFactory
- */
-class ConnectionFactoryImpl : public ConnectionFactory {
-public:
- ConnectionFactoryImpl();
- virtual ~ConnectionFactoryImpl();
-
-public: // ConectionFactory
- std::string getProtocol() const;
- void setProtocol(const std::string& host);
- std::string getHost() const;
- void setHost(const std::string& host);
- uint32 getPort() const;
- void setPort(const uint32 port);
- std::string getVirtualHost() const;
- void setVirtualHost(const std::string& virtualHost);
- std::string getUsername() const;
- void setUsername(const std::string& username);
- std::string getPassword() const;
- void setPassword(const std::string& password);
- std::string getCaCertPath() const;
- void setCaCertPath(const std::string& caCertPath);
- std::string getClientCertPath() const;
- void setClientCertPath(const std::string& clientCertPath);
- std::string getClientKeyPath() const;
- void setClientKeyPath(const std::string& clientKeyPath);
- uint32 getRequestedChannelMax() const;
- void setRequestedChannelMax(const uint32 requestedChannelMax);
- uint32 getRequestedFrameMax() const;
- void setRequestedFrameMax(const uint32 requestedFrameMax);
- uint32 getRequestedHeartbeat() const;
- void setRequestedHeartbeat(const uint32 requestedHeartbeat);
- uint32 getConnectionTimeout() const;
- void setConnectionTimeout(const uint32 connectionTimeout);
- uint32 getConsumerThreadCount() const;
- void setConsumerThreadCount(const uint32 threadCount);
- uint16 getRetries() const;
- void setRetries(const uint16 retries);
- uint16 getSecondsToWait() const;
- void setSecondsToWait(const uint16 seconds);
-
- SmartPtrConnection newConnection();
- SmartPtrConnection newConnection(
- const SmartPtrAddress& address,
- const SmartPtrCertInfo& certInfo);
-
-private:
- uint32 portOrDefault(const uint32 port) const;
-
-private:
- std::string _protocol;
- std::string _host;
- uint32 _port;
- std::string _virtualHost;
- std::string _username;
- std::string _password;
- std::string _caCertPath;
- std::string _clientCertPath;
- std::string _clientKeyPath;
- uint32 _requestedChannelMax;
- uint32 _requestedFrameMax;
- uint32 _requestedHeartbeat;
- uint32 _connectionTimeout;
- uint32 _consumerThreadCount;
- uint16 _retries;
- uint16 _secondsToWait;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(ConnectionFactoryImpl);
-};
-CAF_DECLARE_SMART_POINTER(ConnectionFactoryImpl);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 7, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CONNECTIONWEAKREFERENCE_H_
-#define CONNECTIONWEAKREFERENCE_H_
-
-#include "IConnectionInt.h"
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief This class manages a weak reference to a IConnectionInt object.
- * <p>
- * The channel manager needs a reference to its connection. The connection object
- * has a reference to the channel manager. To break this reference cycle the channel
- * manager will be handed weak references to the connection.
- */
-class ConnectionWeakReference : public IConnectionInt {
-public:
- ConnectionWeakReference();
- virtual ~ConnectionWeakReference();
-
-public:
- /**
- * @brief Sets the weakly referenced object
- * @param connection the weakly referenced object
- */
- void setReference(IConnectionInt* connection);
-
- /**
- * @brief Clears the weakly referenced object.
- *
- * Calls to any Connection method on this object will result in a thrown
- * exception after this method has been called.
- */
- void clearReference();
-
-public: // IConnectionInt
- AMQPStatus amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel);
-
- void notifyChannelClosedByServer(const uint16 channelNumber);
-
- void channelCloseChannel(Channel *channel);
-
-private:
- IConnectionInt* _connection;
- CAF_CM_CREATE;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(ConnectionWeakReference);
-};
-CAF_DECLARE_SMART_POINTER(ConnectionWeakReference);
-
-}}
-
-#endif /* CONNECTIONWEAKREFERENCE_H_ */
+++ /dev/null
-/*
- * Created on: May 21, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CONSUMERDISPATCHER_H_
-#define CONSUMERDISPATCHER_H_
-
-#include "ConsumerWorkService.h"
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Dispatches notifications to a {@link Consumer} on an internally-managed work pool.
- * <p>
- * Each {@link Channel} has a single {@link ConsumerDispatcher}, but the work pool may be
- * shared with other channels, typically those on the name {@link AMQConnection}.
- */
-class ConsumerDispatcher {
-public:
- ConsumerDispatcher();
- virtual ~ConsumerDispatcher();
-
- /**
- * @brief Initialize the object
- * @param workService work service providing a work pool for dispatching notifications
- */
- void init(
- const SmartPtrConsumerWorkService& workService);
-
- /**
- * @brief Prepare for shutdown of all consumers on this channel
- */
- void quiesce();
-
- /**
- * @brief Lock the dispatcher
- * <p>
- * Place a lock on the dispatcher. All threads attemping to call the dispatcher will
- * be blocked until unlock is called.
- */
- void lock();
-
- /**
- * @brief unlock the dispatcher
- * <p>
- * Remove the lock on the dispatcher.
- */
- void unlock();
-
- /**
- * @brief Adds a consumer to the dispatcher
- * @param consumerTag consumer tag
- * @param consumer consumer object
- */
- void addConsumer(
- const std::string& consumerTag,
- const SmartPtrConsumer& consumer);
-
- /**
- * @brief Removes a consumer from the dispatcher
- * @param consumerTag consumer tag
- */
- void removeConsumer(
- const std::string& consumerTag);
-
- /**
- * @brief Retrieves a consumer from the dispatcher
- * @param consumerTag consumer tag
- * @return the consumer or <i>null</i> if not found
- */
- SmartPtrConsumer getConsumer(
- const std::string& consumerTag);
-
- /**
- * @brief Handle basic.consume-ok
- * @param consumerTag consumer tag
- */
- void handleConsumeOk(
- const std::string& consumerTag);
-
- /**
- * @brief Handle basic.cancel-ok
- * @param consumerTag consumer tag
- */
- void handleCancelOk(
- const std::string& consumerTag);
-
- /**
- * @brief Handle basic.recover-ok
- */
- void handleRecoverOk();
-
- /**
- * @brief Handle basic.delivery
- * @param consumerTag consumer tag
- * @param envelope message envelope
- * @param properties message properties and headers
- * @param body message body
- */
- void handleDelivery(
- const std::string& consumerTag,
- const SmartPtrEnvelope& envelope,
- const AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body);
-
- /**
- * @brief Handle a channel shutdown event
- * @param exception reason for the shutdown
- */
- void handleShutdown(SmartPtrCCafException exception);
-
-private: // Task support
- typedef enum {
- DISPATCH_ITEM_METHOD_HANDLE_CONSUME_OK,
- DISPATCH_ITEM_METHOD_HANDLE_CANCEL_OK,
- DISPATCH_ITEM_METHOD_HANDLE_RECOVER_OK,
- DISPATCH_ITEM_METHOD_HANDLE_DELIVERY,
- DISPATCH_ITEM_METHOD_TERMINATE
- } DispatchItemMethod;
-
- class DispatcherWorkItem : public ICafObject {
- public:
- DispatcherWorkItem();
-
- void init(
- const DispatchItemMethod method);
-
- void init(
- const DispatchItemMethod method,
- const SmartPtrEnvelope& envelope,
- const AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body);
-
- DispatchItemMethod getMethod() const;
- SmartPtrEnvelope getEnvelope() const;
- AmqpContentHeaders::SmartPtrBasicProperties getProperties() const;
- SmartPtrCDynamicByteArray getBody() const;
-
- private:
- DispatchItemMethod _method;
- SmartPtrEnvelope _envelope;
- AmqpContentHeaders::SmartPtrBasicProperties _properties;
- SmartPtrCDynamicByteArray _body;
- };
- CAF_DECLARE_SMART_POINTER(DispatcherWorkItem);
-
- class DispatcherTask : public CManagedThreadPool::IThreadTask {
- public:
- DispatcherTask();
- ~DispatcherTask();
-
- void init(
- const std::string& consumerTag,
- const SmartPtrConsumer& consumer);
-
- void term();
-
- void addWorkItem(const SmartPtrDispatcherWorkItem& workItem);
-
- bool run();
-
- private:
- static void FreeWorkItem(gpointer data);
-
- private:
- std::string _consumerTag;
- SmartPtrConsumer _consumer;
- GAsyncQueue *_workItemQueue;
- };
- CAF_DECLARE_SMART_POINTER(DispatcherTask);
-
-private:
- typedef std::pair<SmartPtrConsumer, SmartPtrDispatcherTask> ConsumerItem;
- typedef std::map<std::string, ConsumerItem> ConsumerMap;
-
- ConsumerItem getConsumerItem(const std::string& consumerTag);
-
-private:
- bool _isInitialized;
- volatile bool _isShuttingDown;
- SmartPtrConsumerWorkService _workService;
- ConsumerMap _consumers;
-
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(ConsumerDispatcher);
-};
-CAF_DECLARE_SMART_POINTER(ConsumerDispatcher);
-
-}}
-
-#endif /* CONSUMERDISPATCHER_H_ */
+++ /dev/null
-/*
- * Created on: May 9, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CONSUMERWORKSERVICE_H_
-#define CONSUMERWORKSERVICE_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief This class wraps a thread pool for executing channel worker threads
- */
-class ConsumerWorkService {
-public:
- ConsumerWorkService();
- virtual ~ConsumerWorkService();
-
- /**
- * @brief Initializer
- * @param threadPool the thread pool used to execute channel threads
- */
- void init(const SmartPtrCManagedThreadPool& threadPool);
-
- /**
- * @brief Add a worker thread to the pool
- * @param task the task to add
- */
- void addWork(const CManagedThreadPool::SmartPtrIThreadTask& task);
-
- /**
- * @brief Respond to a connection-closed notification by terminating the thread pool
- */
- void notifyConnectionClosed();
-
-private:
- bool _isInitialized;
- SmartPtrCManagedThreadPool _threadPool;
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(ConsumerWorkService);
-};
-CAF_DECLARE_SMART_POINTER(ConsumerWorkService);
-
-}}
-
-#endif /* CONSUMERWORKSERVICE_H_ */
+++ /dev/null
-# Doxyfile 1.7.5.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or sequence of words) that should
-# identify the project. Note that if you do not use Doxywizard you need
-# to put quotes around the project name if it contains spaces.
-
-PROJECT_NAME = "CAF AMQP Client Library"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER = 1.0
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer
-# a quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF = "INTERNAL LIBRARY DEVELOPMENT DOCUMENTATION"
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is
-# included in the documentation. The maximum height of the logo should not
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
-
-PROJECT_LOGO =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 3
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-# unions with only public data fields will be shown inline in the documentation
-# of the scope in which they are defined (i.e. file, namespace, or group
-# documentation), provided this scope is documented. If set to NO (the default),
-# structs, classes, and unions are shown on a separate page (for HTML and Man
-# pages) or section (for LaTeX and RTF).
-
-INLINE_SIMPLE_STRUCTS = NO
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = NO
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = YES
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = YES
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
-
-STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST = YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE = DoxygenLayout.xml
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files
-# containing the references data. This must be a list of .bib files. The
-# .bib extension is automatically appended if omitted. Using this command
-# requires the bibtex tool to be installed. See also
-# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
-# of the bibliography can be controlled using LATEX_BIB_STYLE.
-
-CITE_BIB_FILES =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = NO
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT =
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
-
-FILE_PATTERNS =
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-# Note that relative paths are relative to directory from which doxygen is run.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
-
-FILTER_SOURCE_PATTERNS =
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 2
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-# for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is adviced to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that
-# the files will be copied as-is; there are no commands or markers available.
-
-HTML_EXTRA_FILES =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-# will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = NO
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the
-# mathjax.org site, so you can quickly see the result without installing
-# MathJax, but it is strongly recommended to install a local copy of MathJax
-# before deployment.
-
-MATHJAX_RELPATH = http://www.mathjax.org/mathjax
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
-# names that should be enabled during MathJax rendering.
-
-MATHJAX_EXTENSIONS =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvantages are that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# the last chapter. If it is left blank doxygen will generate a
-# standard footer. Notice: only use this tag if you know what you are doing!
-
-LATEX_FOOTER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
-# http://en.wikipedia.org/wiki/BibTeX for more info.
-
-LATEX_BIB_STYLE = plain
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = YES
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = YES
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED = __declspec(x)= AMQPCLIENT_LINKAGE= METHOD_DECL=
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition that
-# overrules the definition found in the source code.
-
-EXPAND_AS_DEFINED = AMQP_DECLARE_EXCEPTION_CLASS
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these will confuse the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS = 0
-
-# By default doxygen will use the Helvetica font for all dot files that
-# doxygen generates. When you want a differently looking font you can specify
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find
-# the font, which can be done by putting it in a standard location or by setting
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
-# directory containing the font.
-
-DOT_FONTNAME = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the Helvetica font.
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
-# set the path where dot can find it.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are svg, png, jpg, or gif.
-# If left blank png will be used. If you choose svg you need to set
-# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible in IE 9+ (other browsers do not have this requirement).
-
-DOT_IMAGE_FORMAT = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-# Note that this requires a modern browser other than Internet Explorer.
-# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
-# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible. Older versions of IE do not have SVG support.
-
-INTERACTIVE_SVG = NO
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
-MSCFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
+++ /dev/null
-<doxygenlayout version="1.0">
- <!-- Navigation index tabs for HTML output -->
- <navindex>
- <tab type="mainpage" visible="yes" title=""/>
- <tab type="modules" visible="yes" title="" intro=""/>
- <tab type="namespaces" visible="yes" title="">
- <tab type="namespaces" visible="yes" title="" intro=""/>
- <tab type="namespacemembers" visible="yes" title="" intro=""/>
- </tab>
- <tab type="classes" visible="yes" title="">
- <tab type="classes" visible="yes" title="" intro=""/>
- <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
- <tab type="hierarchy" visible="yes" title="" intro=""/>
- <tab type="classmembers" visible="yes" title="" intro=""/>
- </tab>
- <tab type="pages" visible="yes" title="" intro=""/>
- <tab type="files" visible="yes" title="">
- <tab type="files" visible="yes" title="" intro=""/>
- <tab type="globals" visible="yes" title="" intro=""/>
- </tab>
- <tab type="dirs" visible="yes" title="" intro=""/>
- <tab type="examples" visible="yes" title="" intro=""/>
- </navindex>
-
- <!-- Layout definition for a class page -->
- <class>
- <briefdescription visible="yes"/>
- <includes visible="$SHOW_INCLUDE_FILES"/>
- <inheritancegraph visible="$CLASS_GRAPH"/>
- <collaborationgraph visible="$COLLABORATION_GRAPH"/>
- <allmemberslink visible="yes"/>
- <memberdecl>
- <nestedclasses visible="yes" title=""/>
- <publictypes title=""/>
- <publicslots title=""/>
- <signals title=""/>
- <publicmethods title=""/>
- <publicstaticmethods title=""/>
- <publicattributes title=""/>
- <publicstaticattributes title=""/>
- <protectedtypes title=""/>
- <protectedslots title=""/>
- <protectedmethods title=""/>
- <protectedstaticmethods title=""/>
- <protectedattributes title=""/>
- <protectedstaticattributes title=""/>
- <packagetypes title=""/>
- <packagemethods title=""/>
- <packagestaticmethods title=""/>
- <packageattributes title=""/>
- <packagestaticattributes title=""/>
- <properties title=""/>
- <events title=""/>
- <privatetypes title=""/>
- <privateslots title=""/>
- <privatemethods title=""/>
- <privatestaticmethods title=""/>
- <privateattributes title=""/>
- <privatestaticattributes title=""/>
- <friends title=""/>
- <related title="" subtitle=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <inlineclasses title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <constructors title=""/>
- <functions title=""/>
- <related title=""/>
- <variables title=""/>
- <properties title=""/>
- <events title=""/>
- </memberdef>
- <usedfiles visible="$SHOW_USED_FILES"/>
- <authorsection visible="yes"/>
- </class>
-
- <!-- Layout definition for a namespace page -->
- <namespace>
- <briefdescription visible="yes"/>
- <memberdecl>
- <nestednamespaces visible="yes" title=""/>
- <classes visible="yes" title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <inlineclasses title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- </memberdef>
- <authorsection visible="yes"/>
- </namespace>
-
- <!-- Layout definition for a file page -->
- <file>
- <briefdescription visible="yes"/>
- <includes visible="$SHOW_INCLUDE_FILES"/>
- <includegraph visible="$INCLUDE_GRAPH"/>
- <includedbygraph visible="$INCLUDED_BY_GRAPH"/>
- <sourcelink visible="yes"/>
- <memberdecl>
- <classes visible="yes" title=""/>
- <namespaces visible="yes" title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- <memberdef>
- <inlineclasses title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <functions title=""/>
- <variables title=""/>
- </memberdef>
- <authorsection/>
- </file>
-
- <!-- Layout definition for a group page -->
- <group>
- <briefdescription visible="yes"/>
- <detaileddescription title=""/>
- <groupgraph visible="$GROUP_GRAPHS"/>
- <memberdecl>
- <classes visible="yes" title=""/>
- <namespaces visible="yes" title=""/>
- <dirs visible="yes" title=""/>
- <nestedgroups visible="yes" title=""/>
- <files visible="yes" title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <enumvalues title=""/>
- <functions title=""/>
- <variables title=""/>
- <signals title=""/>
- <publicslots title=""/>
- <protectedslots title=""/>
- <privateslots title=""/>
- <events title=""/>
- <properties title=""/>
- <friends title=""/>
- <membergroups visible="yes"/>
- </memberdecl>
- <memberdef>
- <pagedocs/>
- <inlineclasses title=""/>
- <defines title=""/>
- <typedefs title=""/>
- <enums title=""/>
- <enumvalues title=""/>
- <functions title=""/>
- <variables title=""/>
- <signals title=""/>
- <publicslots title=""/>
- <protectedslots title=""/>
- <privateslots title=""/>
- <events title=""/>
- <properties title=""/>
- <friends title=""/>
- </memberdef>
- <authorsection visible="yes"/>
- </group>
-
- <!-- Layout definition for a directory page -->
- <directory>
- <briefdescription visible="yes"/>
- <directorygraph visible="yes"/>
- <memberdecl>
- <dirs visible="yes"/>
- <files visible="yes"/>
- </memberdecl>
- <detaileddescription title=""/>
- </directory>
-</doxygenlayout>
+++ /dev/null
-/*
- * Created on: May 8, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef ICONNECTIONINT_H_
-#define ICONNECTIONINT_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief This interface abstracts the calls to AMQP_ConnectionXXX c-api calls
- * <p>
- * AMQConnection objects pass weak references to themselves to AMQChannel objects
- * allowing them to make calls against the channel that require the connection handle.
- */
-struct __declspec(novtable) IConnectionInt : public ICafObject {
-
- /**
- * @brief Pass-through for the AMQP_ConnectionOpenChannel call
- * @param channel the channel handle to be returned
- * @return the AMQPStatus of the call. If AMQP_ERROR_OK then
- * <code><b>channel</b></code> will be set to a valid channel handle.
- */
- virtual AMQPStatus amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel) = 0;
-
- /**
- * @brief Callback to notify the connection that a channel has been closed. This
- * is in reponse to the server sending a channel.close method.
- * @param channelNumber the channel number
- */
- virtual void notifyChannelClosedByServer(const uint16 channelNumber) = 0;
-
- /**
- * @brief Callback to notify the connection that a channel is being
- * requested to close.
- * @param channel Channel to close
- */
- virtual void channelCloseChannel(Channel *channel) = 0;
-
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(IConnectionInt);
-
-}}
-
-#endif /* ICONNECTIONINT_H_ */
+++ /dev/null
-/*
- * Created on: May 15, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef IRPCCONTINUATION_H_
-#define IRPCCONTINUATION_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Interface for RPC worker objects
- * <p>
- * The channel worker thread will assemble incoming AMQP frames an then process
- * the compiled frames as an AMQCommand object. If the command object belongs
- * to an outstanding RPC call, that call will receive the command for processing.
- */
-struct __declspec(novtable) IRpcContinuation : public ICafObject {
- /**
- * @brief Process the received AMQP command
- * @param command the AMQCommand command object
- */
- virtual void handleCommand(const SmartPtrAMQCommand& command) = 0;
-
- /**
- * @brief Abort the command for the reason supplied
- * @param exception the reason as an exception
- */
- virtual void handleAbort(SmartPtrCCafException exception) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(IRpcContinuation);
-
-}}
-
-
-#endif /* IRPCCONTINUATION_H_ */
+++ /dev/null
-/*
- * Created on: May 21, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef TCOPYONWRITECONTAINER_H_
-#define TCOPYONWRITECONTAINER_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief An STL container wrapper that implements copy-on-write semantics
- */
-template <typename Container, typename ValueType = typename Container::value_type>
-class TCopyOnWriteContainer {
-public:
- typedef TCafSmartPtr<Container, TCafObject<Container> > SmartPtrContainer;
-
- TCopyOnWriteContainer() {
- _container.CreateInstance();
- }
-
- SmartPtrContainer getAll() {
- return _container;
- }
-
- void add(const ValueType& value) {
- SmartPtrContainer newContainer;
- newContainer.CreateInstance();
- newContainer->insert(
- newContainer->begin(),
- _container->begin(),
- _container->end());
- newContainer->push_back(value);
- _container = newContainer;
- }
-
- bool remove(const ValueType& value) {
- bool found = false;
- SmartPtrContainer newContainer;
- newContainer.CreateInstance();
- SmartPtrContainer currContainer = _container;
- for (typename Container::const_iterator iter = currContainer->begin();
- iter != currContainer->end();
- ++iter) {
- if (*iter == value) {
- found = true;
- } else {
- newContainer->push_back(*iter);
- }
- }
-
- if (found) {
- _container = newContainer;
- }
- return found;
- }
-
- void clear() {
- _container.CreateInstance();
- }
-
-private:
- SmartPtrContainer _container;
-};
-
-}}
-
-#endif /* TCOPYONWRITECONTAINER_H_ */
+++ /dev/null
-/*
- * Created on: May 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef BASICACKMETHOD_H_
-#define BASICACKMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP basic.ack
- */
-class BasicAckMethod :public IServerMethod {
-public:
- BasicAckMethod();
- virtual ~BasicAckMethod();
-
- /**
- * @brief Initialize the method
- * @param deliveryTag delivery tag
- * @param ackMultiple acknowledge multiple flag
- */
- void init(
- const uint64 deliveryTag,
- const bool ackMultiple);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- uint64 _deliveryTag;
- bool _ackMultiple;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(BasicAckMethod);
-};
-CAF_DECLARE_SMART_POINTER(BasicAckMethod);
-
-}}
-
-#endif /* BASICACKMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 21, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef BASICCANCELMETHOD_H_
-#define BASICCANCELMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP basic.cancel
- */
-class BasicCancelMethod : public IServerMethod {
-public:
- BasicCancelMethod();
- virtual ~BasicCancelMethod();
-
- /**
- * @brief Initialize the method
- * @param consumerTag the <i>consumer tag</i> associated with the consumer
- */
- void init(
- const std::string& consumerTag);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- std::string _consumerTag;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(BasicCancelMethod);
-};
-CAF_DECLARE_SMART_POINTER(BasicCancelMethod);
-
-}}
-
-#endif /* BASICCANCELMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 21, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef BASICCONSUMEMETHOD_H_
-#define BASICCONSUMEMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP basic.consume
- */
-class BasicConsumeMethod : public IServerMethod {
-public:
- BasicConsumeMethod();
- virtual ~BasicConsumeMethod();
-
- /**
- * @brief Initialize the method
- * @param queue queue name
- * @param consumerTag consumer tag (or blank for server-generated tag)
- * @param noLocal do not send messages to the connection that published them
- * @param noAck no acknowledgement needed
- * @param exclusive request exclusive consumer access to the queue
- * @param arguments additional call arguments
- */
- void init(
- const std::string& queue,
- const std::string& consumerTag,
- const bool noLocal,
- const bool noAck,
- const bool exclusive,
- const SmartPtrTable& arguments);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- std::string _queue;
- std::string _consumerTag;
- bool _noLocal;
- bool _noAck;
- bool _exclusive;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(BasicConsumeMethod);
-};
-CAF_DECLARE_SMART_POINTER(BasicConsumeMethod);
-
-}}
-
-#endif /* BASICCONSUMEMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef BASICGETMETHOD_H_
-#define BASICGETMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP basic.get
- */
-class BasicGetMethod : public IServerMethod {
-public:
- BasicGetMethod();
- virtual ~BasicGetMethod();
-
- /**
- * @brief Initialize the method
- * @param queue queue name
- * @param noAck no acknowledgement (manual acknowledgement) fag
- */
- void init(
- const std::string& queue,
- const bool noAck);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- std::string _queue;
- bool _noAck;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(BasicGetMethod);
-};
-CAF_DECLARE_SMART_POINTER(BasicGetMethod);
-
-}}
-
-#endif /* BASICGETMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 11, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef BASICPROPERTIES_H_
-#define BASICPROPERTIES_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP basic properties
- */
-class BasicProperties :
- public AmqpContentHeaders::BasicProperties,
- public IContentHeader {
- CAF_DECL_UUID("db3dbcd6-f241-47ff-b17c-d5cf6addabf8")
-
- CAF_BEGIN_QI()
- CAF_QI_ENTRY(AmqpContentHeaders::BasicProperties)
- CAF_QI_ENTRY(IContentHeader)
- CAF_QI_ENTRY(BasicProperties)
- CAF_END_QI()
-public:
- BasicProperties();
- virtual ~BasicProperties();
-
- /**
- * @brief Initialize the properties
- * <p>
- * This version creates an object with no properties. Call the setXXX methods
- * to add properties.
- */
- void init();
-
- /**
- * @brief Initialize the properties
- * <p>
- * Set the <code><i>flags</i></code> property to the binary 'or' (<code><b>|</b></code>) of
- * BASIC_PROPERTY_XXXX_FLAG constants representing the fields present.
- * <p>
- * Use <code><b>0</b></code>, <code><b>std::string()</b></code> or
- * <code><b>SmartPtrTable()</b></code> to skip initialization of fields not included
- * in the object.
- */
- void init(
- const uint32 flags,
- const std::string& contentType,
- const std::string& contentEncoding,
- const SmartPtrTable& headers,
- const uint8 deliveryMode,
- const uint8 priority,
- const std::string& correlationId,
- const std::string& replyTo,
- const std::string& expiration,
- const std::string& messageId,
- const uint64 timestamp,
- const std::string& type,
- const std::string& userId,
- const std::string& appId,
- const std::string& clusterId);
-
- /**
- * @brief Converts this class instance into a c-api amqp_basic_properties_t struct.
- * <p>
- * The pointers in the c-api struct point at member of this class. This class instance
- * must be realized as int32 as the return <code><i>properties</i></code> is in use.
- * @param properties the c-api properties structure to be filled out
- */
- void getAsApiProperties(amqp_basic_properties_t& properties);
-
-public: // IContentHeader
- void init(const SmartPtrCAmqpFrame& frame);
-
- uint64 getBodySize();
-
-public: // AmqpProperties::BasicProperties,
- bool areHeadersAvailable();
- uint32 getFlags();
- std::string getContentType();
- void setContentType(const std::string& contentType);
- std::string getContentEncoding();
- void setContentEncoding(const std::string& contentEncoding);
- SmartPtrTable getHeaders();
- void setHeaders(const SmartPtrTable& headers);
- uint8 getDeliveryMode();
- void setDeliveryMode(const uint8 deliveryMode);
- uint8 getPriority();
- void setPriority(const uint8 priority);
- std::string getCorrelationId();
- void setCorrelationId(const std::string& correlationId);
- std::string getReplyTo();
- void setReplyTo(const std::string& replyTo);
- std::string getExpiration();
- void setExpiration(const std::string& expiration);
- std::string getMessageId();
- void setMessageId(const std::string& messageId);
- uint64 getTimestamp();
- void setTimestamp(const uint64 timestamp);
- std::string getType();
- void setType(const std::string& type);
- std::string getUserId();
- void setUserId(const std::string& userId);
- std::string getAppId();
- void setAppId(const std::string& appId);
- std::string getClusterId();
- void setClusterId(const std::string& clusterId);
-
-public: // IAmqpContentHeader
- uint16 getClassId();
-
- std::string getClassName();
-
-private:
- void ValidatePropertyIsSet(
- const uint32 flag,
- const char* propertyName);
-
-private:
- bool _isInitialized;
- uint32 _flags;
- uint64 _bodySize;
- std::string _contentType;
- std::string _contentEncoding;
- SmartPtrTable _headers;
- uint8 _deliveryMode;
- uint8 _priority;
- std::string _correlationId;
- std::string _replyTo;
- std::string _expiration;
- std::string _messageId;
- uint64 _timestamp;
- std::string _type;
- std::string _userId;
- std::string _appId;
- std::string _clusterId;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(BasicProperties);
-};
-CAF_DECLARE_SMART_QI_POINTER(BasicProperties);
-
-}}
-
-#endif /* BASICPROPERTIES_H_ */
+++ /dev/null
-/*
- * Created on: May 15, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef BASICPUBLISHMETHOD_H_
-#define BASICPUBLISHMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP basic.publish
- */
-class BasicPublishMethod : public IServerMethod {
-public:
- BasicPublishMethod();
- virtual ~BasicPublishMethod();
-
- /**
- * @brief Initialize the method
- * @param exchange exchange name
- * @param routingKey routing key
- * @param mandatory mandatory delivery flag
- * @param immediate immediate delivery flag
- * @param properties message properties
- * @param body message body raw bytes
- */
- void init(
- const std::string& exchange,
- const std::string& routingKey,
- bool mandatory,
- bool immediate,
- const AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- std::string _exchange;
- std::string _routingKey;
- bool _mandatory;
- bool _immediate;
- AmqpContentHeaders::SmartPtrBasicProperties _properties;
- SmartPtrCDynamicByteArray _body;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(BasicPublishMethod);
-};
-CAF_DECLARE_SMART_POINTER(BasicPublishMethod);
-
-}}
-
-#endif /* BASICPUBLISHMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 22, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef BASICQOSMETHOD_H_
-#define BASICQOSMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP basic.qos
- */
-class BasicQosMethod : public IServerMethod {
-public:
- BasicQosMethod();
- virtual ~BasicQosMethod();
-
- /**
- * @brief Initialize the method
- * @param prefetchSize prefetch window in octets
- * @param prefetchCount prefetch windows in messages
- * @param global apply to entire connection
- */
- void init(
- const uint32 prefetchSize,
- const uint16 prefetchCount,
- const bool global);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- uint32 _prefetchSize;
- uint16 _prefetchCount;
- bool _global;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(BasicQosMethod);
-
-};
-CAF_DECLARE_SMART_POINTER(BasicQosMethod);
-
-}}
-
-#endif /* BASICQOSMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 21, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef BASICRECOVERMETHOD_H_
-#define BASICRECOVERMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP basic.recover
- */
-class BasicRecoverMethod : public IServerMethod {
-public:
- BasicRecoverMethod();
- virtual ~BasicRecoverMethod();
-
- /**
- * @brief Initialize the method
- * @param requeue if <code><b>false</b></code>, the message will be redelivered to the
- * original receipient. If <code><b>true</b></code>, the server will attempt to requeue
- * the message, potentially delivering it to an alternative subscriber.
- */
- void init(
- const bool requeue);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- bool _requeue;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(BasicRecoverMethod);
-
-};
-CAF_DECLARE_SMART_POINTER(BasicRecoverMethod);
-
-}}
-
-#endif /* BASICRECOVERMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: Aug 1, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef BASICREJECTMETHOD_H_
-#define BASICREJECTMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP basic.Reject
- */
-class BasicRejectMethod : public IServerMethod {
-public:
- BasicRejectMethod();
- virtual ~BasicRejectMethod();
-
- /**
- * @brief Initialize the method
- * @param deliveryTag delivery tag
- * @param requeue requeue flag
- */
- void init(
- const uint64 deliveryTag,
- const bool requeue);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- uint64 _deliveryTag;
- bool _requeue;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(BasicRejectMethod);
-};
-CAF_DECLARE_SMART_POINTER(BasicRejectMethod);
-
-}}
-
-#endif /* BASICREJECTMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 17, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CHANNELCLOSEOKMETHOD_H_
-#define CHANNELCLOSEOKMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementatin of AMQP channel.close-ok
- */
-class ChannelCloseOkMethod :public IServerMethod {
-public:
- ChannelCloseOkMethod();
- virtual ~ChannelCloseOkMethod();
-
- /**
- * Initialize the method
- */
- void init();
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(ChannelCloseOkMethod);
-};
-CAF_DECLARE_SMART_POINTER(ChannelCloseOkMethod);
-
-}}
-
-#endif /* CHANNELCLOSEOKMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef ENVELOPEIMPL_H_
-#define ENVELOPEIMPL_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of Envelope
- */
-class EnvelopeImpl : public Envelope {
-public:
- EnvelopeImpl();
- virtual ~EnvelopeImpl();
-
- /**
- * @brief Initialize the object
- * @param deliveryTag delivery tag
- * @param redelivered redelivered flag
- * @param exchange exchange name
- * @param routingKey routing key
- */
- void init(
- const uint64 deliveryTag,
- const bool redelivered,
- const std::string& exchange,
- const std::string& routingKey);
-
-public: // Envelope
- uint64 getDeliveryTag();
- bool getRedelivered();
- std::string getExchange();
- std::string getRoutingKey();
-
-private:
- bool _isInitialized;
- uint64 _deliveryTag;
- bool _redelivered;
- std::string _exchange;
- std::string _routingKey;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(EnvelopeImpl);
-};
-CAF_DECLARE_SMART_POINTER(EnvelopeImpl);
-
-}}
-
-#endif /* ENVELOPEIMPL_H_ */
+++ /dev/null
-/*
- * Created on: May 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef EXCHANGEDECLAREMETHOD_H_
-#define EXCHANGEDECLAREMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP exchange.declare
- */
-class ExchangeDeclareMethod : public IServerMethod {
-public:
- ExchangeDeclareMethod();
- virtual ~ExchangeDeclareMethod();
-
- /**
- * @brief Initializes the method
- * @param exchange exchange name
- * @param type exchange type
- * @param passive passive mode call
- * @param durable request a durable exchange
- * @param arguments declaration arguments
- */
- void init(
- const std::string& exchange,
- const std::string& type,
- const bool passive,
- const bool durable,
- const SmartPtrTable& arguments);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- std::string _exchange;
- std::string _type;
- bool _passive;
- bool _durable;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(ExchangeDeclareMethod);
-};
-CAF_DECLARE_SMART_POINTER(ExchangeDeclareMethod);
-
-}}
-#endif /* EXCHANGEDECLAREMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef EXCHANGEDELETEMETHOD_H_
-#define EXCHANGEDELETEMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP exchange.delete
- */
-class ExchangeDeleteMethod : public IServerMethod {
-public:
- ExchangeDeleteMethod();
- virtual ~ExchangeDeleteMethod();
-
- /**
- * @brief Initializes the method
- * @param exchange exchange name
- * @param ifUnused delete only if unused flag
- */
- void init(
- const std::string& exchange,
- const bool ifUnused);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- std::string _exchange;
- bool _ifUnused;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(ExchangeDeleteMethod);
-
-};
-CAF_DECLARE_SMART_POINTER(ExchangeDeleteMethod);
-
-}}
-
-#endif /* EXCHANGEDELETEMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 11, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef FIELDIMPL_H_
-#define FIELDIMPL_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of a Field object
- */
-class FieldImpl : public Field {
-public:
- FieldImpl();
- virtual ~FieldImpl();
-
-public: // Field
- AmqpFieldType getAmqpType() const;
-
- GVariant* getValue() const;
-
- void setTypeAndValue(AmqpFieldType type, GVariant *value);
-
-private:
- AmqpFieldType _type;
- GVariant *_value;
- CAF_CM_DECLARE_NOCOPY(FieldImpl);
-};
-CAF_DECLARE_SMART_POINTER(FieldImpl);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef GETRESPONSEIMPL_H_
-#define GETRESPONSEIMPL_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Impelementation of the GetResponse interface
- * <p>
- * A class to bundle together the information from a received message. The content is
- * packaged into an Envelope, BasicProperties and the body for easier consumption as
- * a single unit.
- */
-class GetResponseImpl : public GetResponse {
-public:
- GetResponseImpl();
- virtual ~GetResponseImpl();
-
- /**
- * @brief Object initializer
- * @param envelope the message envelope
- * @param properties the messsage properties
- * @param body the message body in raw bytes
- * @param messageCount the number of messages remaining in the queue
- */
- void init(
- const SmartPtrEnvelope& envelope,
- const AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body,
- const uint32 messageCount);
-
-public: // GetResponse
- SmartPtrEnvelope getEnvelope();
- AmqpContentHeaders::SmartPtrBasicProperties getProperties();
- SmartPtrCDynamicByteArray getBody();
- uint32 getMessageCount();
-
-private:
- bool _isInitialized;
- SmartPtrEnvelope _envelope;
- AmqpContentHeaders::SmartPtrBasicProperties _properties;
- SmartPtrCDynamicByteArray _body;
- uint32 _messageCount;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(GetResponseImpl);
-};
-CAF_DECLARE_SMART_POINTER(GetResponseImpl);
-
-}}
-
-#endif /* GETRESPONSEIMPL_H_ */
+++ /dev/null
-/*
- * Created on: May 11, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef ICONTENTHEADER_H_
-#define ICONTENTHEADER_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Base interface for AMQP content header implementation objects
- */
-struct __declspec(novtable) IContentHeader : public ContentHeader {
- CAF_DECL_UUID("04068590-3083-446E-83AE-DACD90C0F470")
-
- /**
- * @brief Initialize the header object from c-api properties data
- * @param properties the properties data
- */
- virtual void init(const SmartPtrCAmqpFrame& frame) = 0;
-
- /**
- * @brief Return the expected method body data size
- * @return the expected body size
- */
- virtual uint64 getBodySize() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(IContentHeader);
-
-}}
-
-#endif /* ICONTENTHEADER_H_ */
+++ /dev/null
-/*
- * Created on: May 10, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef IMETHOD_H_
-#define IMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Base interface for AMQP method implementation objects
- */
-struct __declspec(novtable) IMethod : public Method {
- CAF_DECL_UUID("08ba9874-b34c-4afe-bfdc-a12fffaefddb")
-
- /**
- * @brief Initialize the object from c-api method data
- * @param method the method data
- */
- virtual void init(const amqp_method_t * const method) = 0;
-
- /**
- * @retval true if the method expects a content header
- * @retval false if the method does not expect a content header
- */
- virtual bool hasContent() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(IMethod);
-
-}}
-
-#endif /* IMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 15, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef ISERVERMETHOD_H_
-#define ISERVERMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Base interface for server methods
- */
-struct __declspec(novtable) IServerMethod : public ICafObject {
- CAF_DECL_UUID("ce585a8d-8b49-4312-b356-6f612142b154")
-
- /**
- * Return the method name
- * @return the method name
- */
- virtual std::string getMethodName() const = 0;
-
- /**
- * Sends the command to the server
- * @param channel AMQP channel
- * @return the c-api AMQPStatus of the call
- */
- virtual AMQPStatus send(const SmartPtrCAmqpChannel& channel) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(IServerMethod);
-
-}}
-
-#endif /* ISERVERMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef QUEUEBINDMETHOD_H_
-#define QUEUEBINDMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP queue.bind
- */
-class QueueBindMethod : public IServerMethod {
-public:
- QueueBindMethod();
- virtual ~QueueBindMethod();
-
- /**
- * @brief Initialize the method
- * @param queue queue name
- * @param exchange exchange name
- * @param routingKey routing key
- * @param arguments binding arguments
- */
- void init(
- const std::string& queue,
- const std::string& exchange,
- const std::string& routingKey,
- const SmartPtrTable& arguments);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- std::string _queue;
- std::string _exchange;
- std::string _routingKey;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(QueueBindMethod);
-};
-CAF_DECLARE_SMART_POINTER(QueueBindMethod);
-
-}}
-
-#endif /* QUEUEBINDMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 10, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef QUEUEDECLAREMETHOD_H_
-#define QUEUEDECLAREMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP queue.declare
- */
-class QueueDeclareMethod :
- public IServerMethod {
-public:
- QueueDeclareMethod();
- virtual ~QueueDeclareMethod();
-
- /**
- * @brief Initialize the method using defaults
- * <p>
- * The defaults are:
- * <table border="1">
- * <tr>
- * <th>Parameter</th><th>Value</th>
- * </tr>
- * <tr><td>queue</td><td>blank - the server will generate a queue name</td></tr>
- * <tr><td>durable</td><td>false - the queue will not be durable</td></tr>
- * <tr><td>exclusive</td><td>true - the queue will be exclusive to this conenction</td></tr>
- * <tr><td>autoDelete</td><td>true - the queue will be deleted when no longer used</td></tr>
- * </table>
- */
- void init();
-
- /**
- * @brief Initialize the method
- * @param queue queue name
- * @param durable durable queue flag
- * @param exclusive exclusive queue flag
- * @param autoDelete delete when no longer in use flag
- * @param arguments method arguments
- */
- void init(
- const std::string& queue,
- bool durable,
- bool exclusive,
- bool autoDelete,
- const SmartPtrTable& arguments);
-
- /**
- * @brief Initialize the method in passive mode
- * @param queue queue name
- */
- void initPassive(
- const std::string& queue);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- std::string _queue;
- bool _passive;
- bool _durable;
- bool _exclusive;
- bool _autoDelete;
- bool _noWait;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(QueueDeclareMethod);
-};
-CAF_DECLARE_SMART_POINTER(QueueDeclareMethod);
-
-}}
-
-#endif /* QUEUEDECLAREMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef QUEUEDELETEMETHOD_H_
-#define QUEUEDELETEMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP queue.delete
- */
-class QueueDeleteMethod : public IServerMethod {
-public:
- QueueDeleteMethod();
- virtual ~QueueDeleteMethod();
-
- /**
- * @brief Initialize the method
- * @param queue queue name
- * @param ifUnused delete if queue is not in use flag
- * @param ifEmpty delete is queue is empty flag
- */
- void init(
- const std::string& queue,
- const bool ifUnused,
- const bool ifEmpty);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- std::string _queue;
- bool _ifUnused;
- bool _ifEmpty;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(QueueDeleteMethod);
-
-};
-CAF_DECLARE_SMART_POINTER(QueueDeleteMethod);
-
-}}
-
-#endif /* QUEUEDELETEMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef QUEUEPURGEMETHOD_H_
-#define QUEUEPURGEMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP queue.purge
- */
-class QueuePurgeMethod : public IServerMethod {
-public:
- QueuePurgeMethod();
- virtual ~QueuePurgeMethod();
-
- /**
- * @brief Initialize the method
- * @param queue queue name
- */
- void init(
- const std::string& queue);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- std::string _queue;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(QueuePurgeMethod);
-
-};
-CAF_DECLARE_SMART_POINTER(QueuePurgeMethod);
-
-}}
-
-#endif /* QUEUEPURGEMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef QUEUEUNBINDMETHOD_H_
-#define QUEUEUNBINDMETHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApiImpl
- * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API
- * @brief Implementation of AMQP queue.unbind
- */
-class QueueUnbindMethod : public IServerMethod {
-public:
- QueueUnbindMethod();
- virtual ~QueueUnbindMethod();
-
- /**
- * @brief Initialize the method
- * @param queue queue name
- * @param exchange exchange name
- * @param routingKey routing key
- * @param arguments method arguments
- */
- void init(
- const std::string& queue,
- const std::string& exchange,
- const std::string& routingKey,
- const SmartPtrTable& arguments);
-
-public: // IServerMethod
- std::string getMethodName() const;
-
- AMQPStatus send(const SmartPtrCAmqpChannel& channel);
-
-private:
- bool _isInitialized;
- std::string _queue;
- std::string _exchange;
- std::string _routingKey;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(QueueUnbindMethod);
-
-};
-CAF_DECLARE_SMART_POINTER(QueueUnbindMethod);
-
-}}
-
-#endif /* QUEUEUNBINDMETHOD_H_ */
+++ /dev/null
-/*
- * Created on: May 3, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_AMQEXCEPTIONS_H_
-#define AMQPCLIENTAPI_AMQEXCEPTIONS_H_
-
-#define AMQP_CM_DECLARE_EXCEPTION_CLASS(_exclass_) \
-class AMQPCLIENT_LINKAGE _exclass_ : public Caf::CCafException { \
-public: \
- _exclass_(); \
- virtual ~_exclass_(); \
- void throwSelf(); \
- void throwAddRefedSelf(); \
-private: \
- _exclass_(const _exclass_ &); \
- _exclass_ & operator=(const _exclass_ &); \
-}; \
-typedef TCafSmartPtr<_exclass_, TCafObject<_exclass_> > SmartPtr##_exclass_
-
-#define AMQP_CM_DEFINE_EXCEPTION_CLASS(_exclass_) \
- _exclass_::_exclass_() : CCafException( #_exclass_ ) {} \
- _exclass_::~_exclass_() {} \
- void _exclass_::throwSelf() { throw this; } \
- void _exclass_::throwAddRefedSelf() { this->AddRef(); throw this; }
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @brief Exceptions defined by this library
- */
-namespace AmqpExceptions {
-
-/** @brief Unmapped AMQP exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpException);
-
-/** @brief AMQP_ERROR_TIMEOUT exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpTimeoutException);
-
-/** @brief AMQP_ERROR_NO_MEMORY exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpNoMemoryException);
-
-/** @brief AMQP_ERROR_INVALID_HANDLE exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpInvalidHandleException);
-
-/** @brief AMQP_ERROR_INVALID_ARGUMENT exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpInvalidArgumentException);
-
-/** @brief AMQP_ERROR_WRONG_STATE exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpWrongStateException);
-
-/** @brief AMQP_ERROR_TOO_MANY_CHANNELS exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpTooManyChannelsException);
-
-/** @brief AMQP_ERROR_QUEUE_FULL exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpQueueFullException);
-
-/** @brief AMQP_ERROR_FRAME_TOO_LARGE exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpFrameTooLargeException);
-
-/** @brief AMQP_ERROR_IO_ERROR exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpIoErrorException);
-
-/** @brief AMQP_ERROR_PROTOCOL_ERROR exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpProtocolErrorException);
-
-/** @brief AMQP_ERROR_UNIMPLEMENTED exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpUnimplementedException);
-
-/** @brief AMQP_ERROR_IO_INTERRUPTED exception */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpIoInterruptedException);
-
-// Processing exceptions
-
-/** @brief Unexpected frame */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(UnexpectedFrameException);
-
-/** @brief Unknown class or method */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(UnknownClassOrMethodException);
-
-/** @brief Connection is closed */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(ConnectionClosedException);
-
-/** @brief Channel is closed */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelClosedException);
-
-/** @brief Connection closed because of an error */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(ConnectionUnexpectedCloseException);
-
-/** @brief Connection closed because of an I/O error */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(ConnectionClosedByIOException);
-
-/** @brief Channel closed by server because of an error */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelClosedByServerException);
-
-/** @brief Channel closed by the application because it is shutting down */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelClosedByShutdownException);
-
-/** @brief Channel closed by the application user under normal circumstances */
-AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelClosedByUserException);
-
-}}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 4, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_ADDRESS_H_
-#define AMQPCLIENTAPI_ADDRESS_H_
-
-namespace Caf { namespace AmqpClient {
-
-/** Supported Protocols */
-typedef enum {
- PROTOCOL_AMQP = 0,
- PROTOCOL_AMQPS,
- PROTOCOL_TUNNEL
-} Protocol;
-
-/**
- * @author mdonahue
- * @brief A representation of a broker network address
- */
-class Address {
-public:
- Address();
- virtual ~Address();
-
-public:
- /**
- * @brief Construct an address from a protocol, host name, and port number
- * @param protocol the communication protocol (tcp, ssl, etc.)
- * @param host the host name or dotted ip address
- * @param port the port number
- */
- void initialize(
- const std::string& protocol,
- const std::string& host,
- const uint32& port,
- const std::string& virtualHost = std::string());
-
- /**
- * @return the protocol
- */
- Protocol getProtocol() const;
-
- /**
- * @return the protocol
- */
- std::string getProtocolStr() const;
-
- /**
- * @return the host name
- */
- std::string getHost() const;
-
- /**
- * @return the port number
- */
- uint32 getPort() const;
-
- std::string getVirtualHost() const;
-
- std::string toString() const;
-
-private:
- Protocol translateProtocol(
- const std::string& protocol,
- const std::string& host) const;
-
-private:
- bool _isInitialized;
- std::string _protocolStr;
- Protocol _protocol;
- std::string _host;
- uint32 _port;
- std::string _virtualHost;
- std::string _toString;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(Address);
-};
-CAF_DECLARE_SMART_POINTER(Address);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 14, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_AMQPCONTENTHEADERS_H_
-#define AMQPCLIENTAPI_AMQPCONTENTHEADERS_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @ingroup AmqpApi
- * @brief AMQP content header objects */
-namespace AmqpContentHeaders {
-
-/** @brief content type property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_CONTENT_TYPE_FLAG;
-/** @brief content encoding property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_CONTENT_ENCODING_FLAG;
-/** @brief headers are present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_HEADERS_FLAG;
-/** @brief delivery mode property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_DEVLIVERY_MODE_FLAG;
-/** @brief priority property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_PRIORITY_FLAG;
-/** @brief correlation id property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_CORRELATION_ID_FLAG;
-/** @brief reply to property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_REPLY_TO_FLAG;
-/** @brief expiration property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_EXPIRATION_FLAG;
-/** @brief message id property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_MESSAGE_ID_FLAG;
-/** @brief timestamp property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_TIMESTAMP_FLAG;
-/** @brief type property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_TYPE_FLAG;
-/** @brief user id property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_USER_ID_FLAG;
-/** @brief app id property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_APP_ID_FLAG;
-/** @brief cluster id property is present */
-extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_CLUSTER_ID_FLAG;
-
-/**
- * @author mdonahue
- * @ingroup AmqpApi
- * @brief Basic properties class
- * <p>
- * Review the AMQP protocol documentation for more information.
- */
-struct __declspec(novtable) BasicProperties : public ContentHeader {
- CAF_DECL_UUID("A6DEE271-36C7-4B46-8EA8-F1F0E3493FC4")
-
- /** @return are the headers available? */
- virtual bool areHeadersAvailable() = 0;
-
- /**
- * @remark
- * Use the binary 'and' (<code><b>&</b></code>) to test the flags against the
- * BASIC_PROPERTY_XXXXX_FLAGS
- * @return the bits representing the properties present in the object
- */
- virtual uint32 getFlags() = 0;
-
- /** @return the content type */
- virtual std::string getContentType() = 0;
-
- /** @brief Set the content type */
- virtual void setContentType(const std::string& contentType) = 0;
-
- /** @return the content encoding */
- virtual std::string getContentEncoding() = 0;
-
- /** @brief Set the content encoding */
- virtual void setContentEncoding(const std::string& contentEncoding) = 0;
-
- /** @return the message headers */
- virtual SmartPtrTable getHeaders() = 0;
-
- /** @brief Set the headers */
- virtual void setHeaders(const SmartPtrTable& headers) = 0;
-
- /** @return the delivery mode */
- virtual uint8 getDeliveryMode() = 0;
-
- /** @brief Set the delivery mode */
- virtual void setDeliveryMode(const uint8 deliveryMode) = 0;
-
- /** @return the priority */
- virtual uint8 getPriority() = 0;
-
- /** @brief Set the priority */
- virtual void setPriority(const uint8 priority) = 0;
-
- /** @return the correlation id */
- virtual std::string getCorrelationId() = 0;
-
- /** @brief Set the correlation id */
- virtual void setCorrelationId(const std::string& correlationId) = 0;
-
- /** @return the reply to */
- virtual std::string getReplyTo() = 0;
-
- /** @brief Set the reply to */
- virtual void setReplyTo(const std::string& replyTo) = 0;
-
- /** @return the expiration */
- virtual std::string getExpiration() = 0;
-
- /** @brief Set the expiration */
- virtual void setExpiration(const std::string& expiration) = 0;
-
- /** @return the message id */
- virtual std::string getMessageId() = 0;
-
- /** @brief Set the message id */
- virtual void setMessageId(const std::string& messageId) = 0;
-
- /** @return the timestamp */
- virtual uint64 getTimestamp() = 0;
-
- /** @brief Set the timestamp */
- virtual void setTimestamp(const uint64 timestamp) = 0;
-
- /** @return the type */
- virtual std::string getType() = 0;
-
- /** @brief set the type */
- virtual void setType(const std::string& type) = 0;
-
- /** @return the user id */
- virtual std::string getUserId() = 0;
-
- /** @brief Set the user id */
- virtual void setUserId(const std::string& userId) = 0;
-
- /** @return the app id */
- virtual std::string getAppId() = 0;
-
- /** @brief Set the app id */
- virtual void setAppId(const std::string& appId) = 0;
-
- /** @return the cluster id */
- virtual std::string getClusterId() = 0;
-
- /** @brief Set the cluster id */
- virtual void setClusterId(const std::string& clusterId) = 0;
-};
-CAF_DECLARE_SMART_POINTER(BasicProperties);
-
-/**
- * @author mdonahue
- * @ingroup AmqpApi
- * @brief Create a #Caf::AmqpClient::AmqpContentHeaders::BasicProperties object to be
- * sent with a message.
- * <p>
- * The object is created with no fields set. You must call the <code>setXXX</code>
- * methods before publishing the message.
- * @return an unpopulated basic properties object
- */
-SmartPtrBasicProperties AMQPCLIENT_LINKAGE createBasicProperties();
-
-/**
- * @author mdonahue
- * @ingroup AmqpApi
- * @brief Create an object containing #Caf::AmqpClient::AmqpContentHeaders::BasicProperties
- * to be sent with a message
- * <p>
- * Set the <code><i>flags</i></code> property to the binary 'or' (<code><b>|</b></code>) of
- * BASIC_PROPERTY_XXXX_FLAG constants representing the fields present.
- * <p>
- * Use <code><b>0</b></code>, <code><b>std::string()</b></code> or
- * <code><b>SmartPtrTable()</b></code> to skip initialization of fields not included
- * in the object.
- * @return a basic properties object
- */
-SmartPtrBasicProperties AMQPCLIENT_LINKAGE createBasicProperties(
- const uint32 flags,
- const std::string& contentType,
- const std::string& contentEncoding,
- const SmartPtrTable& headers,
- const uint8 deliveryMode,
- const uint8 priority,
- const std::string& correlationId,
- const std::string& replyTo,
- const std::string& expiration,
- const std::string& messageId,
- const uint64 timestamp,
- const std::string& type,
- const std::string& userId,
- const std::string& appId,
- const std::string& clusterId);
-}}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 10, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_AMQPMETHODS_H_
-#define AMQPCLIENTAPI_AMQPMETHODS_H_
-
-namespace Caf { namespace AmqpClient { namespace AmqpMethods {
-
-#if (1) // basic
-/**
- * @brief AMQP Basic methods
- * @ingroup AmqpApi
- */
-namespace Basic {
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the basic.get-ok method parameters
- */
-struct __declspec(novtable) GetOk : public Method {
- CAF_DECL_UUID("A3CD4488-B600-4AC6-9513-03021AC06345")
-
- /** @return the delivery tag used for basic.ack calls */
- virtual uint64 getDeliveryTag() = 0;
-
- /**
- * @retval true if the message was redelivered
- * @retval false if the message has not been redlivered
- */
- virtual bool getRedelivered() = 0;
-
- /** @return the name of the exchange supplying the message */
- virtual std::string getExchange() = 0;
-
- /** @return the message's routing key */
- virtual std::string getRoutingKey() = 0;
-
- /** @return the number of messages remaining in the queue */
- virtual uint32 getMessageCount() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(GetOk);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the basic.get-empty method parameters
- */
-struct __declspec(novtable) GetEmpty : public Method {
- CAF_DECL_UUID("6bcd3e9e-e2b1-4824-b455-acad073737c5")
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(GetEmpty);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the basic.consume-ok method parameters
- */
-struct __declspec(novtable) ConsumeOk : public Method {
- CAF_DECL_UUID("29E385DA-37FB-48E4-9F6D-463555C9DDDC")
-
- virtual std::string getConsumerTag() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(ConsumeOk);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the basic.deliver method parameters
- */
-struct __declspec(novtable) Deliver : public Method {
- CAF_DECL_UUID("2AD74C5E-CC9D-4A6C-9738-DA836BC25FCA")
-
- /** @return the <i>consumer tag</i> associated with the consumer */
- virtual std::string getConsumerTag() = 0;
-
- /** @return the delivery tag used for basic.ack calls */
- virtual uint64 getDeliveryTag() = 0;
-
- /**
- * @retval true if the message was redelivered
- * @retval false if the message has not been redlivered
- */
- virtual bool getRedelivered() = 0;
-
- /** @return the name of the exchange supplying the message */
- virtual std::string getExchange() = 0;
-
- /** @return the message's routing key */
- virtual std::string getRoutingKey() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(Deliver);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the basic.consume-ok method parameters
- */
-struct __declspec(novtable) CancelOk : public Method {
- CAF_DECL_UUID("759CEE2C-FDA5-4A2A-BFE0-617A879D05BF")
-
- /** @return the <i>consumer tag</i> associated with the consumer */
- virtual std::string getConsumerTag() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(CancelOk);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the basic.return method parameters
- */
-struct __declspec(novtable) Return : public Method {
- CAF_DECL_UUID("000A440E-AEE4-418E-B9A0-9857F5C20283")
-
- /** @return the reply code */
- virtual uint16 getReplyCode() = 0;
-
- /** @return the reply text */
- virtual std::string getReplyText() = 0;
-
- /** @return the exchnage name */
- virtual std::string getExchange() = 0;
-
- /** @return the routing key */
- virtual std::string getRoutingKey() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(Return);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the basic.recover-ok method parameters
- */
-struct __declspec(novtable) RecoverOk : public Method {
- CAF_DECL_UUID("DF71DC22-B65C-44FC-A0F4-EFAC181E2F69")
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(RecoverOk);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the basic.qos-ok method
- */
-struct __declspec(novtable) QosOk : public Method {
- CAF_DECL_UUID("D5710B1C-DE05-42F5-9695-95364C1D9468")
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(QosOk);
-
-} // namespace Basic
-#endif
-
-#if (1) // channel
-/**
- * @ingroup AmqpApi
- * @brief AMQP Channel methods
- */
-namespace Channel {
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the channel.open-ok method parameters
- */
-struct __declspec(novtable) OpenOk : public Method {
- CAF_DECL_UUID("4c027f40-db11-4a72-ac2e-cc8da89035cb")
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(OpenOk);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the channel.close method parameters
- */
-struct __declspec(novtable) Close : public Method {
- CAF_DECL_UUID("45d0c75f-ff48-4552-9a83-498efa5f6ad2")
-
- /** @return the reply code */
- virtual uint16 getReplyCode() = 0;
-
- /** @return the reply text */
- virtual std::string getReplyText() = 0;
-
- /** @return the class id of the method that caused the close */
- virtual uint16 getClassId() = 0;
-
- /** @return the method id of the method that caused the close */
- virtual uint16 getMethodId() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(Close);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the channel.close-ok method parameters
- */
-struct __declspec(novtable) CloseOk : public Method {
- CAF_DECL_UUID("DAF11BD3-06B6-4FA4-AC80-2B0959D2297D")
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(CloseOk);
-
-} // namespace Channel
-#endif
-
-#if (1) // exchange
-/**
- * @ingroup AmqpApi
- * @brief AMQP Exchange methods
- */
-namespace Exchange {
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the exchange.declare-ok method parameters
- */
-struct __declspec(novtable) DeclareOk : public Method {
- CAF_DECL_UUID("e54d9fff-7905-4e18-b1e8-090279a5cffe")
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(DeclareOk);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the exchange.delete-ok method parameters
- */
-struct __declspec(novtable) DeleteOk : public Method {
- CAF_DECL_UUID("9f13d0fb-1bdd-473a-873a-58e948bc256c")
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(DeleteOk);
-
-} // namespace Exchange
-#endif
-
-#if (1) // queue
-/**
- * @ingroup AmqpApi
- * @brief AMQP Queue methods
- */
-namespace Queue {
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the queue.declare-ok method parameters
- */
-struct __declspec(novtable) DeclareOk : public Method {
- CAF_DECL_UUID("EB96E48E-DF40-4D5F-A41F-7F4EBEBE2BE1")
-
- /** @return the name of the queue */
- virtual std::string getQueueName() = 0;
-
- /** @return the number of messages in the queue */
- virtual uint32 getMessageCount() = 0;
-
- /** @return the number of active consumers for the queue */
- virtual uint32 getConsumerCount() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(DeclareOk);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the queue.delete-ok method parameters
- */
-struct __declspec(novtable) DeleteOk : public Method {
- CAF_DECL_UUID("34f4b342-7ab0-44d5-b007-4eec141a4435")
-
- /** @return the number of messages deleted */
- virtual uint32 getMessageCount() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(DeleteOk);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the queue.delete-ok method parameters
- */
-struct __declspec(novtable) PurgeOk : public Method {
- CAF_DECL_UUID("63bcf694-5ac3-4067-8134-659133986099")
-
- /** @return the number of messages deleted */
- virtual uint32 getMessageCount() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(PurgeOk);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the queue.bind-ok method parameters
- */
-struct __declspec(novtable) BindOk : public Method {
- CAF_DECL_UUID("1a60c168-24d1-4184-a5ec-fcf9fca70994")
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(BindOk);
-
-/**
- * @ingroup AmqpApi
- * @brief Interface representing the queue.unbind-ok method parameters
- */
-struct __declspec(novtable) UnbindOk : public Method {
- CAF_DECL_UUID("edf78de1-eee4-44c0-9051-e4f6ee80c0a2")
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(UnbindOk);
-
-} // namespace Queue
-#endif
-
-}}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 4, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_CERTINFO_H_
-#define AMQPCLIENTAPI_CERTINFO_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author bwilliams
- * @brief A representation of Cert Info
- */
-class CertInfo {
-public:
- CertInfo();
- virtual ~CertInfo();
-
-public:
- void initialize(
- const std::string& caCertPath,
- const std::string& clientCertPath,
- const std::string& clientKeyPath);
-
- std::string getCaCertPath() const;
-
- std::string getClientCertPath() const;
-
- std::string getClientKeyPath() const;
-
-private:
- bool _isInitialized;
- std::string _caCertPath;
- std::string _clientCertPath;
- std::string _clientKeyPath;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CertInfo);
-};
-CAF_DECLARE_SMART_POINTER(CertInfo);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 2, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_CHANNEL_H_
-#define AMQPCLIENTAPI_CHANNEL_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApi
- * @brief Interface to an AMQP channel
- */
-struct __declspec(novtable) Channel : public ICafObject {
-
- /** @return the channel number */
- virtual uint16 getChannelNumber() = 0;
-
- /** @brief Closes the channel */
- virtual void close() = 0;
-
- /**
- * @brief Returns the state of the channel
- * @retval true the Channel is open
- * @retval false the Channel is closed
- */
- virtual bool isOpen() = 0;
-
- /**
- * @brief Acknowledge on or more messages
- * <p>
- * Acknowledges one or more messages delivered via the Deliver or
- * Get-Ok methods. The client can ask to confirm a single message or a set of
- * messages up to and including a specific message.
- *
- * @param deliveryTag the message's delivery tag
- * @param ackMultiple acknowledge multiple messages<p>
- * If set to <code><b>true</b></code>, the delivery tag is treated as "up to and
- * including", so that the client can acknowledge multiple messages with a single
- * method. If set to <code><b>false</b></code>, the delivery tag refers to a single
- * message. If the multiple field is <code><b>true</b></code>, and the delivery tag
- * is <code><b>0</b></code>, the server will acknowledge all outstanding messages.
- */
- virtual void basicAck(
- const uint64 deliveryTag,
- const bool ackMultiple) = 0;
-
- /**
- * @brief Provides a direct access to the messages in a queue
- * <p>
- * This method provides a direct access to the messages in a queue using a
- * synchronous dialogue that is designed for specific types of application where
- * synchronous functionality is more important than performance.
- *
- * @param queue the queue name
- * @param noAck no acknowledgment needed. If <code><b>true</b></code>, the server does not
- * expect acknowledgements for messages. That is, when a message is delivered to the client
- * the server assumes the delivery will succeed and immediately dequeues it. This
- * functionality may increase performance but at the cost of reliability. Messages can get
- * lost if a client dies before they are delivered to the application.
- * @return message as a GetResponse object or
- * a <code><b>null</b></code> object if there is no message available.
- */
- virtual SmartPtrGetResponse basicGet(
- const std::string& queue,
- const bool noAck) = 0;
-
- /**
- * @brief Publishes a message to a specific exchange
- * <p>
- * This method publishes a message to a specific exchange. The message will be routed
- * to queues as defined by the exchange configuration and distributed to any active
- * consumers when the transaction, if any, is committed.
- * @param exchange specifies the name of the exchange to publish to. The exchange
- * name can be empty, meaning the default exchange.
- * @param routingKey specifies the routing key for the message.
- * @param properties specifies a #Caf::AmqpClient::AmqpContentHeaders::BasicProperties
- * object containing properties and headers to publish with the message.
- * @param body specifies the message body in raw bytes.
- */
- virtual void basicPublish(
- const std::string& exchange,
- const std::string& routingKey,
- const AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body) = 0;
-
- /**
- * @brief Publishes a message to a specific exchange
- * <p>
- * This method publishes a message to a specific exchange with control over the
- * <code><i>mandatory</i></code> and <code><i>immediate</i></code> bits.
- * The message will be routed to queues as defined by the exchange configuration and
- * distributed to any active consumers when the transaction, if any, is committed.
- * @param exchange specifies the name of the exchange to publish to. The exchange
- * name can be empty, meaning the default exchange.
- * @param routingKey specifies the routing key for the message.
- * @param mandatory specifies how the server is to react if the message cannot be routed
- * to a queue. If <code><b>true</b></code>, the server will return an unroutable message
- * with a Return method. If <code><b>false</b></code>, the server silently drops the
- * message.
- * @param immediate specifies how the server is to react if the message cannot be routed
- * to a queue consumer immediately. If <code><b>true</b></code>, the server will return an
- * undeliverable message with a Return method. If <code><b>false</b></code>,
- * the server will queue the message, but with no guarantee that it will ever be
- * consumed.
- * @param properties specifies a #Caf::AmqpClient::AmqpContentHeaders::BasicProperties
- * object containing properties and headers to publish with the message.
- * @param body specifies the message body in raw bytes.
- */
- virtual void basicPublish(
- const std::string& exchange,
- const std::string& routingKey,
- const bool mandatory,
- const bool immediate,
- const AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body) = 0;
-
- /**
- * @brief Starts a queue consumer
- * <p>
- * This method asks the server to start a 'consumer', which is a transient request for
- * messages from a specific queue. Consumers last as int32 as the channel they were
- * declared on, or until the client cancels them.<br>
- * The arguments <code><i>noAck</i></code>, <code><i>noLocal</i></code> and
- * <code><i>exclusive</i></code> are <code><b>false</b></code> and the server will
- * genearate the consumer tag.
- * @param queue queue name
- * @param consumer an interface to the consumer object
- * @return a #Caf::AmqpClient::AmqpMethods::Basic::ConsumeOk object containing
- * the results of the call if successful
- */
- virtual AmqpMethods::Basic::SmartPtrConsumeOk basicConsume(
- const std::string& queue,
- const SmartPtrConsumer& consumer) = 0;
-
- /**
- * @brief Starts a queue consumer
- * <p>
- * This method asks the server to start a 'consumer', which is a transient request for
- * messages from a specific queue. Consumers last as int32 as the channel they were
- * declared on, or until the client cancels them.<br>
- * The arguments <code><i>noLocal</i></code> and <code><i>exclusive</i></code> are
- * <code><b>false</b></code> and the server will genearate the consumer tag.
- * @param queue queue name
- * @param noAck no acknowledgment needed. If <code><b>true</b></code>, the server does not
- * expect acknowledgements for messages. That is, when a message is delivered to the client
- * the server assumes the delivery will succeed and immediately dequeues it. This
- * functionality may increase performance but at the cost of reliability. Messages can get
- * lost if a client dies before they are delivered to the application.
- * @param consumer an interface to the consumer object
- * @return a #Caf::AmqpClient::AmqpMethods::Basic::ConsumeOk object containing
- * the results of the call if successful
- */
- virtual AmqpMethods::Basic::SmartPtrConsumeOk basicConsume(
- const std::string& queue,
- const bool noAck,
- const SmartPtrConsumer& consumer) = 0;
-
- /**
- * @brief Starts a queue consumer
- * <p>
- * This method asks the server to start a 'consumer', which is a transient request for
- * messages from a specific queue. Consumers last as int32 as the channel they were
- * declared on, or until the client cancels them.
- * @param queue queue name
- * @param consumerTag consumer tag (or blank to specify server-generated tag)
- * @param noAck acknowledgement flag
- * @param noLocal do not send messages to the connection that published them
- * @param exclusive request exclusive consumer access to the queue
- * @param consumer an interface to the consumer object
- * @param arguments a set of arguments for the declaration. The syntax of these
- * arguments depends on the server implementation.
- * @return a #Caf::AmqpClient::AmqpMethods::Basic::ConsumeOk object containing
- * the results of the call if successful
- */
- virtual AmqpMethods::Basic::SmartPtrConsumeOk basicConsume(
- const std::string& queue,
- const std::string& consumerTag,
- const bool noAck,
- const bool noLocal,
- const bool exclusive,
- const SmartPtrConsumer& consumer,
- const SmartPtrTable& arguments = SmartPtrTable()) = 0;
-
- /**
- * @brief Cancels a consumer
- * <p>
- * This method cancels a consumer. This does not affect already delivered messages,
- * but it does mean the server will not send any more messages for that consumer.
- * The client may receive an arbitrary number of messages in between sending the cancel
- * method and receiving the cancel.ok reply.
- * @param consumerTag consumer tag to cancel
- * @return a #Caf::AmqpClient::AmqpMethods::Basic::CancelOk object containing
- * the results of the call if successful
- */
- virtual AmqpMethods::Basic::SmartPtrCancelOk basicCancel(
- const std::string& consumerTag) = 0;
-
- /**
- * @brief Redeliver unacknowledged messages
- * <p>
- * This method asks the server to redeliver all unacknowledged message on the channel.
- * Zero or more messages may be redelivered.
- * @param requeue if <code><b>false</b></code> then the message will be redelivered to
- * the original receipient. If <code><b>true</b></code> then the server will attempt to
- * requeue the message, potentially delivering it to an alternate subscriber.
- * @return a #Caf::AmqpClient::AmqpMethods::Basic::RecoverOk object containing the
- * results of the call if successful
- */
- virtual AmqpMethods::Basic::SmartPtrRecoverOk basicRecover(
- const bool requeue) = 0;
-
- /**
- * @brief Specifies quality of service
- * <p>
- * This method requests a specific quality of service. The QoS can be specified for
- * the current channel or for all channels on the connection. The particular properties
- * and semantics of a qos method always depend on the content class semantics.
- * @param prefetchSize prefetch window in octets. The client can request that messages
- * be sent in advance so that when the client finishes processing a message,
- * the following message is already help locally, rather than needing to be sent down
- * the channel. Prefetching gives a performance improvement. This field specifies the
- * prefetch window size in octets. The server will send a message in advance if it is
- * equal to or smaller in size than the available prefetch size (and also falls into
- * other prefetch limits). May be set to zero, meaning 'no specific limit', although
- * other prefetch limits may still apply. The prefetch-size is ignored if the no-ack
- * option is set.
- * @param prefetchCount prefetch window in messages. This field may be used in combination
- * with the <i>prefetchSize</i> field; a message will only be sent in advance if both
- * prefetch windows (and those at the channel and connection level) allow it. The
- * prefetch-count is ignored if the no-ack option is set.
- * @param global apply to entire connection
- * @return
- */
- virtual AmqpMethods::Basic::SmartPtrQosOk basicQos(
- const uint32 prefetchSize,
- const uint32 prefetchCount,
- const bool global) = 0;
-
- /**
- * @brief Reject an incoming message
- * <p>
- * This method allows a client to reject a message. It can be used to interrupt and
- * cancel large incoming messages, or return un-treatable messages to their original
- * queue.
- * @param deliveryTag the delivery tag of the message
- * @param requeue if <code><b>true</b></code>, the server will attempt to requeue
- * the message. If <code><b>false</b></code> or the requeue attempt fails the
- * message is discarded or dead-lettered.
- */
- virtual void basicReject(
- const uint64 deliveryTag,
- const bool requeue) = 0;
-
- /**
- * @brief Creates an exchange
- * <p>
- * This method creates an exchange if it does not already exist, and if the exchange
- * exists, verifies that it is of the correct and expected class.
- * @param exchange exchange name
- * @param type exchange type
- * @param durable request a durable exchange
- * @param arguments a set of agrguments for the declaration. The syntax of these
- * arguments depends on the server implementation.
- * @return a #Caf::AmqpClient::AmqpMethods::Exchange::DeclareOk object containing
- * the results of the call if successful
- */
- virtual AmqpMethods::Exchange::SmartPtrDeclareOk exchangeDeclare(
- const std::string& exchange,
- const std::string& type,
- const bool durable = false,
- const SmartPtrTable& arguments = SmartPtrTable()) = 0;
-
- /**
- * @brief Deletes an exchange
- * <p>
- * This method deletes an exchange. When an exchange is deleted all queue bindings on
- * the exchange are cancelled.
- * @param exchange exchange name
- * @param ifUnused delete only if unused. If <code><b>true</b></code>, the server
- * will only delete the exchange if it has no queue bindings. If the exchange has
- * queue bindings the server does not delete it but raises a channel exception
- * instead.
- * @return a #Caf::AmqpClient::AmqpMethods::Exchange::DeleteOk object containing
- * the results of the call if successful
- */
- virtual AmqpMethods::Exchange::SmartPtrDeleteOk exchangeDelete(
- const std::string& exchange,
- const bool ifUnused) = 0;
-
- /**
- * @brief Creates a queue using default parameters
- * <p>
- * The defaults are:
- * <table border="1">
- * <tr>
- * <th>Parameter</th><th>Value</th>
- * </tr>
- * <tr><td>queue</td><td>blank - the server will generate a queue name</td></tr>
- * <tr><td>durable</td><td>false - the queue will not be durable</td></tr>
- * <tr><td>exclusive</td><td>true - the queue will be exclusive to this conenction</td></tr>
- * <tr><td>autoDelete</td><td>true - the queue will be deleted when no longer used</td></tr>
- * </table>
- * @return a #Caf::AmqpClient::AmqpMethods::Queue::DeclareOk object containing
- * the results of the call if successful. This object must be examined to retrieve
- * the name of the queue generated by the server.
- */
- virtual AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare() = 0;
-
- /**
- * @brief Creates or checks a queue
- * <p>
- * @param queue queue name. If blank the server will generate a name.
- * @param durable request a durable queue
- * @param exclusive request an exclusive queue
- * @param autoDelete request that the queue be deleted when no longer in use
- * @param arguments a set of agrguments for the declaration. The syntax of these
- * arguments depends on the server implementation.
- * @return a #Caf::AmqpClient::AmqpMethods::Queue::DeclareOk object containing
- * the results of the call if successful. This object must be examined to retrieve
- * the name of the queue generated by the server if the queue name was blank in
- * the call.
- */
- virtual AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare(
- const std::string& queue,
- const bool durable,
- const bool exclusive,
- const bool autoDelete,
- const SmartPtrTable& arguments = SmartPtrTable()) = 0;
-
- /**
- * @brief Declare a queue passively; i.e. check if it exists.
- * <p>
- * @param queue queue name.
- */
- virtual AmqpMethods::Queue::SmartPtrDeclareOk queueDeclarePassive(
- const std::string& queue) = 0;
-
- /**
- * @brief Deletes a queue
- * <p>
- * This method deletes a queue. When a queue is deleted any pending messages are
- * sent to a dead­-letter queue if this is defined in the server configuration,
- * and all consumers on the queue are cancelled.
- * @param queue queue name
- * @param ifUnused delete only if unused. If <code><b>true</b></code>, the server
- * will only delete the queue if it has no consumers. If the queue has consumers the
- * server does does not delete it but raises a channel exception instead.
- * @param ifEmpty delete only if empty. If <code><b>true</b></code>, the server will
- * only delete the queue if it has no messages. If the queue has messages the
- * server does does not delete it but raises a channel exception instead.
- * @return a #Caf::AmqpClient::AmqpMethods::Queue::DeleteOk object containing the
- * result of the call if successful.
- */
- virtual AmqpMethods::Queue::SmartPtrDeleteOk queueDelete(
- const std::string& queue,
- const bool ifUnused,
- const bool ifEmpty) = 0;
-
- /**
- * @brief Purges a queue
- * <p>
- * This method removes all messages from a queue which are not awaiting
- * acknowledgment.
- * @param queue queue name
- * @return a #Caf::AmqpClient::AmqpMethods::Queue::PurgeOk containing the result
- * of the call if successful.
- */
- virtual AmqpMethods::Queue::SmartPtrPurgeOk queuePurge(
- const std::string& queue) = 0;
-
- /**
- * @brief Binds a queue to an exchange
- * <p>
- * This method binds a queue to an exchange. Until a queue is bound it will not
- * receive any messages.
- * @param queue queue name
- * @param exchange exchange name
- * @param routingKey message routing key
- * @param arguments a set of agrguments for the binding. The syntax of these
- * arguments depends on the server implementation.
- * @return a #Caf::AmqpClient::AmqpMethods::Queue::BindOk containing the result
- * of the call if successful.
- */
- virtual AmqpMethods::Queue::SmartPtrBindOk queueBind(
- const std::string& queue,
- const std::string& exchange,
- const std::string& routingKey,
- const SmartPtrTable& arguments = SmartPtrTable()) = 0;
-
- /**
- * @brief Unbinds a queue from an exchange
- * @param queue queue name
- * @param exchange exchange name
- * @param routingKey message routing key
- * @param arguments a set of agrguments for the binding. The syntax of these
- * arguments depends on the server implementation.
- * @return a #Caf::AmqpClient::AmqpMethods::Queue::UnbindOk containing the result
- * of the call if successful.
- */
- virtual AmqpMethods::Queue::SmartPtrUnbindOk queueUnbind(
- const std::string& queue,
- const std::string& exchange,
- const std::string& routingKey,
- const SmartPtrTable& arguments = SmartPtrTable()) = 0;
-
- /**
- * @brief Adds a {@link ReturnListener} to the channel
- * @param listener the {@link ReturnListener} object to add
- */
- virtual void addReturnListener(
- const SmartPtrReturnListener& listener) = 0;
-
- /**
- * @brief Removes a {@link ReturnListener} from the channel
- * @param listener the {@link ReturnListener} to remove
- */
- virtual bool removeReturnListener(
- const SmartPtrReturnListener& listener) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(Channel);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 2, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_CONNECTION_H_
-#define AMQPCLIENTAPI_CONNECTION_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApi
- * @brief Interface to an AMQP connection.
- */
-struct __declspec(novtable) Connection : public ICafObject {
- /**
- * @brief Create a new channel
- * @return a Channel
- */
- virtual SmartPtrChannel createChannel() = 0;
-
- /**
- * @brief Close a channel
- * @param channel the Channel to close
- */
- virtual void closeChannel(const SmartPtrChannel& channel) = 0;
-
- /**
- * @brief Closes the connection and its channels
- */
- virtual void close() = 0;
-
- /**
- * @brief Return the state of the connection
- * @retval true the connection is open
- * @retval false the connection is closed
- */
- virtual bool isOpen() = 0;
-};
-
-CAF_DECLARE_SMART_INTERFACE_POINTER(Connection);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 4, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_CONNECTIONFACTORY_H_
-#define AMQPCLIENTAPI_CONNECTIONFACTORY_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApi
- * @brief Interface to a convenience factory class to facilitate opening a
- * #Caf::AmqpClient::Connection to an AMQP broker.
- * <p>
- * ConnectionFactories are creating using the #Caf::AmqpClient::createConnectionFactory method.
- */
-struct __declspec(novtable) ConnectionFactory : public ICafObject {
-
- /**
- * @return the default protocol to use for connections
- */
- virtual std::string getProtocol() const = 0;
-
- /**
- * @brief Set the default protocol for connections
- * @param protocol the default protocol for connections
- */
- virtual void setProtocol(const std::string& protocol) = 0;
-
- /**
- * @return the default host to use for connections
- */
- virtual std::string getHost() const = 0;
-
- /**
- * @brief Set the default host for connections
- * @param host the default host for connections
- */
- virtual void setHost(const std::string& host) = 0;
-
- /**
- * @return the default port to use for connections
- */
- virtual uint32 getPort() const = 0;
-
- /**
- * @brief Set the default port for connections
- * @param port the default port for connections
- */
- virtual void setPort(const uint32 port) = 0;
-
- /**
- * @return the default virtual host to use for connections
- */
- virtual std::string getVirtualHost() const = 0;
-
- /**
- * @brief Set the default virtual host for connections
- * @param virtualHost the default virtual host for connections
- */
- virtual void setVirtualHost(const std::string& virtualHost) = 0;
-
- /**
- * @return the default user name to use for connections
- */
- virtual std::string getUsername() const = 0;
-
- /**
- * @brief Set the default user name for connections
- * @param username the default user name for connections
- */
- virtual void setUsername(const std::string& username) = 0;
-
- /**
- * @return the default password to use for connections
- */
- virtual std::string getPassword() const = 0;
-
- /**
- * @brief Set the default password for connections
- * @param password the default password for connections
- */
- virtual void setPassword(const std::string& password) = 0;
-
- /**
- * @return the default CaCertPath to use for connections
- */
- virtual std::string getCaCertPath() const = 0;
-
- /**
- * @brief Set the default CaCertPath for connections
- * @param caCertPath the default CaCertPath for connections
- */
- virtual void setCaCertPath(const std::string& caCertPath) = 0;
-
- /**
- * @return the default ClientCertPath to use for connections
- */
- virtual std::string getClientCertPath() const = 0;
-
- /**
- * @brief Set the default ClientCertPath for connections
- * @param clientCertPath the default ClientCertPath for connections
- */
- virtual void setClientCertPath(const std::string& clientCertPath) = 0;
-
- /**
- * @return the default ClientKeyPath to use for connections
- */
- virtual std::string getClientKeyPath() const = 0;
-
- /**
- * @brief Set the default ClientKeyPath for connections
- * @param clientKeyPath the default ClientKeyPath for connections
- */
- virtual void setClientKeyPath(const std::string& clientKeyPath) = 0;
-
- /**
- * @return the initially requested maximum channel number; zero for unlimited
- */
- virtual uint32 getRequestedChannelMax() const = 0;
-
- /**
- * @brief Set the requested maximum channel number
- * @param requestedChannelMax the initially requested maximum channel number; zero for unlimited
- */
- virtual void setRequestedChannelMax(const uint32 requestedChannelMax) = 0;
-
- /**
- * @return the initially requested maximum frame size; zero for unlimited
- */
- virtual uint32 getRequestedFrameMax() const = 0;
-
- /**
- * @brief Set the requested maximum frame size
- * @param requestedFrameMax the initially requested maximum frame size; zero for unlimited
- */
- virtual void setRequestedFrameMax(const uint32 requestedFrameMax) = 0;
-
- /**
- * @return the initially requested heartbeat interval, in seconds; zero for none
- */
- virtual uint32 getRequestedHeartbeat() const = 0;
-
- /**
- * @brief Set the requested heartbeat interval
- * @param requestedHeartbeat the initially requested heartbeat interval, in seconds; zero for none
- */
- virtual void setRequestedHeartbeat(const uint32 requestedHeartbeat) = 0;
-
- /**
- * @return the connection timeout, in milliseconds; zero for infinite
- */
- virtual uint32 getConnectionTimeout() const = 0;
-
- /**
- * @brief Set the connection timeout
- * @param connectionTimeout connection establishment timeout in milliseconds; zero for infinite
- */
- virtual void setConnectionTimeout(const uint32 connectionTimeout) = 0;
-
- /**
- * @return the number of connection consumer processing threads
- */
- virtual uint32 getConsumerThreadCount() const = 0;
-
- /**
- * @brief Set the number of connection consumer processing threads
- * @param threadCount the number of connection consumer processing threads
- */
- virtual void setConsumerThreadCount(const uint32 threadCount) = 0;
-
- /**
- * @return the number of connection retries
- */
- virtual uint16 getRetries() const = 0;
-
- /**
- * @brief Set the number of connection retries
- * @param retries the number of connection retries
- */
- virtual void setRetries(const uint16 retries) = 0;
-
- /**
- * @return the number of connection seconds to wait
- */
- virtual uint16 getSecondsToWait() const = 0;
-
- /**
- * @brief Set the number of connection retries
- * @param seconds the number of connection seconds to wait
- */
- virtual void setSecondsToWait(const uint16 seconds) = 0;
-
- /**
- * @brief Create a new broker connection
- * @return a #Caf::AmqpClient::Connection interface to the connection
- */
- virtual SmartPtrConnection newConnection() = 0;
-
- /**
- * @brief Create a new broker connection
- * @param address broker address to try
- * @return a #Caf::AmqpClient::Connection interface to the connection
- */
- virtual SmartPtrConnection newConnection(
- const SmartPtrAddress& address,
- const SmartPtrCertInfo& certInfo) = 0;
-};
-
-CAF_DECLARE_SMART_INTERFACE_POINTER(ConnectionFactory);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 21, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CONSUMER_H_
-#define CONSUMER_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApi
- * @brief Interface for application callback objects to receive notifications and messages
- * from a queue by subscription.
- * <p>
- * The methods of this interface are invoked in a dispatch thread which is separate from the
- * {@link Connection}'s thread. This allows {@link Consumer}s to call {@link Channel} or
- * {@link Connection} methods without causing a deadlock.
- */
-struct __declspec(novtable) Consumer : public ICafObject {
-
- /**
- * @brief Called when the consumer is registered by a call to any of the
- * {@link Channel#basicConsume} methods
- * @param consumerTag the <i>consumer tag</i> associated with the consumer
- */
- virtual void handleConsumeOk(
- const std::string& consumerTag) = 0;
-
- /**
- * @brief Called when the consumer is cancelled by a call to {@link Channel#basicCancel}.
- * @param consumerTag the <i>consumer tag</i> associated with the consumer
- */
- virtual void handleCancelOk(
- const std::string& consumerTag) = 0;
-
- /**
- * @brief Called when a <code><b>basic.recover-ok</b></code> is received.
- * @param consumerTag the <i>consumer tag</i> associated with the consumer
- */
- virtual void handleRecoverOk(
- const std::string& consumerTag) = 0;
-
- /**
- * @brief Called when a <code><b>basic.deliver</b></code> is received for this consumer.
- * @param consumerTag the <i>consumer tag</i> associated with the consumer
- * @param envelope message envelope
- * @param properties message properties and headers
- * @param body message body
- */
- virtual void handleDelivery(
- const std::string& consumerTag,
- const SmartPtrEnvelope& envelope,
- const AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body) = 0;
-
- /**
- * @brief Called when the channel has been shut down.
- * @param consumerTag the <i>consumer tag</i> associated with the consumer
- * @param reason the reason for the shut down
- */
- virtual void handleShutdown(
- const std::string& consumerTag,
- SmartPtrCCafException& reason) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(Consumer);
-
-}}
-
-#endif /* CONSUMER_H_ */
+++ /dev/null
-/*
- * Created on: May 11, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_CONTENTHEADER_H_
-#define AMQPCLIENTAPI_CONTENTHEADER_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApi
- * @brief Base interface for all AMQP content headers
- */
-struct __declspec(novtable) ContentHeader : public ICafObject {
-
- /** @return the content header class id */
- virtual uint16 getClassId() = 0;
-
- /** @return the content header friendly class name */
- virtual std::string getClassName() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(ContentHeader);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_ENVELOPE_H_
-#define AMQPCLIENTAPI_ENVELOPE_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApi
- * @brief An interface to objects that group together basic.get-ok message properties
- */
-struct __declspec(novtable) Envelope : public ICafObject {
- CAF_DECL_UUID("ce68d68a-6973-49e2-a003-cb4474624f5c")
-
- /** @return the delivery tag */
- virtual uint64 getDeliveryTag() = 0;
-
- /**
- * @retval <code><b>true</b></code> if the message was redelivered
- * @retval <code><b>false</b></code> if the message has not been redelivered
- */
- virtual bool getRedelivered() = 0;
-
- /** @return the name of the exchange supplying the message */
- virtual std::string getExchange() = 0;
-
- /** @return the message's routing key */
- virtual std::string getRoutingKey() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(Envelope);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_GETRESPONSE_H_
-#define AMQPCLIENTAPI_GETRESPONSE_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApi
- * @brief Interface representing the bundling of basic.get messages into a nicer form
- */
-struct __declspec(novtable) GetResponse : public ICafObject {
- CAF_DECL_UUID("c8bda284-7eea-46e1-b9c3-791310d69b04")
-
- /** @return the message envelope information (#Caf::AmqpClient::Envelope) */
- virtual SmartPtrEnvelope getEnvelope() = 0;
-
- /** @return the message properties (#Caf::AmqpClient::AmqpContentHeaders::BasicProperties) */
- virtual AmqpContentHeaders::SmartPtrBasicProperties getProperties() = 0;
-
- /** @return the message body raw bytes */
- virtual SmartPtrCDynamicByteArray getBody() = 0;
-
- /** @return the number of messages in the queue */
- virtual uint32 getMessageCount() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(GetResponse);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 10, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_METHOD_H_
-#define AMQPCLIENTAPI_METHOD_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApi
- * @brief Base interface to AMQP methods
- */
-struct __declspec(novtable) Method : public ICafObject {
-
- /** @return the method's class ID */
- virtual uint16 getProtocolClassId() = 0;
-
- /** @return the method's method ID */
- virtual uint16 getProtocolMethodId() = 0;
-
- /** @return the method's friendly name */
- virtual std::string getProtocolMethodName() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(Method);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 21, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef RETURNLISTENER_H_
-#define RETURNLISTENER_H_
-
-namespace Caf { namespace AmqpClient {
-
-/**
- * @author mdonahue
- * @ingroup AmqpApi
- * @brief Interface for objects that will be notified of failed message deliveries
- * <p>
- * When {@link Channel#basicPublish} is used with the <i>mandatory</i> and/or <i>immediate</i>
- * flags set and the message cannot be delivered, the server will response with a
- * <code><b>basic.return</b></code> method call. {@link ReturnListener}s can monitor
- * these failed messages.
- */
-struct __declspec(novtable) ReturnListener : public ICafObject {
- CAF_DECL_UUID("FEB38A27-6338-4BDB-AA0E-527322A2393B")
-
- /**
- * @brief Callback receiving the failed message
- * @param replyCode server reply code
- * @param replyText server reply text
- * @param exchange exchange on which error occured
- * @param routingKey routing key for the message that failed
- * @param properties original message properties
- * @param body original message body
- */
- virtual void handleReturn(
- const uint16 replyCode,
- const std::string& replyText,
- const std::string& exchange,
- const std::string& routingKey,
- const AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(ReturnListener);
-
-}}
-
-#endif /* RETURNLISTENER_H_ */
+++ /dev/null
-/*
- * Created on: May 3, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPCLIENTAPI_H_
-#define AMQPCLIENTAPI_H_
-
-#include "../AmqpClientLink.h"
-
-/**
- * @defgroup AmqpApi AMQP API
- * Documentaiton for the classes, methods and constants that can be
- * used directly by applications to work with the AMQP protocol as a client.
- */
-namespace Caf { namespace AmqpClient {
-
-/** Default user name */
-extern const char* DEFAULT_USER;
-
-/** Default password */
-extern const char* DEFAULT_PASS;
-
-/** Default virtual host */
-extern const char* DEFAULT_VHOST;
-
-/** Default protocol */
-extern const char* DEFAULT_PROTOCOL;
-
-/** Default host */
-extern const char* DEFAULT_HOST;
-
-/** Default maximum channel number; zero for maximum */
-static const uint32 DEFAULT_CHANNEL_MAX = 0;
-
-/** Default maximum frame size; zero for maximum */
-static const uint32 DEFAULT_FRAME_MAX = 131072;
-
-/** Default maximum heartbeat rate; zero for none */
-static const uint32 DEFAULT_HEARTBEAT = 0;
-
-/** 'Use the default port' port */
-static const uint32 USE_DEFAULT_PORT = UINT_MAX;
-
-/** The default non-ssl port */
-static const uint32 DEFAULT_AMQP_PORT = 5672;
-
-/** The default ssl port */
-static const uint32 DEFAULT_AMQP_SSL_PORT = 5671;
-
-/** The default connection timeout; zero means wait indefinately */
-static const uint32 DEFAULT_CONNECTION_TIMEOUT = 0;
-
-/** The default number of connection consumer threads */
-static const uint32 DEFAULT_CONSUMER_THREAD_COUNT = 10;
-
-/** The default number of basic.deliver messages to process in a single run of a channel consumer thread */
-static const uint32 DEFAULT_CONSUMER_THREAD_MAX_DELIVERY_COUNT = 100;
-
-/** The default number of times a connection open will be retried*/
-static const uint16 DEFAULT_CONNECTION_RETRIES = 5;
-
-/** The default number of seconds we will wait for each connection open attempt. 0 means wait indefinitely*/
-static const uint16 DEFAULT_CONNECTION_SECONDS_TO_WAIT = 30;
-
-/**
- * @author mdonahue
- * @brief Object that maps a c-api AMQP field into a lifetime-managed GVariant
- */
-struct __declspec(novtable) Field : public ICafObject {
- /**
- * @brief Field value types
- */
- typedef enum {
- /** @brief internal value representing Not Set */
- AMQP_FIELD_TYPE_NOTSET,
- /** @brief boolean */
- AMQP_FIELD_TYPE_BOOLEAN,
- /** @brief signed 8-bit integer */
- AMQP_FIELD_TYPE_I8,
- /** @brief unsigned 8-bit integer */
- AMQP_FIELD_TYPE_U8,
- /** @brief signed 16-bit integer */
- AMQP_FIELD_TYPE_I16,
- /** @brief unsigned 16-bit integer */
- AMQP_FIELD_TYPE_U16,
- /** @brief signed 32-bit integer */
- AMQP_FIELD_TYPE_I32,
- /** @brief unsigned 32-bit integer */
- AMQP_FIELD_TYPE_U32,
- /** @brief signed 64-bit integer */
- AMQP_FIELD_TYPE_I64,
- /** @brief unsigned 64-bit integer */
- AMQP_FIELD_TYPE_U64,
- /** @brief 32-bit float */
- AMQP_FIELD_TYPE_F32,
- /** @brief 64-bit double */
- AMQP_FIELD_TYPE_F64,
- /** @brief UTF8-encoded text */
- AMQP_FIELD_TYPE_UTF8,
- /** @brief NOT SUPPORTED */
- AMQP_FIELD_TYPE_ARRAY,
- /** @brief NOT SUPPORTED */
- AMQP_FIELD_TYPE_BYTES,
- /** @brief NOT SUPPORTED */
- AMQP_FIELD_TYPE_DECIMAL,
- /** @brief NOT SUPPORTED */
- AMQP_FIELD_TYPE_TIMESTAMP,
- /** @brief NOT SUPPORTED */
- AMQP_FIELD_TYPE_TABLE,
- /** @brief NOT SUPPORTED */
- AMQP_FIELD_TYPE_VOID
- } AmqpFieldType;
-
- /**
- * @return the field type
- */
- virtual AmqpFieldType getAmqpType() const = 0;
- /**
- * @return the field value as a GVariant
- */
- virtual GVariant* getValue() const = 0;
- /**
- * @brief Set the field type and value
- * @param type field type
- * @param value field value. <code><b>DO NOT increment the reference count
- * before calling this method.</b></code> This object will take ownership of
- * the GVariant and will call g_variant_unref upon value reassignment or destruction.
- */
- virtual void setTypeAndValue(AmqpFieldType type, GVariant *value) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(Field);
-/** @brief A map of field names to field objects */
-typedef std::map<std::string, SmartPtrField> Table;
-CAF_DECLARE_SMART_POINTER(Table);
-
-/**
- * @brief Add a boolean value to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddBoolean(
- const std::string key,
- const bool val,
- SmartPtrTable& table);
-
-/**
- * @brief Add a signed 8-bit value to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddInt8(
- const std::string key,
- const int8 val,
- SmartPtrTable& table);
-
-/**
- * @brief Add a unsigned 8-bit value to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddUint8(
- const std::string key,
- const uint8 val,
- SmartPtrTable& table);
-
-/**
- * @brief Add a signed 16-bit value to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddInt16(
- const std::string key,
- const int16 val,
- SmartPtrTable& table);
-
-/**
- * @brief Add a unsigned 16-bit value to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddUint16(
- const std::string key,
- const uint16 val,
- SmartPtrTable& table);
-
-/**
- * @brief Add a signed 32-bit value to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddInt32(
- const std::string key,
- const int32 val,
- SmartPtrTable& table);
-
-/**
- * @brief Add a unsigned 32-bit value to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddUint32(
- const std::string key,
- const uint32 val,
- SmartPtrTable& table);
-
-/**
- * @brief Add a signed 64-bit value to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddInt64(
- const std::string key,
- const int64 val,
- SmartPtrTable& table);
-
-/**
- * @brief Add a unsigned 64-bit value to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddUint64(
- const std::string key,
- const uint64 val,
- SmartPtrTable& table);
-
-/**
- * @brief Add a float value to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddFloat(
- const std::string key,
- const float val,
- SmartPtrTable& table);
-
-/**
- * @brief Add a double value to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddDouble(
- const std::string key,
- const double val,
- SmartPtrTable& table);
-
-/**
- * @brief Add UTF8-encoded text to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddUtf8(
- const std::string key,
- const std::string& val,
- SmartPtrTable& table);
-
-/**
- * @brief Add a time stamp (unsigned 64-bit integer) to a field table
- * @param key the field key
- * @param val the value
- * @param table the table to insert the field into
- */
-void AMQPCLIENT_LINKAGE tableAddTimestamp(
- const std::string key,
- const uint64 val,
- SmartPtrTable& table);
-}}
-
-#include "AMQExceptions.h"
-#include "Address.h"
-#include "CertInfo.h"
-#include "Method.h"
-#include "AmqpMethods.h"
-#include "ContentHeader.h"
-#include "AmqpContentHeaders.h"
-#include "Envelope.h"
-#include "GetResponse.h"
-#include "Consumer.h"
-#include "ReturnListener.h"
-#include "Channel.h"
-#include "Connection.h"
-#include "ConnectionFactory.h"
-
-namespace Caf {
-
-/**
- * @brief CAF AMQP Client Library
- */
-namespace AmqpClient {
-
-/**
- * @ingroup AmqpApi
- * @brief Create a new #Caf::AmqpClient::ConnectionFactory
- * @return a #Caf::AmqpClient::ConnectionFactory interface to a new connection factory
- */
-SmartPtrConnectionFactory AMQPCLIENT_LINKAGE createConnectionFactory();
-
-}}
-
-#endif
+++ /dev/null
-#!/bin/sh
-set -e
-if [ "" = "$CAF_WEB_SERVER" ]; then
- CAFWEBSVR=10.25.57.32
- echo 'Using default CAFWEBSVR address'
-fi
-echo 'CAFWEBSVR='${CAFWEBSVR}
-doxygen Doxyfile
-ssh autodb@$CAFWEBSVR mkdir -p caf-downloads/doxy/communication/amqpClientApi
-ssh autodb@$CAFWEBSVR rm -rf caf-downloads/doxy/communication/amqpClientApi/*
-scp -r html/* autodb@$CAFWEBSVR:caf-downloads/doxy/communication/amqpClientApi
+++ /dev/null
-/*
- * Created on: May 24, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_ABSTRACTCONNECTIONFACTORY_H_
-#define AMQPINTEGRATIONCORE_ABSTRACTCONNECTIONFACTORY_H_
-
-#include "ConnectionFactory.h"
-#include "SimpleConnection.h"
-#include "CompositeConnectionListener.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-class AMQPINTEGRATIONCORE_LINKAGE AbstractConnectionFactory : public ConnectionFactory {
-public:
- AbstractConnectionFactory();
- virtual ~AbstractConnectionFactory();
-
- /**
- * @brief Initialize the connection factory
- * @param amqpConnectionFactory the underlying Caf::AmqpClient::ConnectionFactory object
- */
- void init(const AmqpClient::SmartPtrConnectionFactory& amqpConnectionFactory);
-
- virtual void setConnectionListeners(const std::deque<SmartPtrConnectionListener>& listeners);
-
- /**
- * @brief Set the default protocol for connections
- * @param protocol the default protocol for connections
- */
- void setProtocol(const std::string& protocol);
-
- /**
- * @brief Set the default host for connections
- * @param host the default host for connections
- */
- void setHost(const std::string& host);
-
- /**
- * @brief Set the default port for connections
- * @param port the default port for connections
- */
- void setPort(const uint32 port);
-
- /**
- * @brief Set the default host for connections
- * @param virtualHost the default host for connections
- */
- void setVirtualHost(const std::string& virtualHost);
-
- /**
- * @brief Set the default user name for connections
- * @param username the default user name for connections
- */
- void setUsername(const std::string& username);
-
- /**
- * @brief Set the default password for connections
- * @param password the default password for connections
- */
- void setPassword(const std::string& password);
-
- /**
- * @brief Set the default CaCertPath for connections
- * @param caCertPath the default CaCertPath for connections
- */
- void setCaCertPath(const std::string& caCertPath);
-
- /**
- * @brief Set the default ClientCertPath for connections
- * @param clientCertPath the default ClientCertPath for connections
- */
- void setClientCertPath(const std::string& clientCertPath);
-
- /**
- * @brief Set the default ClientKeyPath for connections
- * @param clientKeyPath the default ClientKeyPath for connections
- */
- void setClientKeyPath(const std::string& clientKeyPath);
-
- /**
- * @brief Set the number of connection retries
- * @param retries
- */
- void setRetries(const uint16 retries);
-
- /**
- * @brief Set the wait period in seconds
- * @param seconds
- */
- void setSecondsToWait(const uint16 seconds);
-
- /**
- * @brief Set the connection timeout
- * @param connectionTimeout connection establishment timeout in milliseconds; zero for infinite
- */
- void setConnectionTimeout(const uint32 connectionTimeout);
-
-public: // ConnectionFactory
- virtual SmartPtrConnection createConnection() = 0;
- std::string getProtocol();
- std::string getHost();
- uint32 getPort();
- std::string getVirtualHost();
- std::string getUsername();
- std::string getPassword();
- std::string getCaCertPath();
- std::string getClientCertPath();
- std::string getClientKeyPath();
- uint16 getRetries();
- uint16 getSecondsToWait();
- virtual void addConnectionListener(const SmartPtrConnectionListener& listener);
-
-protected:
- std::string getDefaultProtocol();
-
- std::string getDefaultHostName();
-
- SmartPtrConnection createBareConnection();
-
- SmartPtrConnectionListener getConnectionListener();
-
-private:
- bool _isInitialized;
- AmqpClient::SmartPtrConnectionFactory _amqpConnectionFactory;
- SmartPtrCompositeConnectionListener _connectionListener;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(AbstractConnectionFactory);
-};
-CAF_DECLARE_SMART_POINTER(AbstractConnectionFactory);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: Jun 12, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_AMQPADMIN_H_
-#define AMQPINTEGRATIONCORE_AMQPADMIN_H_
-
-#include "Exchange.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @brief Specifies a basic set of AMQP administrative operations for AMQP > 0.8
- */
-struct __declspec(novtable) AmqpAdmin : public ICafObject {
- CAF_DECL_UUID("B10A94BC-0CC7-476F-A38A-2794CF98D74C")
-
- /**
- * @brief Declare an exchange
- * @param exchange the exchange (#Caf::AmqpIntegration::Exchange) to declare
- */
- virtual void declareExchange(SmartPtrExchange exchange) = 0;
-
- /**
- * @brief Delete an exchange
- * @param exchange the name of the exchange
- * @retval true the exchange existed and was deleted
- * @retval false the exchange did not exists or could not be deleted
- */
- virtual bool deleteExchange(const std::string& exchange) = 0;
-
- /**
- * @brief Declare a queue whose name is automatically generated.
- * <p>
- * The queue is created with durable=false, exclusive=true and auto-delete=true.
- * @return the created queue. Call #Caf::AmqpIntegration::Queue::getName to
- * get the server-generated name of the queue.
- */
- virtual SmartPtrQueue declareQueue() = 0;
-
- /**
- * @brief Declare a queue
- * @param queue the queue to declare
- */
- virtual void declareQueue(SmartPtrQueue queue) = 0;
-
- /**
- * @brief Delete a queue without regard for whether it is in use or has messages in it
- * @param queue the name of the queue
- * @retval true the queue existed and was deleted
- * @retval false the queue did not exist or could not be deleted
- */
- virtual bool deleteQueue(const std::string& queue) = 0;
-
- /**
- * @brief Delete a queue
- * @param queue the name of the queue
- * @param unused <b>true</b> if the queue should be deleted only if not in use
- * @param empty <b>true</b> if the queue shoudl be deleted only if empty
- */
- virtual void deleteQueue(
- const std::string& queue,
- const bool unused,
- const bool empty) = 0;
-
- /**
- * @brief Purges the contents of a queue
- * @param queue the name of the queue
- */
- virtual void purgeQueue(const std::string& queue) = 0;
-
- /**
- * @brief Declare a binding of a queue to an exchange
- * @param binding the binding information
- */
- virtual void declareBinding(SmartPtrBinding binding) = 0;
-
- /**
- * @brief Remove a binding of a queue to an exchange
- * @param binding the binding information
- */
- virtual void removeBinding(SmartPtrBinding binding) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(AmqpAdmin);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: Jun 6, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_AMQPHEADERMAPPER_H_
-#define AMQPINTEGRATIONCORE_AMQPHEADERMAPPER_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @brief This interface is used by objects that map AMQP headers to integration message
- * headers and vice versa.
- */
-struct __declspec(novtable) AMQPINTEGRATIONCORE_LINKAGE
-AmqpHeaderMapper : public ICafObject {
- CAF_DECL_UUID("5A292DD4-C3CC-4556-9809-90027C13EFA5")
-
- /*
- * @brief Return the collection of AMQP headers from an integration message.
- * @param headers the integration message headers
- * @return the AMQP headers
- */
- virtual AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties
- fromHeaders(IIntMessage::SmartPtrCHeaders headers) = 0;
-
- /**
- * @brief Return the collection of integration message headers from an AMQP message.
- * @param properties the AMQP message properties (#Caf::AmqpClient::AmqpContentHeaders::BasicProperties).
- * @param envelope the AMQP message envelope (#Caf::AmqpClient::Envelope).
- * @return the filtered set of headers as integration message headers
- */
- virtual IIntMessage::SmartPtrCHeaders
- toHeaders(
- AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties,
- AmqpClient::SmartPtrEnvelope envelope) = 0;
-
- /**
- * @brief Return the filtered collection of integration message headers from an integration message.
- * @param headers the input set of message headers
- * @return the filtered set of headers as integration message headers
- */
- virtual IIntMessage::SmartPtrCHeaders
- filterHeaders(
- IIntMessage::SmartPtrCHeaders headers) = 0;
-
- /** @brief AMQP header prefix */
- static const std::string PREFIX;
-
- /** @brief AMQP application id header */
- static const std::string APP_ID;
-
- /** @brief AMQP cluster id header */
- static const std::string CLUSTER_ID;
-
- /** @brief AMQP content encoding header */
- static const std::string CONTENT_ENCODING;
-
- /** @brief AMQP content length hedaer */
- static const std::string CONTENT_LENGTH;
-
- /** @brief AMQP content type header */
- static const std::string CONTENT_TYPE;
-
- /** @brief AMQP correlation id header */
- static const std::string CORRELATION_ID;
-
- /** @brief AMQP delivery mode header */
- static const std::string DELIVERY_MODE;
-
- /** @brief AMQP delivery tag header */
- static const std::string DELIVERY_TAG;
-
- /** @brief AMQP expiration header */
- static const std::string EXPIRATION;
-
- /** @brief AMQP message count header */
- static const std::string MESSAGE_COUNT;
-
- /** @brief AMQP message id header */
- static const std::string MESSAGE_ID;
-
- /** @brief AMQP received exchange header */
- static const std::string RECEIVED_EXCHANGE;
-
- /** @brief AMQP routing key header */
- static const std::string RECEIVED_ROUTING_KEY;
-
- /** @brief AMQP redelivered header */
- static const std::string REDELIVERED;
-
- /** @brief AMQP reply to header */
- static const std::string REPLY_TO;
-
- /** @brief AMQP timestamp header */
- static const std::string TIMESTAMP;
-
- /** @brief AMQP type header */
- static const std::string TYPE;
-
- /** @brief AMQP user id header */
- static const std::string USER_ID;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(AmqpHeaderMapper);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: Aug 7, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AmqpMessageListenerSource_h
-#define AmqpMessageListenerSource_h
-
-#include "AmqpHeaderMapper.h"
-#include "MessageListener.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-class AMQPINTEGRATIONCORE_LINKAGE AmqpMessageListenerSource :
- public CAbstractPollableChannel,
- public MessageListener {
-public:
- AmqpMessageListenerSource();
- virtual ~AmqpMessageListenerSource();
-
- void init(
- const SmartPtrAmqpHeaderMapper& headerMapper,
- const SmartPtrCPollerMetadata& pollerMetadata);
-
-public: // MessageListener
- void onMessage(const SmartPtrIIntMessage& message);
-
-private: // CAbstractPollableChannel
- bool doSend(
- const SmartPtrIIntMessage& message,
- int32 timeout);
-
- SmartPtrIIntMessage doReceive(const int32 timeout);
-
-private:
- static void QueueItemDestroyFunc(gpointer data);
-
-private:
- bool _isInitialized;
- std::string _id;
- GAsyncQueue *_messageQueue;
- SmartPtrAmqpHeaderMapper _headerMapper;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(AmqpMessageListenerSource);
-};
-CAF_DECLARE_SMART_POINTER(AmqpMessageListenerSource);
-
-}}
-
-#endif /* AmqpMessageListenerSource_h */
+++ /dev/null
-/*
- * Created on: Jul 16, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_AMQPOUTBOUNDENDPOINT_H_
-#define AMQPINTEGRATIONCORE_AMQPOUTBOUNDENDPOINT_H_
-
-#include "AmqpTemplate.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief Adapter that converts and sends Messages to an AMQP exchange
- */
-class AMQPINTEGRATIONCORE_LINKAGE AmqpOutboundEndpoint : public IMessageHandler {
- CAF_BEGIN_QI()
- CAF_QI_ENTRY(IMessageHandler)
- CAF_END_QI()
-
-public:
- AmqpOutboundEndpoint();
- virtual ~AmqpOutboundEndpoint();
-
- /**
- * @brief Initialize this object
- * @param amqpTemplate the #Caf::AmqpIntegration::AmqpTemplate used to
- * send and receive messages
- * @param appConfig the application configuration object
- * @param appContext the application context object
- */
- void init(
- SmartPtrAmqpTemplate amqpTemplate,
- SmartPtrIAppConfig appConfig,
- SmartPtrIAppContext appContext);
-
- /**
- * @brief Set the name of the AMQP exchange
- * @param exchangeName the name of the exchange
- */
- void setExchangeName(const std::string& exchangeName);
-
- /**
- * @brief Set the name of the AMQP exchange as an expression of message information
- * @param exchangeNameExpression the exchange name expression
- */
- void setExchangeNameExpression(const std::string& exchangeNameExpression);
-
- /**
- * @brief Set the routing key
- * @param routingKey the routing key
- */
- void setRoutingKey(const std::string& routingKey);
-
- /**
- * @brief Set the routing key as an expression of message information
- * @param routingKeyExpression the routing key expression
- */
- void setRoutingKeyExpression(const std::string& routingKeyExpression);
-
- /**
- * @brief Set the regular expression mapping of headers to send along with the message
- * <p>
- * AMQP headers (amqp_XXXX) are always automatically mapped to their AMQP
- * BasicProperties counterparts. This expression controls which additional headers
- * are sent along with the message.
- * @param expression header mapping expression
- */
- void setMappedRequestHeadersExpression(const std::string& expression);
-
- /**
- * @brief Set the expects reply flag.
- * @param expectReply <b>true</b> if a reply is expected else <b>false</b>
- */
- void setExpectReply(const bool expectReply);
-
- /**
- * @brief Set the requires reply flag.
- * @param requiresReply <b>true</b> if a reply is required else <b>false</b>
- */
- void setRequiresReply(const bool requiresReply);
-
- /**
- * @brief Set the friendly name of this instance.
- * @param name the instance name
- */
- void setComponentName(const std::string& name);
-
- /**
- * @brief Set the channel resolver object
- * @param channelResolver the channel resolver
- */
- void setChannelResolver(SmartPtrIChannelResolver channelResolver);
-
-public: // IMessageHandler
- UUID getHandlerId() const;
-
- void handleMessage(const SmartPtrIIntMessage& message);
-
- SmartPtrIIntMessage getSavedMessage() const;
-
- void clearSavedMessage();
-
-private:
- SmartPtrIIntMessage handleRequestMessage(SmartPtrIIntMessage requestMessage);
-
- void handleResult(
- SmartPtrIIntMessage resultMessage,
- IIntMessage::SmartPtrCHeaders requestHeaders);
-
- void send(
- const std::string& exchangeName,
- const std::string& routingKey,
- SmartPtrIIntMessage requestMessage);
-
- SmartPtrIIntMessage sendAndReceive(
- const std::string& exchangeName,
- const std::string& routingKey,
- SmartPtrIIntMessage requestMessage);
-
- SmartPtrIIntMessage createReplyMessage(
- SmartPtrIIntMessage reply,
- IIntMessage::SmartPtrCHeaders requestHeaders);
-
- void sendReplyMessage(
- SmartPtrIIntMessage reply,
- const std::string& replyChannelHeaderValue);
-
-private:
- bool _isInitialized;
- UUID _id;
- std::string _componentName;
- SmartPtrAmqpTemplate _amqpTemplate;
- bool _expectReply;
- bool _requiresReply;
- std::string _exchangeName;
- std::string _exchangeNameExpression;
- std::string _routingKey;
- std::string _routingKeyExpression;
- std::string _requestHeaderMapperExpression;
- SmartPtrIChannelResolver _channelResolver;
- SmartPtrIMessageChannel _outputChannel;
- SmartPtrCExpressionHandler _exchangeNameHandler;
- SmartPtrCExpressionHandler _routingKeyHandler;
- SmartPtrAmqpHeaderMapper _requestHeaderMapper;
- SmartPtrAmqpHeaderMapper _responseHeaderMapper;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(AmqpOutboundEndpoint);
-};
-CAF_DECLARE_SMART_QI_POINTER(AmqpOutboundEndpoint);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 25, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_AMQPTEMPLATE_H_
-#define AMQPINTEGRATIONCORE_AMQPTEMPLATE_H_
-
-#include "AmqpHeaderMapper.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @brief Specifies a basic set of AMQP operations.
- * <p>
- * Provides synchronous send and receive methods as well as a generic executor
- * through a callback to a provided object.
- */
-struct __declspec(novtable) AmqpTemplate : public ICafObject {
- CAF_DECL_UUID("B79DDF8E-B302-4576-9D96-DC413C76392C")
-
- /**
- * @brief Send a message to a default exchange with a default routing key.
- * @param message a message to send
- * @param headerMapper optional header mapper to use in place of the standard mapper
- */
- virtual void send(
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0;
-
- /**
- * @brief Send a message to a default exchange with a routing key.
- * @param routingKey the routing key
- * @param message a message to send
- * @param headerMapper optional header mapper to use in place of the standard mapper
- */
- virtual void send(
- const std::string& routingKey,
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0;
-
- /**
- * @brief Send a message to an exchange with a routing key.
- * @param exchange the name of the exchange
- * @param routingKey the routing key
- * @param message a message to send
- * @param headerMapper optional header mapper to use in place of the standard mapper
- */
- virtual void send(
- const std::string& exchange,
- const std::string& routingKey,
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0;
-
- /**
- * @brief Receive a message if there is one from a default queue.
- * <p>
- * Returns immediately, possibly with a null value.
- * @param headerMapper optional header mapper to use in place of the standard mapper
- */
- virtual SmartPtrIIntMessage receive(
- SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0;
-
- /**
- * @brief Receive a message if there is one from a specific queue.
- * <p>
- * Returns immediately, possibly with a null value.
- * @param queueName the name of the queue
- * @param headerMapper optional header mapper to use in place of the standard mapper
- */
- virtual SmartPtrIIntMessage receive(
- const std::string& queueName,
- SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0;
-
- /**
- * @brief Basic RPC pattern.
- * <p>
- * Send a message to a default exchange with a default routing key and attempt to
- * receive a response. The implementation will create a temporary anonymous queue
- * to receive the response and will use the repy-to header to notify the recipient
- * of the response routing.
- * @param message a message to send
- * @param requestHeaderMapper optional header mapper to use in place of the standard mapper on the outgoing message
- * @param responseHeaderMapper optional header mapper to use in place of the standard mapper on the incoming message
- */
- virtual SmartPtrIIntMessage sendAndReceive(
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(),
- SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()) = 0;
-
- /**
- * @brief Basic RPC pattern.
- * <p>
- * Send a message to a default exchange with a specific routing key and attempt to
- * receive a response. The implementation will create a temporary anonymous queue
- * to receive the response and will use the repy-to header to notify the recipient
- * of the response routing.
- * @param routingKey the routing key
- * @param message a message to send
- * @param requestHeaderMapper optional header mapper to use in place of the standard mapper on the outgoing message
- * @param responseHeaderMapper optional header mapper to use in place of the standard mapper on the incoming message
- */
- virtual SmartPtrIIntMessage sendAndReceive(
- const std::string& routingKey,
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(),
- SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()) = 0;
-
- /**
- * @brief Basic RPC pattern.
- * <p>
- * Send a message to a specific exchange with a specific routing key and attempt to
- * receive a response. The implementation will create a temporary anonymous queue
- * to receive the response and will use the repy-to header to notify the recipient
- * of the response routing.
- * @param exchange the name of the exchange
- * @param routingKey the routing key
- * @param message a message to send
- * @param requestHeaderMapper optional header mapper to use in place of the standard mapper on the outgoing message
- * @param responseHeaderMapper optional header mapper to use in place of the standard mapper on the incoming message
- */
- virtual SmartPtrIIntMessage sendAndReceive(
- const std::string& exchange,
- const std::string& routingKey,
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(),
- SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()) = 0;
-
- /**
- * @brief Interface to objects used to execute arbitrary AMQP commands
- * <p>
- * This interface provides a mechanism to execute arbitrary AMQP commands. Implement
- * a class based on this interface with the logic required to support the desired
- * AMQP operation. The template will call this object with a channel on which
- * to execute the command.
- * @param channel the AMQP channel (Caf::AmqpClient::Channel in the
- * CAF AMQP Client Library API documentation.)
- * @param data user-specific data required to perform the operation
- * @return a pointer to a user-specified object representing the result of the
- * operation.
- */
- struct Executor : public ICafObject {
- virtual gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data) = 0;
- };
- CAF_DECLARE_SMART_POINTER(Executor);
-
- /**
- * @brief Execute an arbitrary AMQP operation
- * @see #Caf::AmqpIntegration::AmqpTemplate::Executor
- * @param executor the object used to execute the AMQP operation
- * @param data user-specific data required to perform the operation
- * @return a pointer to a user-specified object representing the result of the
- * operation.
- */
- virtual gpointer execute(SmartPtrExecutor executor, gpointer data) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(AmqpTemplate);
-
-}}
-
-#endif /* AMQPINTEGRATIONCORE_AMQPTEMPLATE_H_ */
+++ /dev/null
-/*
- * Created on: Jun 13, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_BINDING_H_
-#define AMQPINTEGRATIONCORE_BINDING_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @brief Simple container collecting information to describe a queue binding. Used in conjunction with RabbitAdmin.
- * <p>
- * Use #Caf::AmqpIntegration::createBinding to create a binding.
- */
-struct __declspec(novtable) Binding : public ICafObject {
- CAF_DECL_UUID("A6067BE6-18C1-4D50-BB2F-AB9E49EA2111")
-
- /** @return the queue name */
- virtual std::string getQueue() const = 0;
-
- /** @return the exchange name */
- virtual std::string getExchange() const = 0;
-
- /** @return the routing key */
- virtual std::string getRoutingKey() const = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(Binding);
-
-}}
-
-#endif /* AMQPINTEGRATIONCORE_BINDING_H_ */
+++ /dev/null
-/*
- * Created on: Jun 14, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_BINDINGIMPL_H_
-#define AMQPINTEGRATIONCORE_BINDINGIMPL_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @brief Implementations of the #Caf::AmqpIntegration::Binding interface.
- */
-class AMQPINTEGRATIONCORE_LINKAGE BindingImpl : public Binding {
-public:
- BindingImpl();
- virtual ~BindingImpl();
-
- /**
- * @brief initialize the object
- * @param queue the name of the queue
- * @param exchange the name of the exchange
- * @param routingKey the routing key
- */
- void init(
- const std::string queue,
- const std::string exchange,
- const std::string routingKey);
-
- std::string getQueue() const;
-
- std::string getExchange() const;
-
- std::string getRoutingKey() const;
-
-private:
- std::string _queue;
- std::string _exchange;
- std::string _routingKey;
- CAF_CM_DECLARE_NOCOPY(BindingImpl);
-};
-CAF_DECLARE_SMART_POINTER(BindingImpl);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: Jun 15, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_BINDINGINTERNAL_H_
-#define AMQPINTEGRATIONCORE_BINDINGINTERNAL_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief Interface allowing for internal management of binding integration objects
- */
-struct __declspec(novtable) BindingInternal : public ICafObject {
- CAF_DECL_UUID("23D0079E-93F8-4C06-BD33-F0E795506FB2")
-
- /**
- * @brief Sets the delegated Binding object
- * @param binding the delegated binding
- */
- virtual void setBindingInternal(SmartPtrBinding binding) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(BindingInternal);
-
-}}
-#endif /* AMQPINTEGRATIONCORE_BINDINGINTERNAL_H_ */
+++ /dev/null
-/*
- * Created on: Jul 30, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_BLOCKINGQUEUECONSUMER_H_
-#define AMQPINTEGRATIONCORE_BLOCKINGQUEUECONSUMER_H_
-
-#include "ConnectionFactory.h"
-#include "AmqpHeaderMapper.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-// Forward-declare
-class BlockingQueueConsumer;
-CAF_DECLARE_SMART_POINTER(BlockingQueueConsumer)
-
-/**
- * @ingroup IntObjImpl
- * @brief Specialized consumer encapsulating knowledge of the broker connections and having its own lifecycle
- */
-class AMQPINTEGRATIONCORE_LINKAGE BlockingQueueConsumer :
- public ILifecycle {
-public:
- BlockingQueueConsumer();
- virtual ~BlockingQueueConsumer();
-
- /**
- * @brief object initializer
- * @param connectionFactory connection factory object
- * @param headerMapper header mapper object to map incoming headers
- * @param acknowledgeMode message acknowledgement mode
- * @param prefetchCount if <i>acknowledgeMode</i> is <i>AUTO</i> or <i>MANUAL</i> this
- * message prefetch count value will be sent to the broker via the basic.qos method.
- * @param queue the queue to consume
- */
- void init(
- SmartPtrConnectionFactory connectionFactory,
- SmartPtrAmqpHeaderMapper headerMapper,
- AcknowledgeMode acknowledgeMode,
- uint32 prefetchCount,
- const std::string& queue);
-
- /**
- * @retval the underlying channel
- */
- AmqpClient::SmartPtrChannel getChannel();
-
- /**
- * @retval the AMQP consumer tag(s)
- */
- std::string getConsumerTag();
-
- /**
- * @brief Wait for the next message delivery and return it
- * <p>
- * This is a blocking call and will return only when a message has been delivered
- * or the consumer is canceled. In the case of cancellation NULL will be returned.
- * @retval the next message or NULL
- */
- SmartPtrIIntMessage nextMessage();
-
- /**
- * @brief Wait for the next message delivery and return it
- * <p>
- * This is a non-blocking call and will return when a message has been delivered
- * within the timeout specified or if the consumer is canceled.
- * @param timeout the timeout in milliseconds
- * @retval the next message or NULL
- */
- SmartPtrIIntMessage nextMessage(int32 timeout);
-
- /**
- * @brief Acknowledges unacknowledged messages
- * <p>
- * Sends a basic.ack for messages that have been delivered. This method only
- * sends a basic.ack if the acknowledge mode flag is set to ACKNOWLEDGEMODE_AUTO.
- */
- bool commitIfNecessary();
-
- /**
- * @brief Rejects unacknowledged messaages
- * <p>
- * Sends a basic.reject for messages that have been delivered. This method only
- * sends a basic.reject if the acknowledge mode flag is set to ACKNOWLEDGEMODE_AUTO.
- * @param ex the application exception necessitating a rollback
- */
- void rollbackOnExceptionIfNecessary(SmartPtrCCafException& ex);
-
-public:
- void start(const uint32 timeoutMs);
- void stop(const uint32 timeoutMs);
- bool isRunning() const;
-
-private:
- class InternalConsumer : public AmqpClient::Consumer {
- public:
- InternalConsumer();
- virtual ~InternalConsumer();
-
- void init(
- BlockingQueueConsumer* parent);
-
- public:
- void handleConsumeOk(
- const std::string& consumerTag);
-
- void handleCancelOk(
- const std::string& consumerTag);
-
- void handleRecoverOk(
- const std::string& consumerTag);
-
- void handleDelivery(
- const std::string& consumerTag,
- const AmqpClient::SmartPtrEnvelope& envelope,
- const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body);
-
- void handleShutdown(
- const std::string& consumerTag,
- SmartPtrCCafException& reason);
-
- std::string getConsumerTag();
-
- private:
- SmartPtrBlockingQueueConsumer _parent;
- AmqpClient::SmartPtrChannel _channel;
- std::string _consumerTag;
- GAsyncQueue *_deliveryQueue;
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(InternalConsumer);
- };
- CAF_DECLARE_SMART_POINTER(InternalConsumer);
-
-private:
- struct Delivery : public ICafObject {
- AmqpClient::SmartPtrEnvelope envelope;
- AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties;
- SmartPtrCDynamicByteArray body;
- };
- CAF_DECLARE_SMART_POINTER(Delivery);
-
-private:
- void checkShutdown();
-
- SmartPtrIIntMessage handle(SmartPtrDelivery delivery);
-
- static void destroyQueueItem(gpointer data);
-
-private:
- friend class InternalConsumer;
-
- bool _isInitialized;
- volatile bool _isRunning;
- volatile bool _isCanceled;
- std::set<uint64> _deliveryTags;
- SmartPtrInternalConsumer _consumer;
- SmartPtrCAutoRecMutex _parentLock;
- SmartPtrCCafException _shutdownException;
- GAsyncQueue *_deliveryQueue;
- SmartPtrConnectionFactory _connectionFactory;
- SmartPtrConnection _connection;
- AmqpClient::SmartPtrChannel _channel;
- SmartPtrAmqpHeaderMapper _headerMapper;
- AcknowledgeMode _acknowledgeMode;
- uint32 _prefetchCount;
- std::string _queue;
-
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(BlockingQueueConsumer);
-};
-
-}}
-
-#endif /* AMQPINTEGRATIONCORE_BLOCKINGQUEUECONSUMER_H_ */
+++ /dev/null
-/*
- * Created on: May 25, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CACHINGCONNECTIONFACTORY_H_
-#define CACHINGCONNECTIONFACTORY_H_
-
-#include "AbstractConnectionFactory.h"
-#include "ConnectionProxy.h"
-#include "ChannelProxy.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief Implementation of the CachingConnectionFactory Integration Object
- */
-class AMQPINTEGRATIONCORE_LINKAGE CachingConnectionFactory :
- public AbstractConnectionFactory {
-public:
- CachingConnectionFactory();
- virtual ~CachingConnectionFactory();
-
- void init();
-
- void init(const std::string& protocol, const std::string& host, const uint32 port);
-
- void init(const std::string& protocol, const std::string& host);
-
- void init(const uint32 port);
-
- void init(const AmqpClient::SmartPtrConnectionFactory& amqpConnectionFactory);
-
- void destroy();
-
- uint32 getChannelCacheSize();
-
- AmqpClient::SmartPtrChannel getChannel();
-
- void setConnectionListeners(const std::deque<SmartPtrConnectionListener>& listeners);
-
- void setChannelCacheSize(uint32 cacheSize);
-
-public: // ConnectionFactory
- SmartPtrConnection createConnection();
-
- void addConnectionListener(const SmartPtrConnectionListener& listener);
-
-private:
- typedef std::deque<SmartPtrChannelProxy> ProxyDeque;
- CAF_DECLARE_SMART_POINTER(ProxyDeque);
-
- void reset();
-
- SmartPtrChannelProxy newCachedChannelProxy();
-
- AmqpClient::SmartPtrChannel createBareChannel();
-
-private:
- class ChannelCachingConnectionProxy : public ConnectionProxy {
- public:
- ChannelCachingConnectionProxy();
- virtual ~ChannelCachingConnectionProxy();
-
- public:
- void init(
- SmartPtrConnection connection,
- CachingConnectionFactory *parent);
-
- void destroy();
-
- public: // ConnectionProxy
- SmartPtrConnection getTargetConnection();
-
- public: // Connection
- AmqpClient::SmartPtrChannel createChannel();
- void close();
- bool isOpen();
-
- public:
- AmqpClient::SmartPtrChannel createBareChannel();
-
- private:
- SmartPtrConnection _target;
- CachingConnectionFactory *_parent;
-
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(ChannelCachingConnectionProxy);
- };
- CAF_DECLARE_SMART_POINTER(ChannelCachingConnectionProxy);
- friend class ChannelCachingConnectionProxy;
-
- class CachedChannelHandler : public ChannelProxy {
- public:
- CachedChannelHandler();
- virtual ~CachedChannelHandler();
-
- void init(
- CachingConnectionFactory *parent,
- AmqpClient::SmartPtrChannel channel);
-
- private:
- void logicalClose();
-
- void physicalClose();
-
- void checkChannel();
-
- void postProcessCall(SmartPtrCCafException exception);
-
- public: // ChannelProxy
- AmqpClient::SmartPtrChannel getTargetChannel();
-
- public: // Channel
- uint16 getChannelNumber();
-
- void close();
-
- bool isOpen();
-
- void basicAck(
- const uint64 deliveryTag,
- const bool ackMultiple);
-
- AmqpClient::SmartPtrGetResponse basicGet(
- const std::string& queue,
- const bool noAck);
-
- void basicPublish(
- const std::string& exchange,
- const std::string& routingKey,
- const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body);
-
- void basicPublish(
- const std::string& exchange,
- const std::string& routingKey,
- const bool mandatory,
- const bool immediate,
- const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body);
-
- AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk basicConsume(
- const std::string& queue,
- const AmqpClient::SmartPtrConsumer& consumer);
-
- AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk basicConsume(
- const std::string& queue,
- const bool noAck,
- const AmqpClient::SmartPtrConsumer& consumer);
-
- AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk basicConsume(
- const std::string& queue,
- const std::string& consumerTag,
- const bool noAck,
- const bool noLocal,
- const bool exclusive,
- const AmqpClient::SmartPtrConsumer& consumer,
- const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable());
-
- AmqpClient::AmqpMethods::Basic::SmartPtrCancelOk basicCancel(
- const std::string& consumerTag);
-
- AmqpClient::AmqpMethods::Basic::SmartPtrRecoverOk basicRecover(
- const bool requeue);
-
- AmqpClient::AmqpMethods::Basic::SmartPtrQosOk basicQos(
- const uint32 prefetchSize,
- const uint32 prefetchCount,
- const bool global);
-
- void basicReject(
- const uint64 deliveryTag,
- const bool requeue);
-
- AmqpClient::AmqpMethods::Exchange::SmartPtrDeclareOk exchangeDeclare(
- const std::string& exchange,
- const std::string& type,
- const bool durable = false,
- const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable());
-
- AmqpClient::AmqpMethods::Exchange::SmartPtrDeleteOk exchangeDelete(
- const std::string& exchange,
- const bool ifUnused);
-
- AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare();
-
- AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare(
- const std::string& queue,
- const bool durable,
- const bool exclusive,
- const bool autoDelete,
- const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable());
-
- AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk queueDeclarePassive(
- const std::string& queue);
-
- AmqpClient::AmqpMethods::Queue::SmartPtrDeleteOk queueDelete(
- const std::string& queue,
- const bool ifUnused,
- const bool ifEmpty);
-
- AmqpClient::AmqpMethods::Queue::SmartPtrPurgeOk queuePurge(
- const std::string& queue);
-
- AmqpClient::AmqpMethods::Queue::SmartPtrBindOk queueBind(
- const std::string& queue,
- const std::string& exchange,
- const std::string& routingKey,
- const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable());
-
- AmqpClient::AmqpMethods::Queue::SmartPtrUnbindOk queueUnbind(
- const std::string& queue,
- const std::string& exchange,
- const std::string& routingKey,
- const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable());
-
- void addReturnListener(
- const AmqpClient::SmartPtrReturnListener& listener);
-
- bool removeReturnListener(
- const AmqpClient::SmartPtrReturnListener& listener);
-
- private:
- CachingConnectionFactory *_parent;
- AmqpClient::SmartPtrChannel _channel;
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(CachedChannelHandler);
- };
- CAF_DECLARE_SMART_POINTER(CachedChannelHandler);
- friend class CachedChannelHandler;
-
-private:
- bool _isInitialized;
- bool _isActive;
- SmartPtrCAutoRecMutex _connectionMonitor;
- SmartPtrChannelCachingConnectionProxy _connection;
- uint32 _channelCacheSize;
- SmartPtrProxyDeque _cachedChannels;
- SmartPtrCAutoRecMutex _cachedChannelsMonitor;
-
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CachingConnectionFactory);
-};
-CAF_DECLARE_SMART_POINTER(CachingConnectionFactory);
-
-}}
-
-#endif /* CACHINGCONNECTIONFACTORY_H_ */
+++ /dev/null
-/*
- * Created on: May 29, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CHANNELPROXY_H_
-#define CHANNELPROXY_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief Interface on objects used to proxy channel objects for the various
- * connection objects.
- */
-struct __declspec(novtable) ChannelProxy : public AmqpClient::Channel {
-
- /**
- * @brief Return the proxied Channel object
- * @return the proxied channel
- */
- virtual AmqpClient::SmartPtrChannel getTargetChannel() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(ChannelProxy);
-
-}}
-
-#endif /* CHANNELPROXY_H_ */
+++ /dev/null
-/*
- * Created on: Jun 2, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef COMPOSITECONNECTIONLISTENER_H_
-#define COMPOSITECONNECTIONLISTENER_H_
-
-#include "ConnectionListener.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief Implementation of ConnectionListener that notifies multiple delegates
- */
-class AMQPINTEGRATIONCORE_LINKAGE CompositeConnectionListener : public ConnectionListener {
-public:
- CompositeConnectionListener();
- virtual ~CompositeConnectionListener();
-
- typedef std::deque<SmartPtrConnectionListener> ListenerDeque;
-
- /**
- * @brief Set the delegate collection
- * @param delegates the collection of ConnectionListener delegates
- */
- void setDelegates(const ListenerDeque& delegates);
-
- /**
- * @brief Add a delegate to the collection
- * @param delegate the ConnectionListener delegate to add
- */
- void addDelegate(const SmartPtrConnectionListener& delegate);
-
-public: // ConnectionListener
- void onCreate(const SmartPtrConnection& connection);
- void onClose(const SmartPtrConnection& connection);
-
-private:
- ListenerDeque _delegates;
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CompositeConnectionListener);
-};
-CAF_DECLARE_SMART_POINTER(CompositeConnectionListener);
-
-}}
-
-#endif /* COMPOSITECONNECTIONLISTENER_H_ */
+++ /dev/null
-/*
- * Created on: May 24, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_CONNECTION_H_
-#define AMQPINTEGRATIONCORE_CONNECTION_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief An interface for Caf::AmqpIntegration connection objects
- */
-struct __declspec(novtable) Connection : public ICafObject {
-
- /**
- * @brief Create a {@link AmqpClient::Channel Channel}.
- */
- virtual AmqpClient::SmartPtrChannel createChannel() = 0;
-
- /**
- * @brief Close the connection
- */
- virtual void close() = 0;
-
- /**
- * @brief Check the connection's status
- * @retval true the connection is open
- * @retval false the connection is closed
- */
- virtual bool isOpen() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(Connection);
-
-}}
-
-#endif /* AMQPINTEGRATIONCORE_CONNECTION_H_ */
+++ /dev/null
-/*
- * Created on: May 24, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_CONNECTIONFACTORY_H_
-#define AMQPINTEGRATIONCORE_CONNECTIONFACTORY_H_
-
-#include "Connection.h"
-#include "ConnectionListener.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief Interface for connection factory implementations
- */
-struct __declspec(novtable) ConnectionFactory : ICafObject {
- CAF_DECL_UUID("D2420BC6-240C-4EAC-8518-E86A93A40035")
-
- /**
- * @return a new Connection
- */
- virtual SmartPtrConnection createConnection() = 0;
-
- /**
- * @return the default protocol to use for connections
- */
- virtual std::string getProtocol() = 0;
-
- /**
- * @return the default host to use for connections
- */
- virtual std::string getHost() = 0;
-
- /**
- * @return the default port to use for connections
- */
- virtual uint32 getPort() = 0;
-
- /**
- * @return the default virtual host to use for connections
- */
- virtual std::string getVirtualHost() = 0;
-
- /**
- * @return the default user name to use for connections
- */
- virtual std::string getUsername() = 0;
-
- /**
- * @return the default password to use for connections
- */
- virtual std::string getPassword() = 0;
-
- /**
- * @return the default path to the CA Cert
- */
- virtual std::string getCaCertPath() = 0;
-
- /**
- * @return the default path to the Client Cert
- */
- virtual std::string getClientCertPath() = 0;
-
- /**
- * @return the default path to the Client Key
- */
- virtual std::string getClientKeyPath() = 0;
-
- /**
- * @return the number of connection retries
- */
- virtual uint16 getRetries() = 0;
-
- /**
- * @return the number of connection seconds to wait
- */
- virtual uint16 getSecondsToWait() = 0;
-
- /**
- * @brief Add a connection create/close callback
- * @param listener ConnectionListener callback
- */
- virtual void addConnectionListener(const SmartPtrConnectionListener& listener) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(ConnectionFactory);
-
-}}
-
-#endif /* AMQPINTEGRATIONCORE_CONNECTIONFACTORY_H_ */
+++ /dev/null
-/*
- * Created on: Jun 2, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_CONNECTIONLISTENER_H_
-#define AMQPINTEGRATIONCORE_CONNECTIONLISTENER_H_
-
-#include "Connection.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief Connection event notification callback interface
- */
-struct __declspec(novtable) ConnectionListener : public ICafObject {
- CAF_DECL_UUID("8F249C38-CF91-4553-9C68-3D714626A7EC")
-
- /**
- * @brief Connection created event
- * @param connection the Connection that has been created
- */
- virtual void onCreate(const SmartPtrConnection& connection) = 0;
-
- /**
- * @brief Connection closed event
- * @param connection the Connection that has been closed
- */
- virtual void onClose(const SmartPtrConnection& connection) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(ConnectionListener);
-
-}}
-
-#endif /* AMQPINTEGRATIONCORE_CONNECTIONLISTENER_H_ */
+++ /dev/null
-/*
- * Created on: May 25, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_CONNECTIONPROXY_H_
-#define AMQPINTEGRATIONCORE_CONNECTIONPROXY_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief Interface on objects used to proxy connection objects for the various
- * connection factories.
- */
-struct __declspec(novtable) ConnectionProxy : public Connection {
-
- /**
- * @brief Return the proxied Connection object
- * @return the proxied connection
- */
- virtual SmartPtrConnection getTargetConnection() = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(ConnectionProxy);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: Jun 6, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_DEFAULTAMQPHEADERMAPPER_H_
-#define AMQPINTEGRATIONCORE_DEFAULTAMQPHEADERMAPPER_H_
-
-#include "AmqpHeaderMapper.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @brief This class is used to map AMQP headers to integration message
- * headers and vice versa.
- * <p>
- * This class maps headers between the AMQP message protocol and the internal
- * integration object message protocol. By default, standard AMQP headers are mapped and
- * internal and user-defined headers are not. An optional regular expression can be
- * supplied to allow user-defined headers to be mapped from integration messages
- * to AMQP.
- */
-class AMQPINTEGRATIONCORE_LINKAGE DefaultAmqpHeaderMapper : public AmqpHeaderMapper {
-public:
- DefaultAmqpHeaderMapper();
- virtual ~DefaultAmqpHeaderMapper();
-
- /**
- * @brief Object initializer
- * @param userHeaderRegex the regular expression to apply to the integration
- * message header keys. Those that match are mapped to the AMQP message headers.
- */
- void init(const std::string& userHeaderRegex = std::string());
-
- virtual AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties
- fromHeaders(IIntMessage::SmartPtrCHeaders headers);
-
- virtual IIntMessage::SmartPtrCHeaders
- toHeaders(
- AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties,
- AmqpClient::SmartPtrEnvelope envelope);
-
- virtual IIntMessage::SmartPtrCHeaders
- filterHeaders(
- IIntMessage::SmartPtrCHeaders headers);
-
-private:
- bool _isInitialized;
- SmartPtrCCafRegex _userHeaderRegex;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(DefaultAmqpHeaderMapper);
-};
-CAF_DECLARE_SMART_POINTER(DefaultAmqpHeaderMapper);
-
-}}
-
-#endif /* AMQPINTEGRATIONCORE_DEFAULTAMQPHEADERMAPPER_H_ */
+++ /dev/null
-/*
- * Created on: Jun 12, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_EXCHANGE_H_
-#define AMQPINTEGRATIONCORE_EXCHANGE_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @brief Constants representing the exchange types returned by #Caf::AmqpIntegration::Exchange::getType
- */
-struct AMQPINTEGRATIONCORE_LINKAGE ExchangeTypes {
- /** @brief direct exchange */
- static const char *DIRECT;
- /** @brief topic exchange */
- static const char *TOPIC;
- /** @brief headers exchange */
- static const char *HEADERS;
- /** @brief fanoout exchange */
- static const char *FANOUT;
-};
-
-/**
- * @brief Simple container collecting information to describe an exchange. Used in conjunction with RabbitAdmin.
- * <p>
- * Use #Caf::AmqpIntegration::createDirectExchange, #Caf::AmqpIntegration::createTopicExchange,
- * #Caf::AmqpIntegration::createHeadersExchange or #Caf::AmqpIntegration::createFanoutExchange
- * to create an exchange.
- */
-struct __declspec(novtable) Exchange : public ICafObject {
- CAF_DECL_UUID("0F93E16B-E12D-4D00-8DB8-163D57BE2078")
-
- /** @return the name of the exchange */
- virtual std::string getName() const = 0;
-
- /** @return the exchange type @see #Caf::AmqpIntegration::ExchangeTypes */
- virtual std::string getType() const = 0;
-
- /**
- * @retval true the exchange is durable
- * @retval false the exchange is not durable
- */
- virtual bool isDurable() const = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(Exchange);
-
-}}
-
-#endif /* AMQPINTEGRATIONCORE_EXCHANGE_H_ */
+++ /dev/null
-/*
- * Created on: Jun 14, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_EXCHANGEIMPL_H_
-#define AMQPINTEGRATIONCORE_EXCHANGEIMPL_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @brief Base class for implementations of the #Caf::AmqpIntegration::Exchange interface
- */
-class AMQPINTEGRATIONCORE_LINKAGE AbstractExchange : public Exchange {
-public:
- AbstractExchange();
- virtual ~AbstractExchange();
-
- /**
- * @brief initalize the object
- * @param name exchange name
- * @param isDurable <b>true</b> if the exchange is durable else <b>false</b>
- */
- void init(
- const std::string& name,
- const bool isDurable);
-
- virtual std::string getName() const;
- virtual std::string getType() const = 0;
- virtual bool isDurable() const;
-
-private:
- std::string _name;
- bool _isDurable;
- CAF_CM_DECLARE_NOCOPY(AbstractExchange);
-};
-
-/**
- * @brief Implementation of the #Caf::AmqpIntegration::Exchange interface for direct exchanges
- */
-class DirectExchange : public AbstractExchange {
-public:
- DirectExchange();
-
- /**
- * @brief initalize the object
- * @param name exchange name
- * @param durable <b>true</b> if the exchange is durable else <b>false</b>
- */
- void init(
- const std::string name,
- const bool durable);
-
- virtual std::string getType() const;
- CAF_CM_DECLARE_NOCOPY(DirectExchange);
-};
-CAF_DECLARE_SMART_POINTER(DirectExchange);
-
-/**
- * @brief Implementation of the #Caf::AmqpIntegration::Exchange interface for topic exchanges
- */
-class TopicExchange : public AbstractExchange {
-public:
- TopicExchange();
-
- /**
- * @brief initalize the object
- * @param name exchange name
- * @param durable <b>true</b> if the exchange is durable else <b>false</b>
- */
- void init(
- const std::string name,
- const bool durable);
-
- virtual std::string getType() const;
- CAF_CM_DECLARE_NOCOPY(TopicExchange);
-};
-CAF_DECLARE_SMART_POINTER(TopicExchange);
-
-/**
- * @brief Implementation of the #Caf::AmqpIntegration::Exchange interface for headers exchanges
- */
-class HeadersExchange : public AbstractExchange {
-public:
- HeadersExchange();
-
- /**
- * @brief initalize the object
- * @param name exchange name
- * @param durable <b>true</b> if the exchange is durable else <b>false</b>
- */
- void init(
- const std::string name,
- const bool durable);
-
- virtual std::string getType() const;
- CAF_CM_DECLARE_NOCOPY(HeadersExchange);
-};
-CAF_DECLARE_SMART_POINTER(HeadersExchange);
-
-/**
- * @brief Implementation of the #Caf::AmqpIntegration::Exchange interface for fanout exchanges
- */
-class FanoutExchange : public AbstractExchange {
-public:
- FanoutExchange();
-
- /**
- * @brief initalize the object
- * @param name exchange name
- * @param durable <b>true</b> if the exchange is durable else <b>false</b>
- */
- void init(
- const std::string name,
- const bool durable);
-
- virtual std::string getType() const;
- CAF_CM_DECLARE_NOCOPY(FanoutExchange);
-};
-CAF_DECLARE_SMART_POINTER(FanoutExchange);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: Jun 14, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_EXCHANGEINTERNAL_H_
-#define AMQPINTEGRATIONCORE_EXCHANGEINTERNAL_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief Interface allowing for internal management of exchange integration objects
- */
-struct __declspec(novtable) ExchangeInternal : public ICafObject {
- CAF_DECL_UUID("5373AD13-2103-4FC4-A581-9D6D454F02A3")
-
- /**
- * @brief Return the bindings defined as part of the exchange definition
- * @return the collection of bindings
- */
- virtual std::deque<SmartPtrBinding> getEmbeddedBindings() const = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(ExchangeInternal);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: Aug 2, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_MESSAGELISTENER_H_
-#define AMQPINTEGRATIONCORE_MESSAGELISTENER_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-struct __declspec(novtable) MessageListener : public ICafObject {
- CAF_DECL_UUID("5B2B7C47-ACEF-4FB1-97A0-1594D05AB4D9")
-
- virtual void onMessage(const SmartPtrIIntMessage& message) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(MessageListener);
-
-}}
-
-#endif /* AMQPINTEGRATIONCORE_MESSAGELISTENER_H_ */
+++ /dev/null
-/*
- * Created on: Jun 13, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_QUEUE_H_
-#define AMQPINTEGRATIONCORE_QUEUE_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @brief Simple container collecting information to describe a queue. Used in conjunction with RabbitAdmin.
- * <p>
- * Use #Caf::AmqpIntegration::createQueue to create a queue.
- */
-struct __declspec(novtable) Queue : public ICafObject {
- CAF_DECL_UUID("082088AD-ECA3-4591-986F-8D9AFEDDEE7D")
-
- /** @return the name of the queue */
- virtual std::string getName() const = 0;
-
- /**
- * @retval true the queue is durable
- * @retval false the queue is not durable
- */
- virtual bool isDurable() const = 0;
-
- /**
- * @retval true the queue is exclusive to the connection
- * @retval false the queue is not exclusive to the connection
- */
- virtual bool isExclusive() const = 0;
-
- /**
- * @retval true the server should delete the queue when it is no longer in use
- * @retval false the server should not delete the queue when it is no longer in use
- */
- virtual bool isAutoDelete() const = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(Queue);
-
-}}
-
-#endif /* AMQPINTEGRATIONCORE_QUEUE_H_ */
+++ /dev/null
-/*
- * Created on: Jun 14, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_QUEUEIMPL_H_
-#define AMQPINTEGRATIONCORE_QUEUEIMPL_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @brief Implementation of the #Caf::AmqpIntegration::Queue interface.
- */
-class AMQPINTEGRATIONCORE_LINKAGE QueueImpl : public Queue {
-public:
- QueueImpl();
- virtual ~QueueImpl();
-
- /**
- * @brief initialize the object
- * <p>
- * <i>durable</i> will be set to <b>true</b>;
- * <i>exclusive</i> and <i>autoDelete</i> will be set to <b>false</b>.
- * @param name queue name
- */
- void init(const std::string& name);
-
- /**
- * @brief initialize the object
- * <p>
- * <i>exclusive</i> and <i>autoDelete</i> will be set to <b>false</b>.
- * @param name queue name
- * @param durable <b>true</b> to make the queue durable else <b>false</b>
- */
- void init(
- const std::string& name,
- const bool durable);
-
- /**
- * @brief initialize the object
- * @param name queue name
- * @param durable <b>true</b> to make the queue durable else <b>false</b>
- * @param exclusive <b>true</b> to make the queue exclusive else <b>false</b>
- * @param autoDelete <b>true</b> to make the queue auto-delete else <b>false</b>
- */
- void init(
- const std::string& name,
- const bool durable,
- const bool exclusive,
- const bool autoDelete);
-
- std::string getName() const;
-
- bool isDurable() const;
-
- bool isExclusive() const;
-
- bool isAutoDelete() const;
-
-private:
- std::string _name;
- bool _durable;
- bool _exclusive;
- bool _autoDelete;
- CAF_CM_DECLARE_NOCOPY(QueueImpl);
-};
-CAF_DECLARE_SMART_POINTER(QueueImpl);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: Jun 14, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_QUEUEINTERNAL_H_
-#define AMQPINTEGRATIONCORE_QUEUEINTERNAL_H_
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief Interface allowing for internal management of queue integration objects
- */
-struct __declspec(novtable) QueueInternal : public ICafObject {
- CAF_DECL_UUID("E15F4DA8-C4DC-4813-82B9-1B15C69915D1")
-
- /**
- * @brief Sets the delegated Queue object
- * @param queue the delegated queue
- */
- virtual void setQueueInternal(SmartPtrQueue queue) = 0;
-};
-CAF_DECLARE_SMART_INTERFACE_POINTER(QueueInternal);
-
-}}
-#endif
+++ /dev/null
-/*
- * Created on: Jun 12, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_RABBITADMIN_H_
-#define AMQPINTEGRATIONCORE_RABBITADMIN_H_
-
-#include "RabbitTemplate.h"
-#include "AmqpAdmin.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief Implementation of the RabbitAdmin Integration Object
- */
-class AMQPINTEGRATIONCORE_LINKAGE RabbitAdmin : public AmqpAdmin {
-public:
- RabbitAdmin();
- virtual ~RabbitAdmin();
-
- void init(SmartPtrConnectionFactory connectionFactory);
-
- void term();
-
-public: // AmqpAdmin
- void declareExchange(SmartPtrExchange exchange);
-
- bool deleteExchange(const std::string& exchange);
-
- SmartPtrQueue declareQueue();
-
- void declareQueue(SmartPtrQueue queue);
-
- bool deleteQueue(const std::string& queue);
-
- void deleteQueue(
- const std::string& queue,
- const bool unused,
- const bool empty);
-
- void purgeQueue(const std::string& queue);
-
- void declareBinding(SmartPtrBinding binding);
-
- void removeBinding(SmartPtrBinding binding);
-
-private: // Executors
- class DeclareExchangeExecutor : public AmqpTemplate::Executor {
- public:
- gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data);
- };
- CAF_DECLARE_SMART_POINTER(DeclareExchangeExecutor);
-
- class DeleteExchangeExecutor : public AmqpTemplate::Executor {
- gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data);
- };
- CAF_DECLARE_SMART_POINTER(DeleteExchangeExecutor);
-
- class DeclareQueueExecutor : public AmqpTemplate::Executor {
- gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data);
- };
- CAF_DECLARE_SMART_POINTER(DeclareQueueExecutor);
-
- class DeleteQueueExecutor : public AmqpTemplate::Executor {
- gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data);
- };
- CAF_DECLARE_SMART_POINTER(DeleteQueueExecutor);
-
- class DeleteQueueExExecutor : public AmqpTemplate::Executor {
- gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data);
- };
- CAF_DECLARE_SMART_POINTER(DeleteQueueExExecutor);
-
- class PurgeQueueExecutor : public AmqpTemplate::Executor {
- gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data);
- };
- CAF_DECLARE_SMART_POINTER(PurgeQueueExecutor);
-
- class DeclareBindingExecutor : public AmqpTemplate::Executor {
- gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data);
- };
- CAF_DECLARE_SMART_POINTER(DeclareBindingExecutor);
-
- class RemoveBindingExecutor : public AmqpTemplate::Executor {
- gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data);
- };
- CAF_DECLARE_SMART_POINTER(RemoveBindingExecutor);
-
-private:
- bool _isInitialized;
- SmartPtrRabbitTemplate _rabbitTemplate;
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(RabbitAdmin);
-};
-
-CAF_DECLARE_SMART_POINTER(RabbitAdmin);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: Jun 5, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_RABBITTEMPLATE_H_
-#define AMQPINTEGRATIONCORE_RABBITTEMPLATE_H_
-
-#include "ConnectionFactory.h"
-#include "AmqpTemplate.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief Implementation of the RabbitTemplate Integration Object
- */
-class AMQPINTEGRATIONCORE_LINKAGE RabbitTemplate : public AmqpTemplate {
-public:
- RabbitTemplate();
- virtual ~RabbitTemplate();
-
- void init(SmartPtrConnectionFactory connectionFactory);
-
- void term();
-
- void setExchange(const std::string& exchange);
-
- void setRoutingKey(const std::string& routingKey);
-
- void setQueue(const std::string& queue);
-
- void setReplyTimeout(const uint32 replyTimeout);
-
- void setHeaderMapper(const SmartPtrAmqpHeaderMapper& headerMapper);
-
-public: // AmqpTemplate
- void send(
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper());
-
- void send(
- const std::string& routingKey,
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper());
-
- void send(
- const std::string& exchange,
- const std::string& routingKey,
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper());
-
- SmartPtrIIntMessage receive(
- SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper());
-
- SmartPtrIIntMessage receive(
- const std::string& queueName,
- SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper());
-
- SmartPtrIIntMessage sendAndReceive(
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(),
- SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper());
-
- SmartPtrIIntMessage sendAndReceive(
- const std::string& routingKey,
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(),
- SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper());
-
- SmartPtrIIntMessage sendAndReceive(
- const std::string& exchange,
- const std::string& routingKey,
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(),
- SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper());
-
- gpointer execute(SmartPtrExecutor executor, gpointer data);
-
-private:
- void doSend(
- AmqpClient::SmartPtrChannel channel,
- const std::string& exchange,
- const std::string& routingKey,
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper());
-
- SmartPtrIIntMessage doSendAndReceive(
- AmqpClient::SmartPtrChannel channel,
- const std::string& exchange,
- const std::string& routingKey,
- SmartPtrIIntMessage message,
- SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(),
- SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper());
-
-private:
- typedef TBlockingCell<SmartPtrIIntMessage> SynchronousHandoff;
- CAF_DECLARE_SMART_POINTER(SynchronousHandoff);
-
- class DefaultConsumer : public AmqpClient::Consumer {
- public:
- DefaultConsumer();
- virtual ~DefaultConsumer();
-
- void init(
- SmartPtrAmqpHeaderMapper mapper,
- SmartPtrSynchronousHandoff handoff);
-
- void handleConsumeOk(
- const std::string& consumerTag);
-
- void handleCancelOk(
- const std::string& consumerTag);
-
- void handleRecoverOk(
- const std::string& consumerTag);
-
- void handleDelivery(
- const std::string& consumerTag,
- const AmqpClient::SmartPtrEnvelope& envelope,
- const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties,
- const SmartPtrCDynamicByteArray& body);
-
- void handleShutdown(
- const std::string& consumerTag,
- SmartPtrCCafException& reason);
-
- private:
- SmartPtrAmqpHeaderMapper _mapper;
- SmartPtrSynchronousHandoff _handoff;
- };
- CAF_DECLARE_SMART_POINTER(DefaultConsumer);
-
-private:
- static std::string DEFAULT_EXCHANGE;
- static std::string DEFAULT_ROUTING_KEY;
- static int32 DEFAULT_REPLY_TIMEOUT;
-
-private:
- bool _isInitialized;
- std::string _exchange;
- std::string _routingKey;
- std::string _queue;
- uint32 _replyTimeout;
- SmartPtrConnectionFactory _connectionFactory;
- SmartPtrConnection _connection;
- SmartPtrAmqpHeaderMapper _headerMapper;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(RabbitTemplate);
-};
-CAF_DECLARE_SMART_POINTER(RabbitTemplate);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: May 25, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AMQPINTEGRATIONCORE_SIMPLECONNECTION_H_
-#define AMQPINTEGRATIONCORE_SIMPLECONNECTION_H_
-
-#include "Connection.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief A simple object that wraps a AmqpClient::Connection and exposes
- * it as an AmqpIntegration::Connection.
- */
-class AMQPINTEGRATIONCORE_LINKAGE SimpleConnection : public Connection {
-public:
- SimpleConnection();
- virtual ~SimpleConnection();
-
- /**
- * @brief Initialize the object with the given AmqpClient::Connection
- * @param delegate the wrapped AmqpClient::Connection
- */
- void init(const AmqpClient::SmartPtrConnection& delegate);
-
-public: // Connection
- AmqpClient::SmartPtrChannel createChannel();
- void close();
- bool isOpen();
-
-private:
- AmqpClient::SmartPtrConnection _delegate;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(SimpleConnection);
-};
-CAF_DECLARE_SMART_POINTER(SimpleConnection);
-
-}}
-
-#endif
+++ /dev/null
-/*
- * Created on: Aug 1, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef SIMPLEMESSAGELISTENERCONTAINER_H_
-#define SIMPLEMESSAGELISTENERCONTAINER_H_
-
-#include "ConnectionFactory.h"
-#include "BlockingQueueConsumer.h"
-#include "MessageListener.h"
-
-namespace Caf { namespace AmqpIntegration {
-
-/**
- * @ingroup IntObjImpl
- * @brief A simple message listener used by channels to retrieve messages
- * <p>
- * This container manages message acknowledgment, broker connection recoverability and
- * other aspects of consuming from queues.
- */
-class AMQPINTEGRATIONCORE_LINKAGE SimpleMessageListenerContainer :
- public ILifecycle {
-public:
- SimpleMessageListenerContainer();
- virtual ~SimpleMessageListenerContainer();
-
- /**
- * @brief initialize the object
- */
- void init();
-
- /**
- * @brief initialize the object
- * @param connectionFactory the ConnectionFactory
- */
- void init(
- SmartPtrConnectionFactory connectionFactory);
-
-public:
- /**
- * @brief Set the message acknowledgment mode
- * @param acknowledgeMode acknowledgment mode
- */
- void setAcknowledgeMode(AcknowledgeMode acknowledgeMode);
-
- void setPrefetchCount(const uint32 prefetchCount);
-
- void setReceiveTimeout(const uint32 receiveTimeout);
-
- void setRecoveryInterval(const uint32 recoveryInterval);
-
- void setTxSize(const uint32 txSize);
-
- void setQueue(const std::string& queue);
-
- void setConnectionFactory(SmartPtrConnectionFactory connectionFactory);
-
- void setMessagerListener(SmartPtrMessageListener messageListener);
-
- SmartPtrMessageListener getMessageListener();
-
-public: // ILifecycle
- void start(const uint32 timeoutMs);
-
- void stop(const uint32 timeoutMs);
-
- bool isRunning() const;
-
-private:
- void validateConfig();
-
- bool isActive();
-
- bool receiveAndExecute(SmartPtrBlockingQueueConsumer consumer);
-
- void executeListener(
- AmqpClient::SmartPtrChannel channel,
- SmartPtrIIntMessage message);
-
- void doInvokeListener(
- SmartPtrIIntMessage message);
-
- void restart();
-
-private:
- typedef TBlockingCell<SmartPtrCCafException> StartupExceptionHandoff;
- CAF_DECLARE_SMART_POINTER(StartupExceptionHandoff);
-
-private:
- class AsyncMessageProcessingConsumer :
- public IRunnable,
- public IErrorHandler {
- public:
- AsyncMessageProcessingConsumer();
- ~AsyncMessageProcessingConsumer();
- void init(
- SimpleMessageListenerContainer *parent,
- SmartPtrBlockingQueueConsumer consumer,
- SmartPtrStartupExceptionHandoff startupException,
- const uint32 timeout,
- const uint32 recoveryInterval);
- void run();
- void cancel();
- void handleError(
- const SmartPtrIThrowable& throwable,
- const SmartPtrIIntMessage& message) const;
-
- private:
- void handleStartupFailure();
-
- private:
- SimpleMessageListenerContainer *_parent;
- SmartPtrBlockingQueueConsumer _consumer;
- SmartPtrStartupExceptionHandoff _startupException;
- uint32 _timeout;
- uint32 _recoveryInterval;
- bool _isCanceled;
-
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(AsyncMessageProcessingConsumer);
- };
- CAF_DECLARE_SMART_POINTER(AsyncMessageProcessingConsumer);
-
-private:
- bool _isInitialized;
- volatile bool _isRunning;
- volatile bool _isActive;
- bool _debugTrace;
- SmartPtrBlockingQueueConsumer _consumer;
- SmartPtrCSimpleAsyncTaskExecutor _executor;
- SmartPtrStartupExceptionHandoff _startupException;
-
- SmartPtrConnectionFactory _connectionFactory;
- SmartPtrMessageListener _messageListener;
- std::string _queue;
- AcknowledgeMode _acknowledgeMode;
- uint32 _receiveTimeout;
- uint32 _prefetchCount;
- uint32 _txSize;
- uint32 _recoveryInterval;
-
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(SimpleMessageListenerContainer);
-};
-CAF_DECLARE_SMART_POINTER(SimpleMessageListenerContainer);
-
-}}
-
-#endif /* SIMPLEMESSAGELISTENERCONTAINER_H_ */
+++ /dev/null
-/*
- * Created on: Aug 20, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef AmqpListenerWorker_h
-#define AmqpListenerWorker_h
-
-namespace Caf {
-
-class AmqpListenerWorker :
- public IWork
-{
-public:
- AmqpListenerWorker();
- virtual ~AmqpListenerWorker();
-
- void doWork();
- void stopWork();
-
-private:
- CThreadSignal _stopSignal;
- CAF_THREADSIGNAL_CREATE;
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(AmqpListenerWorker);
-};
-CAF_DECLARE_SMART_POINTER(AmqpListenerWorker);
-}
-
-#endif /* AmqpListenerWorker_h */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: June 25, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#include "stdafx.h"
-#include "CWinService.h"
-#include <process.h>
-
-bool CWinService::s_isInitialized = false;
-SmartPtrCWinServiceState CWinService::s_winServiceState;
-SmartPtrCWinServiceInstance CWinService::s_winServiceInstance;
-
-////////////////////////////////////////////////////////////////////////
-//
-// controlHandler()
-//
-// Handler for the break event when running in console mode
-//
-////////////////////////////////////////////////////////////////////////
-BOOL WINAPI controlHandler(
- DWORD dwCtrlType) {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "controlHandler");
-
- try {
- switch(dwCtrlType) {
- case CTRL_BREAK_EVENT: // use Ctrl+C or Ctrl+Break to simulate
- case CTRL_C_EVENT: // SERVICE_CONTROL_STOP in debug mode
- CAF_CM_LOG_DEBUG_VA0("Received Ctrl+C or Ctrl+Break... Stopping the service");
- CWinService::s_winServiceState->signalServiceStop();
- return TRUE;
- break;
- }
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_LOG_CRIT_CAFEXCEPTION;
- const BOOL rc = (CAF_CM_ISEXCEPTION) ? FALSE : TRUE;
- CAF_CM_CLEAREXCEPTION;
-
- return rc;
-}
-
-uint32 __stdcall Caf::serviceWorkerThreadFunc(
- void* pThreadContext) {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "serviceWorkerThreadFunc");
-
- try {
- // Bring the thread into the correct scope
- CWinService::s_winServiceInstance->runWorkerThread();
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_LOG_CRIT_CAFEXCEPTION;
- const uint32 rc = (CAF_CM_ISEXCEPTION) ? -1 : 0;
- CAF_CM_CLEAREXCEPTION;
-
- return rc;
-}
-
-void CWinService::initialize(
- const SmartPtrIWork& work) {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "initialize");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISNOTINITIALIZED(s_isInitialized);
- CAF_CM_VALIDATE_SMARTPTR(work);
-
- s_winServiceState.CreateInstance();
- s_winServiceState->initialize(
- "VMwareCAFCommAmqpListener",
- "VMware CAF AMQP Communication Service",
- "VMware Common Agent AMQP Communication Service",
- work);
-
- s_winServiceInstance.CreateInstance();
- s_winServiceInstance->initialize(s_winServiceState);
- s_isInitialized = true;
- }
- CAF_CM_EXIT;
-}
-
-void CWinService::execute(
- int32 argc,
- char** argv) {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "execute");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized);
-
- // Figure out what to do based on the optional command line argument
- const CWinServiceInstance::SCommandLineParams commandLineParams =
- s_winServiceInstance->processCommandLine(argc, argv);
- switch (commandLineParams._eMode) {
- case CWinServiceInstance::EModeRunAsService:
- CAF_CM_LOG_DEBUG_VA0("Running the service");
- run();
- break;
-
- case CWinServiceInstance::EModeRunAsConsole:
- CAF_CM_LOG_DEBUG_VA0("Running as console");
- runAsConsole();
- break;
-
- case CWinServiceInstance::EModeRegister: {
- CAF_CM_LOG_DEBUG_VA0("Installing the service");
- const std::string currentFile = FileSystemUtils::getCurrentFile();
- s_winServiceInstance->install(currentFile);
- }
- break;
-
- case CWinServiceInstance::EModeUnregister:
- CAF_CM_LOG_DEBUG_VA0("Uninstalling the service");
- s_winServiceInstance->uninstall();
- break;
-
- default:
- std::string cmdLine;
- for (int32 index = 0; index < argc; index++) {
- cmdLine += argv[index];
- cmdLine += " ";
- }
- CAF_CM_EXCEPTIONEX_VA2(
- InvalidHandleException, E_FAIL,
- "Invalid mode returned from processCommandLine - Mode: %d, cmdLine: %s",
- static_cast<DWORD>(commandLineParams._eMode), cmdLine.c_str());
- break;
- }
- }
- CAF_CM_EXIT;
-}
-
-void CWinService::run() {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "run");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized);
-
- const std::string serviceName = s_winServiceState->getServiceName();
-
- // build the table of Services in this exe, name and the address of the
- // Service's main function terminated by NULL's
- SERVICE_TABLE_ENTRYA stbl[] =
- {
- {
- const_cast<char*>(serviceName.c_str()),
- reinterpret_cast<LPSERVICE_MAIN_FUNCTIONA>(CWinService::serviceMain)
- },
- {
- NULL,
- NULL
- }
- };
-
- // call the SCM. We have 30 seconds to execute this call. If it fails to
- // execute within that time, the SCM will assume that something is wrong
- // and terminate this process...
- if (::StartServiceCtrlDispatcherA(stbl) == FALSE) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError, "::StartServiceCtrlDispatcher() Failed - serviceName: \"%s\", msg: \"%s\"",
- serviceName.c_str(), errorMsg.c_str());
- }
- }
- CAF_CM_EXIT;
-}
-
-void CWinService::runAsConsole() {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "runAsConsole");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized);
-
- ::SetConsoleCtrlHandler(controlHandler, TRUE);
-
- CWinService::s_winServiceState->putIsService(false);
- CWinService::serviceMain(0, NULL);
- }
- CAF_CM_EXIT;
-}
-
-void CALLBACK CWinService::serviceMain(
- const DWORD cdwArgc,
- LPCWSTR* plpwszArgv) {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "serviceMain");
-
- try {
- // This is a new thread from the SCM
- CafInitialize::init();
-
- CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized);
-
- const std::string serviceName = s_winServiceState->getServiceName();
-
- // Register our handler routine with the SCM.
- // The function that we are registering will be called when certain
- // events occur like : starting, stopping, pausing this Service
- if (s_winServiceState->getIsService()) {
- const SERVICE_STATUS_HANDLE serviceHandle = ::RegisterServiceCtrlHandlerExA(
- serviceName.c_str(), CWinService::scmHandlerEx, NULL);
- if (! serviceHandle) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError, "::RegisterServiceCtrlHandlerEx() Failed - serviceName: \"%s\", msg: \"%s\"",
- serviceName.c_str(), errorMsg.c_str());
- }
-
- s_winServiceState->putServiceHandle(serviceHandle);
- }
-
- // Let the SCM know that the service is starting.
- s_winServiceState->putCurrentServiceState(SERVICE_START_PENDING);
- if (s_winServiceState->getIsService()) {
- s_winServiceState->setStatus();
- }
-
- // Creates the worker thread.
- createWorkerThread();
-
- // Runs the Service
- s_winServiceInstance->runService();
-
- // Let the SCM know that we've stopped.
- s_winServiceState->putCurrentServiceState(SERVICE_STOPPED);
- if (s_winServiceState->getIsService()) {
- s_winServiceState->setStatus();
- }
-
- // Close all of the handles.
- s_winServiceState->close();
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_LOG_CRIT_CAFEXCEPTION;
- CAF_CM_CLEAREXCEPTION;
-
- CafInitialize::term();
-}
-
-DWORD CWinService::scmHandlerEx(
- DWORD dwCommand,
- DWORD dwEventType,
- LPVOID lpEventData,
- LPVOID lpContext) {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "scmHandlerEx");
-
- try {
- CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized);
-
- switch(dwCommand) {
- case SERVICE_CONTROL_STOP:
- case SERVICE_CONTROL_SHUTDOWN:
- case SERVICE_CONTROL_POWEREVENT: {
- CAF_CM_LOG_INFO_VA0("Caught stop, shutdown or power event");
-
- // Let the SCM know that we're in the process of stopping.
- s_winServiceState->putCurrentServiceState(SERVICE_STOP_PENDING);
- s_winServiceState->setStatus();
-
- // Signal the event that tells us to stop.
- s_winServiceState->signalServiceStop();
- }
- break;
-
- case SERVICE_CONTROL_INTERROGATE: {
- CAF_CM_LOG_INFO_VA0("Caught interrogate event");
-
- // Let the SCM know our current state.
- s_winServiceState->setStatus();
- }
- break;
- default:
- CAF_CM_LOG_WARN_VA1("Unhandled command - %d", dwCommand);
- break;
- }
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_LOG_CRIT_CAFEXCEPTION;
- CAF_CM_CLEAREXCEPTION;
-
- return NO_ERROR;
-}
-
-void CWinService::createWorkerThread() {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "createWorkerThread");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized);
-
- // Create the thread.
- uint32 uiThreadAddress = 0;
- UINT_PTR uipRc = ::_beginthreadex(NULL, 0, ::serviceWorkerThreadFunc, NULL, 0, &uiThreadAddress);
- if (0 == uipRc) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA1(lastError, "::_beginthreadex() Failed - msg: \"%s\"",
- errorMsg.c_str());
- }
- }
- CAF_CM_EXIT;
-}
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: June 25, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CWinService_h_
-#define CWinService_h_
-
-namespace Caf {
-
-class CWinService {
-public:
- /// Initializes the static service class.
- static void initialize(
- const SmartPtrIWork& work);
-
- /// Parses the command line and executes the server
- static void execute(int32 argc, char** argv);
-
-private:
- /// Spawns the worker thread to run the service
- static void run();
-
- /// Runs the service in console mode for debugging
- static void runAsConsole();
-
-private:
- /// Each Service (there can be more than one) exposes its own main function
- /// This function's pointer was passed into the SCM in the run method
- /// For each of these main functions the SCM will create a thread.
- static void CALLBACK serviceMain(
- const DWORD cdwArgc,
- LPCWSTR* plpwszArgv);
-
- /// Notification callback function for the SCM that's called when the state of
- /// the Service must be changed.
- static DWORD CALLBACK scmHandlerEx(
- DWORD dwCommand,
- DWORD dwEventType,
- LPVOID lpEventData,
- LPVOID lpContext );
-
-private:
- // Creates the service's main working thread which performs the work of this service.
- static void createWorkerThread();
-
-private:
- /// When CWinService::createWorkerThread() creates the helper-thread,
- /// it calls this global function. This function simply redirects the thread
- /// back into the main class.
- friend uint32 __stdcall serviceWorkerThreadFunc(
- void* pThreadContext);
-
-public:
- static bool s_isInitialized;
- static SmartPtrCWinServiceState s_winServiceState;
- static SmartPtrCWinServiceInstance s_winServiceInstance;
-
-private:
- CAF_CM_DECLARE_NOCREATE(CWinService);
-};
-
-}
-
-#endif // #ifndef CWinService_h_
+++ /dev/null
-<caf:beans>
-
- <bean
- id="headerExpr"
- class="com.vmware.commonagent.integration.headerexpressioninvoker" />
-
- <bean
- id="connectionFactory"
- class="com.vmware.caf.comm.integration.amqp.caching.connection.factory">
- <property name="host" value="${var:communication_amqp:broker}"/>
- <property name="virtualHost" value="${var:communication_amqp:vhost}"/>
- <property name="connectionTimeout" value="${var:communication_amqp:connection_timeout}"/>
- <property name="channelCacheSize" value="${var:communication_amqp:channel_cache_size}"/>
- </bean>
-
- <rabbit-template
- id="amqpTemplate"
- connection-factory="connectionFactory"
- reply-timeout="${var:communication_amqp:reply_timeout}" />
-
- <rabbit-admin
- id="amqpAdmin"
- connection-factory="connectionFactory" />
-
-
-
- <!-- INTEGRATION SYSTEM BEANS -->
- <bean
- id="errorChannelBean"
- class="com.vmware.commonagent.integration.channels.errorchannel" />
- <bean
- id="nullChannelBean"
- class="com.vmware.commonagent.integration.channels.nullchannel" />
- <bean
- id="integrationObjectFactory"
- class="com.vmware.commonagent.integration.objectfactory" />
- <bean
- id="amqpIntegrationObjects"
- class="com.vmware.caf.comm.integration.objects" />
- <bean
- id="commIntegrationObjectFactory"
- class="com.vmware.caf.comm.integration.objectfactory" />
-
-</caf:beans>
+++ /dev/null
-[globals]
-root_dir=/Users/mdonahue/src/vcm/common-agent/main/Cpp/Subsystems/Communication/src/services/amqpListener
-data_dir=${root_dir}/data
-log_dir=${root_dir}/log
-log_config_file=${root_dir}/log4cpp_config
-thread_stack_size_kb=0
-
-[app]
-startup-timeout=30000
-shutdown-timeout=30000
-context-file=${root_dir}/commAmqpListener-context.xml
-
-[amqp]
-broker=127.0.0.1
-vhost=caf
-connection_timeout=5000
-connection_retry_interval=5000
-channel_cache_size=4
-reply_timeout=5000
-
-[subsystems]
-# INTEGRATION SYSTEM BEANS
-com.vmware.commonagent.integration.objectfactory=IntegrationSubsys
-com.vmware.commonagent.integration.channels.errorchannel=IntegrationSubsys
-com.vmware.commonagent.integration.channels.nullchannel=IntegrationSubsys
-com.vmware.caf.comm.integration.objectfactory=CommIntegration
-com.vmware.caf.comm.integration.replytoresolver=CommIntegration
-com.vmware.caf.comm.integration.eventtopiccalculator=CommIntegration
-
-# Amqp Listener Context Beans
-com.vmware.caf.comm.integration.amqp.caching.connection.factory=CommAmqpIntegration
-com.vmware.caf.comm.integration.objects=CommAmqpIntegration
-com.vmware.commonagent.integration.headerexpressioninvoker=IntegrationSubsys
+++ /dev/null
-#log4j.rootCategory=DEBUG, console, file
-log4j.rootCategory=DEBUG, file
-
-#log4j.category.CApplicationContext=INFO
-log4j.category.CIntegrationAppContext=DEBUG
-log4j.category.CSqliteTableImpl=INFO
-log4j.category.CSqliteUtil=INFO
-log4j.category.CSqliteConnection=INFO
-
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n
-
-log4j.appender.file=org.apache.log4j.FileAppender
-log4j.appender.file.fileName=log4cpp_file.log
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n
+++ /dev/null
-#!/bin/sh
-LIB_BASE=$HOME/src/vcm/common-agent/main/Cpp
-LIB_DIR=lib/mac64
-TOOLCHAIN=$HOME/toolchain/mac64
-LOG4CPP_LIB=$TOOLCHAIN/log4cpp-1.0/lib
-export DYLD_LIBRARY_PATH=$LIB_BASE/Base/$LIB_DIR:$LIB_BASE/Common/$LIB_DIR:$LOG4CPP_LIB:$LIB_BASE/Subsystems/Integration/$LIB_DIR:$LIB_BASE/Subsystems/Communication/$LIB_DIR:$LIB_BASE/Subsystems/Communication/vmcfsdk/lib/mac64
-export CAF_APPCONFIG=$HOME/src/vcm/common-agent/main/Cpp/Subsystems/Communication/src/services/amqpListener/commAmqpListener.config
-./Release_mac64/CommAmqpListener -n
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CAFCORETYPESDOCINC_H_
-#define CAFCORETYPESDOCINC_H_
-
-namespace Caf {
- typedef enum {
- PROPERTY_NONE,
- PROPERTY_STRING,
- PROPERTY_SINT32,
- PROPERTY_UINT32,
- PROPERTY_SINT64,
- PROPERTY_UINT64,
- PROPERTY_DECIMAL,
- PROPERTY_DOUBLE,
- PROPERTY_BOOLEAN,
- PROPERTY_DATETIME
- } PROPERTY_TYPE;
-
- typedef enum {
- PARAMETER_NONE,
- PARAMETER_STRING,
- PARAMETER_SINT32,
- PARAMETER_UINT32,
- PARAMETER_SINT64,
- PARAMETER_UINT64,
- PARAMETER_DECIMAL,
- PARAMETER_DOUBLE,
- PARAMETER_BOOLEAN,
- PARAMETER_DATETIME
- } PARAMETER_TYPE;
-
- typedef enum {
- LOGGINGLEVEL_NONE,
- LOGGINGLEVEL_DEBUG,
- LOGGINGLEVEL_INFO,
- LOGGINGLEVEL_WARN,
- LOGGINGLEVEL_ERROR,
- LOGGINGLEVEL_CRITICAL
- } LOGGINGLEVEL_TYPE;
-
- typedef enum {
- LOGGINGCOMPONENT_NONE,
- LOGGINGCOMPONENT_COMMUNICATIONS,
- LOGGINGCOMPONENT_MANAGEMENTAGENT,
- LOGGINGCOMPONENT_UINT32,
- LOGGINGCOMPONENT_PROVIDERFRAMEWORK,
- LOGGINGCOMPONENT_PROVIDER
- } LOGGINGCOMPONENT_TYPE;
-
- typedef enum {
- CMS_POLICY_NONE,
- CMS_POLICY_CAF_ENCRYPTED,
- CMS_POLICY_CAF_SIGNED,
- CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED,
- CMS_POLICY_APP_SIGNED,
- CMS_POLICY_APP_ENCRYPTED,
- CMS_POLICY_APP_ENCRYPTED_AND_SIGNED
- } CMS_POLICY;
-}
-
-#include "CFullyQualifiedClassGroupDoc.h"
-#include "CAttachmentNameCollectionDoc.h"
-
-#include "CLoggingLevelElemDoc.h"
-#include "CLoggingLevelCollectionDoc.h"
-
-#include "CRequestInstanceParameterDoc.h"
-#include "CRequestParameterDoc.h"
-
-#include "CInlineAttachmentDoc.h"
-#include "CInlineAttachmentCollectionDoc.h"
-
-#include "CAttachmentDoc.h"
-#include "CAttachmentCollectionDoc.h"
-
-#include "CParameterCollectionDoc.h"
-#include "COperationDoc.h"
-
-#include "CPropertyDoc.h"
-#include "CPropertyCollectionDoc.h"
-
-#include "CAddInCollectionDoc.h"
-#include "CAddInsDoc.h"
-
-#include "CAuthnAuthzDoc.h"
-#include "CAuthnAuthzCollectionDoc.h"
-
-#include "CProtocolDoc.h"
-#include "CProtocolCollectionDoc.h"
-
-#include "CRequestConfigDoc.h"
-#include "CRequestHeaderDoc.h"
-
-#include "CClassFiltersDoc.h"
-#include "CClassSpecifierDoc.h"
-#include "CStatisticsDoc.h"
-
-#endif /* CAFCORETYPESDOCINC_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CAFINSTALLREQUESTDOCINC_H_
-#define CAFINSTALLREQUESTDOCINC_H_
-
-namespace Caf {
- typedef enum {
- PACKAGE_OS_NONE,
- PACKAGE_OS_ALL,
- PACKAGE_OS_NIX,
- PACKAGE_OS_WIN
- } PACKAGE_OS_TYPE;
-}
-
-#include "CPackageDefnDoc.h"
-#include "CMinPackageElemDoc.h"
-#include "CFullPackageElemDoc.h"
-
-#include "CInstallPackageSpecDoc.h"
-#include "CInstallProviderSpecDoc.h"
-
-#include "CGetInventoryJobDoc.h"
-#include "CUninstallProviderJobDoc.h"
-#include "CInstallProviderJobDoc.h"
-
-#include "CInstallBatchDoc.h"
-#include "CInstallRequestDoc.h"
-
-#endif /* CAFINSTALLREQUESTINC_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef DIAGREQUESTDOCINC_H_
-#define DIAGREQUESTDOCINC_H_
-
-#include "CDiagRequestDoc.h"
-
-#endif /* DIAGREQUESTDOCINC_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef DIAGTYPESDOCINC_H_
-#define DIAGTYPESDOCINC_H_
-
-namespace Caf {
-}
-
-#include "CDiagDeleteValueDoc.h"
-#include "CDiagDeleteValueCollectionDoc.h"
-
-#include "CDiagSetValueDoc.h"
-#include "CDiagSetValueCollectionDoc.h"
-
-#include "CDiagCollectInstancesDoc.h"
-
-#include "CDiagBatchDoc.h"
-
-#endif /* DIAGTYPESDOCINC_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef MTMTREQUESTDOCINC_H_
-#define MTMTREQUESTDOCINC_H_
-
-namespace Caf {
-}
-
-#include "CMgmtRequestDoc.h"
-
-#endif /* MTMTREQUESTDOCINC_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef MGMTTYPESDOCINC_H_
-#define MGMTTYPESDOCINC_H_
-
-namespace Caf {
-}
-
-#include "CMgmtCollectSchemaDoc.h"
-
-#include "CMgmtCollectInstancesDoc.h"
-#include "CMgmtCollectInstancesCollectionDoc.h"
-
-#include "CMgmtInvokeOperationDoc.h"
-#include "CMgmtInvokeOperationCollectionDoc.h"
-
-#include "CMgmtBatchDoc.h"
-
-#endif /* MGMTTYPESDOCINC_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef MULTIPMEMGMTREQUESTDOCINC_H_
-#define MULTIPMEMGMTREQUESTDOCINC_H_
-
-#include "CPmeIdCollectionDoc.h"
-#include "CMultiPmeMgmtBatchDoc.h"
-#include "CMultiPmeMgmtBatchCollectionDoc.h"
-#include "CMultiPmeMgmtRequestDoc.h"
-
-#endif /* MULTIPMEMGMTREQUESTDOCINC_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef PayloadEnvelopeDocInc_H_
-#define PayloadEnvelopeDocInc_H_
-
-#include "CPayloadEnvelopeDoc.h"
-
-#endif /* PayloadEnvelopeDocInc_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef PersistenceDocInc_H_
-#define PersistenceDocInc_H_
-
-#include "CCertCollectionDoc.h"
-#include "CCertPathCollectionDoc.h"
-#include "CPersistenceProtocolDoc.h"
-#include "CPersistenceProtocolCollectionDoc.h"
-#include "CRemoteSecurityDoc.h"
-#include "CRemoteSecurityCollectionDoc.h"
-#include "CLocalSecurityDoc.h"
-#include "CPersistenceDoc.h"
-
-#endif /* PersistenceDocInc_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef PROVIDERINFRADOCINC_H_
-#define PROVIDERINFRADOCINC_H_
-
-#include "CClassCollectionDoc.h"
-#include "CProviderRegDoc.h"
-#include "CSchemaSummaryDoc.h"
-
-#endif /* PROVIDERINFRADOCINC_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef PROVIDERREQUESTDOCINC_H_
-#define PROVIDERREQUESTDOCINC_H_
-
-#include "CProviderCollectInstancesDoc.h"
-#include "CProviderCollectInstancesCollectionDoc.h"
-
-#include "CProviderInvokeOperationDoc.h"
-#include "CProviderInvokeOperationCollectionDoc.h"
-
-#include "CProviderRequestConfigDoc.h"
-#include "CProviderRequestHeaderDoc.h"
-
-#include "CProviderBatchDoc.h"
-
-#include "CProviderRequestDoc.h"
-#include "CProviderCollectSchemaRequestDoc.h"
-
-#endif /* PROVIDERREQUESTDOCINC_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef PROVIDERRESULTSDOCINC_H_
-#define PROVIDERRESULTSDOCINC_H_
-
-#include "CDefinitionObjectCollectionDoc.h"
-#include "CRequestIdentifierDoc.h"
-#include "CSchemaDoc.h"
-#include "CCdifDoc.h"
-
-#endif /* PROVIDERRESULTSDOCINC_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef RESPONSEDOCINC_H_
-#define RESPONSEDOCINC_H_
-
-#include "CEventKeyDoc.h"
-#include "CEventKeyCollectionDoc.h"
-
-#include "CManifestDoc.h"
-#include "CManifestCollectionDoc.h"
-
-#include "CResponseHeaderDoc.h"
-#include "CErrorResponseDoc.h"
-#include "CEventManifestDoc.h"
-#include "CProviderEventResponseDoc.h"
-#include "CProviderResponseDoc.h"
-#include "CResponseDoc.h"
-
-#endif /* RESPONSEDOCINC_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef SCHEMATYPESDOCINC_H_
-#define SCHEMATYPESDOCINC_H_
-
-namespace Caf {
-
- typedef enum {
- OPERATOR_NONE,
- OPERATOR_EQUAL
- } OPERATOR_TYPE;
-
- typedef enum {
- ARITY_NONE,
- ARITY_UNSIGNED_BYTE = 2
- } ARITY_TYPE;
-
- typedef enum {
- VALIDATOR_NONE,
- VALIDATOR_ENUM,
- VALIDATOR_RANGE,
- VALIDATOR_REGEX,
- VALIDATOR_CUSTOM
- } VALIDATOR_TYPE;
-
- // Forward declare
- CAF_DECLARE_CLASS_AND_SMART_POINTER(CDataClassSubInstanceDoc);
-}
-
-#include "CInstanceOperationDoc.h"
-#include "CInstanceOperationCollectionDoc.h"
-#include "CActionClassInstanceDoc.h"
-#include "CActionClassInstanceCollectionDoc.h"
-
-#include "CCmdlMetadataDoc.h"
-#include "CCmdlUnionDoc.h"
-#include "CDataClassPropertyDoc.h"
-#include "CDataClassSubInstanceDoc.h"
-#include "CDataClassInstanceDoc.h"
-#include "CDataClassInstanceCollectionDoc.h"
-
-#include "CMethodParameterDoc.h"
-#include "CInstanceParameterDoc.h"
-
-#include "CClassIdentifierDoc.h"
-
-#include "CMethodDoc.h"
-#include "CCollectMethodDoc.h"
-#include "CActionClassDoc.h"
-
-#include "CClassPropertyDoc.h"
-
-#include "CClassFieldDoc.h"
-#include "CJoinTypeDoc.h"
-
-#include "CClassCardinalityDoc.h"
-#include "CClassInstancePropertyDoc.h"
-#include "CDataClassDoc.h"
-#include "CLogicalRelationshipDoc.h"
-#include "CPhysicalRelationshipDoc.h"
-#include "CRelationshipDoc.h"
-
-#endif /* SCHEMATYPESDOCINC_H_ */
+++ /dev/null
-/*
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef BasePlatformInc_h_
-#define BasePlatformInc_h_
-
-#ifndef BASEPLATFORM_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define BASEPLATFORM_LINKAGE __declspec(dllexport)
- #else
- #define BASEPLATFORM_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define BASEPLATFORM_LINKAGE
- #endif
-#endif
-
-#include "PlatformTypes.h"
-#include "PlatformDefines.h"
-#include "PlatformErrors.h"
-#include "PlatformIID.h"
-#include "PlatformStringFunc.h"
-#include "ICafObject.h"
-#include "TCafObject.h"
-#include "TCafQIObject.h"
-#include "TCafSmartPtr.h"
-#include "TCafStackObject.h"
-
-CAF_DECLARE_SMART_INTERFACE_POINTER(ICafObject);
-
-#endif
+++ /dev/null
-/*
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef BasePlatformLink_h_
-#define BasePlatformLink_h_
-
-#include "BasePlatformInc.h"
-
-#include <deque>
-#include <vector>
-#include <set>
-#include <list>
-#include <map>
-
-namespace Caf {
-
-// Basic string containers
-typedef std::deque<std::string> Cdeqstr;
-typedef std::set<std::string> Csetstr;
-typedef std::vector<std::string> Cvecstr;
-typedef std::map<std::string, std::string> Cmapstrstr;
-typedef std::multimap<std::string, std::string> Cmmapstrstr;
-CAF_DECLARE_SMART_POINTER(Cdeqstr);
-CAF_DECLARE_SMART_POINTER(Csetstr);
-CAF_DECLARE_SMART_POINTER(Cvecstr);
-CAF_DECLARE_SMART_POINTER(Cmapstrstr);
-CAF_DECLARE_SMART_POINTER(Cmmapstrstr);
-
-// GUID containers
-typedef std::vector<GUID> Cvecguid;
-typedef std::deque<GUID> Cdeqguid;
-CAF_DECLARE_SMART_POINTER(Cvecguid);
-CAF_DECLARE_SMART_POINTER(Cdeqguid);
-
-struct SGuidLessThan
-{
- bool operator()(const GUID clhs, const GUID crhs) const
- {
- return ::memcmp(&clhs, &crhs, sizeof(GUID)) < 0;
- }
-};
-
-typedef std::set<GUID, SGuidLessThan> Csetguid;
-CAF_DECLARE_SMART_POINTER(Csetguid);
-
-// class to extract first part of a pair
-template <typename T>
-struct select1st
-{
- typename T::first_type operator()(const T & p) const { return p.first; }
-};
-
-// template function to make use of select1st easy.
-// T is a container whose value_type is a pair
-template <typename T>
-select1st<typename T::value_type> make_select1st(const T &) { return select1st<typename T::value_type>(); };
-
-// class to extract second part of a pair
-template <typename T>
-struct select2nd
-{
- typename T::second_type operator()(const T & p) const { return p.second; }
-};
-
-// template function to make use of select2nd easy.
-// T is a container whose value_type is a pair
-template <typename T>
-select2nd<typename T::value_type> make_select2nd(const T &) { return select2nd<typename T::value_type>(); };
-
-}
-
-#ifdef WIN32
-#include "PlatformApi.h"
-#endif
-
-#endif
-
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Jul 2009
- *
- * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CApplicationContext_h_
-#define CApplicationContext_h_
-
-namespace Caf {
-
-CAF_DECLARE_CLASS_AND_SMART_POINTER( CApplicationContext);
-
-class COMMONAGGREGATOR_LINKAGE CApplicationContext : public IAppContext {
-private:
- // Bean constructor arguments
- struct CBeanCtorArg {
- typedef enum {
- NOT_SET,
- REFERENCE,
- VALUE
- } ARG_TYPE;
-
- CBeanCtorArg(const ARG_TYPE type, const std::string& value) :
- _type(type),
- _value(value) {}
-
- ARG_TYPE _type;
- std::string _value;
- };
-
- // key=constructor-arg index
- typedef std::map<uint32, CBeanCtorArg> CBeanCtorArgCollection;
-
- struct CBeanNode {
- CBeanNode() :
- _isInitialized(false) {}
-
- std::string _id;
- std::string _class;
- SmartPtrIBean _bean;
- CBeanCtorArgCollection _ctorArgs;
- Cmapstrstr _properties;
- bool _isInitialized;
- };
- CAF_DECLARE_SMART_POINTER(CBeanNode);
-
- struct CBeanNodeLess {
- bool operator()(
- const SmartPtrCBeanNode& lhs,
- const SmartPtrCBeanNode& rhs) const {
- return std::less<std::string>()(lhs->_id, rhs->_id);
- }
- };
-
- typedef TEdgeListGraph<SmartPtrCBeanNode, CBeanNodeLess> CBeanGraph;
-
- // key=bean id
- typedef std::map<std::string, SmartPtrCBeanNode> CBeanCollection;
-
-public:
- CApplicationContext();
- virtual ~CApplicationContext();
-
-public:
- void initialize();
- void initialize(const Cdeqstr& filenameCollection);
-
- void terminate();
-
- SmartPtrCBeans getBeans() const;
-
-public: // IApplicationContext
- SmartPtrIBean getBean(const std::string& name) const;
-
-private:
- bool m_isInitialized;
- CBeanCollection _beanCollection;
- CBeanGraph::ClistVertexEdges _beanTopologySort;
- Cdeqstr _filenameCollection;
-
-private:
- std::string getDefaultBeanConfigFile() const;
-
- void parseBeanConfig(
- const std::string& beanConfigFile,
- CBeanCollection& beanCollection) const;
-
- void createBeanGraph(
- CBeanCollection& beanCollection,
- CBeanGraph& beanGraph,
- CBeanGraph::ClistVertexEdges& beanTopologySort) const;
-
- void initializeBeans(
- CBeanCollection& beanCollection,
- CBeanGraph::ClistVertexEdges& beanTopologySort) const;
-
- void terminateBeans(CBeanGraph::ClistVertexEdges& beanTopologySort) const;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CApplicationContext);
-};
-
-}
-
-#endif // #ifndef CApplicationContext_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 29, 2014
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CAUTOCONDITION_H_
-#define CAUTOCONDITION_H_
-
-namespace Caf {
-
-class COMMONAGGREGATOR_LINKAGE CAutoCondition {
-public:
- CAutoCondition();
- ~CAutoCondition();
-
- void initialize(const std::string& name);
- bool isInitialized() const;
-
- void close();
-
- std::string getName() const;
-
- void signal();
- void wait(SmartPtrCAutoMutex& mutex);
- bool waitUntil(SmartPtrCAutoMutex& mutex, gint64 endTime);
-
-private:
- GCond _condition;
- std::string _name;
- bool _isInitialized;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CAutoCondition);
-};
-CAF_DECLARE_SMART_POINTER(CAutoCondition);
-}
-
-#endif /* CAUTOCONDITION_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 29, 2014
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CAUTOMUTEX_H_
-#define CAUTOMUTEX_H_
-
-namespace Caf {
-
-class COMMONAGGREGATOR_LINKAGE CAutoMutex {
-public:
- CAutoMutex();
- ~CAutoMutex();
-
- void initialize();
- bool isInitialized() const;
-
- void lock(const char* className = NULL, const char* funcName = NULL, const int32 lineNumber = 0);
- void unlock(const char* className = NULL, const char* funcName = NULL, const int32 lineNumber = 0);
-
- GMutex* getNonConstPtr();
-
-private:
- GMutex _mutex;
- bool _isInitialized;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CAutoMutex);
-};
-CAF_DECLARE_SMART_POINTER(CAutoMutex);
-
-}
-
-#endif /* CAUTOMUTEX_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 29, 2014
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CAUTORECMUTEX_H_
-#define CAUTORECMUTEX_H_
-
-namespace Caf {
-
-class COMMONAGGREGATOR_LINKAGE CAutoRecMutex {
-public:
- CAutoRecMutex();
- ~CAutoRecMutex();
-
- void initialize();
- bool isInitialized() const;
-
- void lock(const char* className = NULL, const char* funcName = NULL, const int32 lineNumber = 0);
- void unlock(const char* className = NULL, const char* funcName = NULL, const int32 lineNumber = 0);
-
- GRecMutex* getNonConstPtr();
-
-private:
- GRecMutex _mutex;
- bool _isInitialized;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CAutoRecMutex);
-};
-CAF_DECLARE_SMART_POINTER(CAutoRecMutex);
-
-}
-
-#endif /* CAUTORECMUTEX_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Jan 21, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCAFREGEX_H_
-#define CCAFREGEX_H_
-
-namespace Caf {
-
-class COMMONAGGREGATOR_LINKAGE CCafRegex {
-public:
- CCafRegex();
- virtual ~CCafRegex();
-
-public:
- void initialize(const std::string& regex);
-
- bool isMatched(const std::string& source);
-
- std::map<std::string, std::string> matchNames(
- const std::string& source,
- const std::set<std::string>& names);
-
- std::deque<std::string> matchName(
- const std::string& source,
- const std::string& name);
-
- std::string match(
- const std::string& source,
- const int32 matchNum);
-
- std::string replaceLiteral(
- const std::string& source,
- const std::string& replacement);
-
-public:
- static std::string replaceLiteral(
- const std::string& regex,
- const std::string& source,
- const std::string& replacement);
-
-private:
- bool _isInitialized;
- GRegex* _gRegex;
- std::string _regex;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CCafRegex);
-};
-
-CAF_DECLARE_SMART_POINTER(CCafRegex);
-
-}
-
-#endif /* CCAFREGEX_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Jul 2009
- *
- * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCmdLineOptions_h_
-#define CCmdLineOptions_h_
-
-namespace Caf {
-
-class COMMONAGGREGATOR_LINKAGE CCmdLineOptions {
-private:
- typedef std::map<std::string, gchar*> CStringOptions;
- typedef std::map<std::string, gint> CIntOptions;
- typedef std::map<std::string, gboolean> CBoolOptions;
-
-public:
- CCmdLineOptions();
- virtual ~CCmdLineOptions();
-
-public:
- void initialize(const std::string& cmdDescription, const uint32 maxOptions);
- void parse(int32 argc, char* argv[]);
-
- void addStringOption(const std::string& longName, const char shortName, const std::string& optionDescription);
- void addIntOption(const std::string& longName, const char shortName, const std::string& optionDescription);
- void addBoolOption(const std::string& longName, const char shortName, const std::string& optionDescription);
-
- std::string findStringOption(const std::string& longName);
- int32 findIntOption(const std::string& longName);
- bool findBoolOption(const std::string& longName);
-
-private:
- bool _isInitialized;
- uint32 _optionCnt;
- std::string _cmdDescription;
-
- uint32 _maxOptions;
- GOptionEntry* _gOptions;
-
- CStringOptions _stringOptions;
- CIntOptions _intOptions;
- CBoolOptions _boolOptions;
-
- // Temporary for storing longNames and optionDescription for addFooOption() methods above.
- std::vector<std::string> _longNames, _optionDescriptions;
-
-private:
- void checkOptionCnt(
- const std::string& longName,
- const uint32 optionCnt,
- const uint32 maxOptions) const;
- void populateOption(
- GOptionEntry& optionEntry,
- const std::string& longName,
- const char shortName,
- const std::string& optionDescription);
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CCmdLineOptions);
-};
-
-CAF_DECLARE_SMART_POINTER( CCmdLineOptions);
-
-}
-
-#endif // #ifndef CCmdLineOptions_h_
+++ /dev/null
-/*
- * Author: mdonahue
- * Created: Jan 17, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCONFIGPARAMS_H_
-#define CCONFIGPARAMS_H_
-
-namespace Caf {
-
-/*
- * This class wraps a GHashTable object where the key is a const char* and
- * the value is a GVariant*.
- *
- * The key and value pointers inserted must exist for the lifetime of this object.
- * Use the EKeyManagement and EValueMangement flags to control how this
- * object destroys the contained hash table.
- *
- */
-class COMMONAGGREGATOR_LINKAGE CConfigParams : public IConfigParams {
-public:
- typedef enum {
- EKeysUnmanaged, // Set if the caller will manage the lifetime of the keys
- EKeysManaged // Set if this object is to detroy the keys upon destruction
- } EKeyManagement;
-
- typedef enum {
- EValuesUnmanaged, // Set if the caller will manage the lifetime of the values
- EValuesManaged // Set if this object is to detroy the values upon destruction
- } EValueManagement;
-
- CConfigParams();
- virtual ~CConfigParams();
-
- void initialize(
- const std::string& sectionName,
- EKeyManagement keyManagement,
- EValueManagement valueManagement);
-
-public: // IConfigParams
- GVariant* lookup(
- const char* key,
- const EParamDisposition disposition = PARAM_REQUIRED) const;
-
- std::string getSectionName() const;
-
- void insert(const char* key, GVariant* value);
-
-private:
- static void destroyKeyCallback(gpointer ptr);
- static void destroyValueCallback(gpointer ptr);
-
-private:
- std::string _sectionName;
- GHashTable* _table;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CConfigParams);
-};
-
-CAF_DECLARE_SMART_POINTER(CConfigParams);
-
-}
-
-#endif /* CCONFIGPARAMS_H_ */
+++ /dev/null
-/*
- * Author: mdonahue
- * Created: Jan 17, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCONFIGPARAMSCHAIN_H_
-#define CCONFIGPARAMSCHAIN_H_
-
-namespace Caf {
-
-class COMMONAGGREGATOR_LINKAGE CConfigParamsChain : public IConfigParams {
-public:
- CConfigParamsChain();
- virtual ~CConfigParamsChain();
-
- void initialize(CConfigParams::EKeyManagement keyManagement,
- CConfigParams::EValueManagement valueManagement,
- const SmartPtrIConfigParams& baseParams);
-
- void insert(const char* key, GVariant* value);
-
-public: // IConfigParams
- GVariant* lookup(const char* key, const EParamDisposition disposition = PARAM_REQUIRED) const;
-
- std::string getSectionName() const;
-
-private:
- static void destroyValueCallback(gpointer ptr);
-
-private:
- SmartPtrCConfigParams _theseParams;
- SmartPtrIConfigParams _baseParams;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CConfigParamsChain);
-};
-
-CAF_DECLARE_SMART_POINTER(CConfigParamsChain);
-
-}
-
-#endif /* CCONFIGPARAMSCHAIN_H_ */
+++ /dev/null
-/*
- * Copyright (c) 2004-2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CFileLock_h_
-#define CFileLock_h_
-
-namespace Caf {
-
-class COMMONAGGREGATOR_LINKAGE CFileLock
-{
-public:
- enum ELockLevel
- {
- UNLOCK,
- SHARED_LOCK,
- EXCLUSIVE_LOCK
- };
-
-public:
- // Ctor
- CFileLock();
-
- // dtor
- ~CFileLock();
-
- // initialize the lock for the specified file
- void initialize(int32 iFileDescriptor);
-
- // initialize the lock for the specified file
- void initialize(const char * cszFileName, bool bCreateFile = true);
-
- // Set the lock to the specified scope
- void setLockLevel(ELockLevel eLockLevel, bool bDowngradeLock = false);
-
- // Set the lock to the specified if possible
- bool attemptSetLockLevel(ELockLevel eLockLevel, bool bDowngradeLock = false);
-
- // Get the current lock level
- ELockLevel getLockLevel() const;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CFileLock);
-
- bool _isInitialized;
- bool _isFileDescriptorLocal;
- int32 _fileDescriptor;
- ELockLevel _lockLevel;
-};
-
-CAF_DECLARE_SMART_POINTER(CFileLock);
-
-}
-
-#endif
+++ /dev/null
-/*
- * Author: mdonahue
- * Created: Nov 14 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#include "stdafx.h"
-#include "CFileLock.h"
-
-using namespace Caf;
-
-CFileLock::CFileLock() {
-}
-
-CFileLock::~CFileLock() {
-}
-
-void CFileLock::initialize(int32 iFileDescriptor) {
-}
-
-void CFileLock::initialize(const char * cszFileName, bool bCreateFile) {
-}
-
-void CFileLock::setLockLevel(ELockLevel eLockLevel, bool bDowngradeLock) {
-}
-
-bool CFileLock::attemptSetLockLevel(ELockLevel eLockLevel, bool bDowngradeLock) {
- return false;
-}
-
-CFileLock::ELockLevel CFileLock::getLockLevel() const {
- return UNLOCK;
-}
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: May 18, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CINIFILE_H_
-#define CINIFILE_H_
-
-namespace Caf {
-
-class COMMONAGGREGATOR_LINKAGE CIniFile {
-public:
- struct SIniEntry {
- std::string _name;
- std::string _valueRaw;
- std::string _valueExpanded;
- };
- CAF_DECLARE_SMART_POINTER(SIniEntry);
-
- struct SIniSection {
- std::string _sectionName;
- std::deque<SmartPtrSIniEntry> _entryCollection;
- };
- CAF_DECLARE_SMART_POINTER(SIniSection);
-
-public:
- CIniFile();
- virtual ~CIniFile();
-
-public:
- void initialize(const std::string& configFilePath);
-
- std::deque<SmartPtrSIniSection> getSectionCollection();
-
- std::deque<SmartPtrSIniEntry> getEntryCollection(
- const std::string& sectionName);
-
- SmartPtrSIniEntry findOptionalEntry(
- const std::string& sectionName,
- const std::string& keyName);
-
- SmartPtrSIniEntry findRequiredEntry(
- const std::string& sectionName,
- const std::string& keyName);
-
- std::string findOptionalString(
- const std::string& sectionName,
- const std::string& keyName);
-
- std::string findRequiredString(
- const std::string& sectionName,
- const std::string& keyName);
-
- std::string findOptionalRawString(
- const std::string& sectionName,
- const std::string& keyName);
-
- std::string findRequiredRawString(
- const std::string& sectionName,
- const std::string& keyName);
-
- void log();
-
- void setValue(
- const std::string& sectionName,
- const std::string& keyName,
- const std::string& value);
-
- void deleteValue(
- const std::string& sectionName,
- const std::string& keyName);
-
-private:
- struct SReplacement {
- SmartPtrCCafRegex _regex;
- std::string _value;
- };
- CAF_DECLARE_SMART_POINTER(SReplacement);
-
-private:
- std::deque<SmartPtrSIniSection> parse(
- const std::string& configFilePath) const;
-
- SmartPtrSReplacement createReplacement(
- const std::string& keyName,
- const std::string& value) const;
-
- SmartPtrSIniEntry createIniEntry(
- const std::string& keyName,
- const std::string& valueRaw,
- const std::string& valueExpanded) const;
-
- void parseValuePath(
- const std::string& valuePath,
- std::string& valueName,
- std::string& valueValue);
-
-private:
- bool _isInitialized;
- std::string _configFilePath;
- std::deque<SmartPtrSIniSection> _sectionCollection;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CIniFile);
-};
-
-CAF_DECLARE_SMART_POINTER(CIniFile);
-
-}
-
-#endif /* CINIFILE_H_ */
+++ /dev/null
-/*
- * Copyright (c) 2004-2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CLoggingSetter_h_
-#define CLoggingSetter_h_
-
-namespace Caf {
-
-class COMMONAGGREGATOR_LINKAGE CLoggingSetter {
-public:
- CLoggingSetter();
- virtual ~CLoggingSetter();
-
-public:
- void initialize(const std::string& logDir);
-
-private:
- bool _isInitialized;
- bool _remapLoggingLocation;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CLoggingSetter);
-};
-
-CAF_DECLARE_SMART_POINTER(CLoggingSetter);
-
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Jan 21, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CLoggingUtils_H_
-#define CLoggingUtils_H_
-
-#ifndef WIN32
-#include <sys/time.h>
-#endif
-
-namespace Caf {
-
-class CLoggingUtils;
-CAF_DECLARE_SMART_POINTER(CLoggingUtils);
-
-class COMMONAGGREGATOR_LINKAGE CLoggingUtils {
-private:
- typedef std::map<std::string, std::string> PropertyMap;
-
-public:
- static bool isConsoleAppenderUsed();
- static void setStartupConfigFile(
- const std::string& configFile = "log4cpp_config",
- const std::string& logDir = std::string());
- static std::string getConfigFile();
- static void resetConfigFile();
- static void setLogDir(const std::string& logDir);
-
-public:
- CLoggingUtils();
-
-private:
- static SmartPtrCLoggingUtils getInstance();
-
- static void loadConfig(const std::string& configFile);
-
- void loadProperties();
-
-private:
- static GRecMutex _sOpMutex;
- static SmartPtrCLoggingUtils _sInstance;
-
- std::string _configFile;
- PropertyMap _properties;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CLoggingUtils);
-};
-
-}
-
-#endif /* CLoggingUtils_H_ */
+++ /dev/null
-/*
- * Created on: May 9, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CMANAGEDTHREADPOOL_H_
-#define CMANAGEDTHREADPOOL_H_
-
-namespace Caf {
-
-/**
- * @author mdonahue
- * @brief This class wraps a GThreadPool and makes it a bit more friendly to use. It
- * also allows tasks to partially complete and be requeued.
- * The shutdown behavior is to wait for all active tasks to finish. Inactive
- * (unscheduled) tasks will be aborted.
- */
-class COMMONAGGREGATOR_LINKAGE CManagedThreadPool {
-public:
- /**
- * @brief Interface for task objects
- */
- struct __declspec(novtable) IThreadTask : public ICafObject {
- /**
- * @brief execute task
- * @retval true the task has completed its work and will be removed from the pool
- * @retval false the task has not completed its work and will be requeued in the pool
- */
- virtual bool run() = 0;
- };
- CAF_DECLARE_SMART_INTERFACE_POINTER(IThreadTask);
- typedef std::deque<SmartPtrIThreadTask> TaskDeque;
-
-public:
- CManagedThreadPool();
- virtual ~CManagedThreadPool();
-
- /**
- * @brief initialize the thread pool
- * @param poolName a friendly name for the pool to aid in debugging
- * @param threadCount the number of task threads
- * @param taskUpdateInterval optional task queue refresh rate in milliseconds
- */
- void init(
- const std::string& poolName,
- uint32 threadCount,
- uint32 taskUpdateInterval = 0);
-
- /**
- * @brief terminate the thread pool
- * All active tasks will be allowed to finish before this method returns
- */
- void term();
-
- /**
- * @brief add a task to the pool
- * @param task the task to add
- */
- void enqueue(const SmartPtrIThreadTask& task);
-
- /**
- * @brief add a collection of tasks to the pool
- * @param tasks the tasks to add
- */
- void enqueue(const TaskDeque& tasks);
-
- /** @brief A simple structure to report some statistics
- *
- */
- struct Stats {
- /** The number of tasks under management */
- uint32 taskCount;
-
- /** The number of tasks waiting to be assigned to threads for execution */
- uint32 inactiveTaskCount;
-
- /** The number of tasks assigned to threads for execution */
- uint32 activeTaskCount;
-
- /** The number of tasks that have completed execution */
- uint32 completeTaskCount;
-
- /** The number of tasks that have executed but need to be requeued */
- uint32 incompleteTaskCount;
- };
-
- /** @return the current statistics */
- Stats getStats() const;
-
-private:
- static gpointer poolWorkerFunc(gpointer context);
- static void taskWorkerFunc(gpointer threadContext, gpointer NOT_USED);
-
-private:
- void runPool();
-
-private:
- /** Default task update interval in milliseconds */
- static uint32 DEFAULT_TASK_UPDATE_INTERVAL;
-
-private:
- bool _isInitialized;
- volatile bool _isShuttingDown;
- std::string _poolName;
- GThreadPool *_threadPool;
- typedef std::set<IThreadTask*> TaskSet;
- TaskSet _tasks;
- GThread* _workerThread;
- uint32 _taskUpdateInterval;
-
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(CManagedThreadPool);
-};
-CAF_DECLARE_SMART_POINTER(CManagedThreadPool);
-
-}
-
-#endif /* CMANAGEDTHREADPOOL_H_ */
+++ /dev/null
-/*
- * CThreadPool.h
- *
- * Created on: May 9, 2012
- * Author: mdonahue
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CTHREADPOOL_H_
-#define CTHREADPOOL_H_
-
-namespace Caf {
-
-/**
- * @author mdonahue
- * @brief This class wraps a GThreadPool and makes it a bit more friendly to use.
- * This class wraps up a GThreadPool as a lifetime-managed object that can be shared.
- * The shutdown behavior is to wait for all tasks to finish.
- */
-class COMMONAGGREGATOR_LINKAGE CThreadPool {
-public:
- /**
- * @brief This is the interface for tasks queued in this thread pool
- */
- struct __declspec(novtable) IThreadTask : public ICafObject {
- /**
- * @brief execute task
- * @param userData the userData passed into the thread pool init() method
- */
- virtual void run(gpointer userData) = 0;
- };
- CAF_DECLARE_SMART_INTERFACE_POINTER(IThreadTask);
-
-public:
- CThreadPool();
- virtual ~CThreadPool();
-
- /**
- * @brief Initialize the thread pool
- * @param userData opaque data to be passed to each thread
- * @param maxThreads the number of threads to create
- */
- void init(gpointer userData, gint maxThreads);
-
- /**
- * @brief Terminate the thread pool
- * All tasks will be allowed to finish before this method returns
- */
- void term();
-
- /**
- * @brief Add a task to the thread pool
- * @param task interface to the task to add
- */
- void addTask(const SmartPtrIThreadTask& task);
-
-private:
- static void ThreadFunc(gpointer data, gpointer userData);
-
-private:
- bool _isInitialized;
- GThreadPool *_threadPool;
- gpointer _userData;
- CAF_CM_CREATE;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(CThreadPool);
-};
-CAF_DECLARE_SMART_POINTER(CThreadPool);
-
-}
-
-#endif /* CTHREADPOOL_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Jul 2009
- *
- * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CThreadSignal_h_
-#define CThreadSignal_h_
-
-namespace Caf {
-
-// Class-level thread safety macros
-#define CAF_THREADSIGNAL_CREATE \
- private: \
- mutable SmartPtrCAutoMutex _threadsync_mutex_
-
-#define CAF_THREADSIGNAL_INIT \
- _threadsync_mutex_.CreateInstance(); \
- _threadsync_mutex_->initialize()
-
-#define CAF_THREADSIGNAL_MUTEX \
- _threadsync_mutex_
-
-#define CAF_THREADSIGNAL_LOCK_UNLOCK \
- Caf::CAutoMutexLockUnlock _threadsync_auto_lock(CAF_THREADSIGNAL_MUTEX)
-
-#define CAF_THREADSIGNAL_LOCK_UNLOCK_LOG \
- Caf::CAutoMutexLockUnlock _threadsync_auto_lock(CAF_THREADSIGNAL_MUTEX, CAF_CM_GET_CLASSNAME, CAF_CM_GET_FUNCNAME)
-
-class COMMONAGGREGATOR_LINKAGE CThreadSignal {
-public:
- CThreadSignal();
- virtual ~CThreadSignal();
-
-public:
- void initialize(const std::string& conditionName);
- bool isInitialized() const;
- void signal();
- void wait(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs);
- bool waitOrTimeout(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs);
- std::string getName() const;
- void close();
-
-private:
- bool _isInitialized;
- CAutoCondition _condition;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(CThreadSignal);
-};
-
-CAF_DECLARE_SMART_POINTER( CThreadSignal);
-
-}
-
-#endif // #ifndef CThreadSignal_h_
+++ /dev/null
-/*
- * Created on: Jun 7, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CVARIANT_H_
-#define CVARIANT_H_
-
-namespace Caf {
-
-/**
- * @brief A class that holds a GVariant* to manage its lifetime
- */
-CAF_DECLARE_CLASS_AND_SMART_POINTER(CVariant);
-
-class COMMONAGGREGATOR_LINKAGE CVariant : public IVariant {
-public:
- CVariant();
- virtual ~CVariant();
-
- void set(GVariant *variant);
-
-public: // IVariant
- GVariant *get() const;
-
- std::string toString() const;
-
- bool isString() const;
- bool isBool() const;
- bool isUint8() const;
- bool isInt16() const;
- bool isUint16() const;
- bool isInt32() const;
- bool isUint32() const;
- bool isInt64() const;
- bool isUint64() const;
-
-public:
- static SmartPtrCVariant createString(const std::string& value);
- static SmartPtrCVariant createBool(const bool value);
- static SmartPtrCVariant createUint8(const uint8 value);
- static SmartPtrCVariant createInt16(const int16 value);
- static SmartPtrCVariant createUint16(const uint16 value);
- static SmartPtrCVariant createInt32(const int32 value);
- static SmartPtrCVariant createUint32(const uint32 value);
- static SmartPtrCVariant createInt64(const int64 value);
- static SmartPtrCVariant createUint64(const uint64 value);
-
-private:
- bool isType(const GVariantType * varType) const;
-
-private:
- GVariant *_variant;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CVariant);
-};
-
-}
-
-#endif /* CVARIANT_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: June 25, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#include "stdafx.h"
-#include "CWinScm.h"
-
-// Set the default values for how many times to retry and how int32 to wait
-// between retries when starting and stopping the service.
-const DWORD CWinScm::s_stopRetryMax = 30;
-const DWORD CWinScm::s_stopRetryIntervalMillisecs = 1000;
-
-const DWORD CWinScm::s_startPollMax = 30;
-const DWORD CWinScm::s_startPollIntervalMillisecs = 1000;
-const DWORD CWinScm::s_startRetryMax = 1;
-const DWORD CWinScm::s_startRetryIntervalMillisecs = 5000;
-
-CWinScm::CWinScm() :
- CAF_CM_INIT_LOG("CWinScm"),
- _isInitialized(false),
- _hSCM(NULL),
- _hService(NULL) {
-}
-
-CWinScm::CWinScm(const std::string& serviceName) :
- CAF_CM_INIT_LOG("CWinScm"),
- _isInitialized(false),
- _hSCM(NULL),
- _hService(NULL) {
- CAF_CM_FUNCNAME("CWinScm");
-
- CAF_CM_ENTER {
- CAF_CM_VALIDATE_STRING(serviceName);
-
- _serviceName = serviceName;
-
- _isInitialized = true;
- }
- CAF_CM_EXIT;
-}
-
-CWinScm::~CWinScm() {
- CAF_CM_FUNCNAME("~CWinScm");
-
- CAF_CM_ENTER {
- closeHandle(_hService);
- closeHandle(_hSCM);
- }
- CAF_CM_EXIT;
-}
-
-void CWinScm::initialize(
- const std::string& serviceName,
- const std::string& machineName) {
- CAF_CM_FUNCNAME("initialize");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized);
- CAF_CM_VALIDATE_STRING(serviceName);
- // machineName is optional
-
- _serviceName = serviceName;
-
- // If a machine name was provided, then store it in UNC format (e.g. \\MachineName).
- if (! machineName.empty()) {
- _machineName = std::string("\\") + machineName;
- }
-
- _isInitialized = true;
- }
- CAF_CM_EXIT;
-}
-
-void CWinScm::attachScmRequired(
- const DWORD desiredAccess/* = SC_MANAGER_ALL_ACCESS*/) {
- CAF_CM_FUNCNAME("attachScmRequired");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- attachScm(desiredAccess, true);
- }
- CAF_CM_EXIT;
-}
-
-void CWinScm::attachScmOptional(
- const DWORD desiredAccess/* = SC_MANAGER_ALL_ACCESS*/) {
- CAF_CM_FUNCNAME("attachScmOptional");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- attachScm(desiredAccess, false);
- }
- CAF_CM_EXIT;
-}
-
-void CWinScm::createService(
- const std::string& serviceFilename,
- const DWORD startType/* = SERVICE_DEMAND_START*/,
- const CvecDependencies cvecDependencies/* = CvecDependencies()*/) {
- CAF_CM_FUNCNAME("createService");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- CAF_CM_VALIDATE_STRING(serviceFilename);
-
- createService(
- serviceFilename,
- std::string(),
- std::string(),
- std::string(),
- std::string(),
- startType,
- cvecDependencies);
- }
- CAF_CM_EXIT;
-}
-
-void CWinScm::createService(
- const std::string& serviceFilename,
- const std::string& serviceDisplayName,
- const std::string& serviceDescription,
- const std::string& serviceAccountName,
- const std::string& serviceAccountPasswd,
- const DWORD startType,
- const CvecDependencies cvecDependencies) {
- CAF_CM_FUNCNAME("createService");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- CAF_CM_VALIDATE_STRING(serviceFilename);
- // serviceDisplayName is optional
- // serviceDescription is optional
- // serviceAccountName is optional
- // serviceAccountPasswd is optional
- // startType is optional
- // cvecDependencies is optional
-
- // Make sure the previous service (if any) is closed.
- closeHandle(_hService);
-
- // Open the Service Control Manager.
- attachScm();
-
- // Create and initialize the string that will hold the list of dependenciesWide.
- const DWORD dependenciesLen = 2048;
- wchar_t dependenciesWide[dependenciesLen + 1];
-
- // Iterate through the dependenciesWide and stick them in the string.
- size_t dependencyIndex = 0;
- CvecDependencies::const_iterator civecDependencies;
- for (civecDependencies = cvecDependencies.begin();
- civecDependencies != cvecDependencies.end();
- civecDependencies++) {
- const std::string dependency = *civecDependencies;
- const std::wstring dependencyWide = CStringUtils::convertNarrowToWide(dependency);
-
- // Hang onto the length of this dependency.
- const size_t dependencyLen = dependencyWide.length();
-
- // Make sure the length of the dependenciesWide array won't be exceeded.
- if ((dependencyIndex + dependencyLen + 1) >= dependenciesLen) {
- CAF_CM_EXCEPTIONEX_VA1(
- NoSuchElementException, ERROR_NO_MORE_ITEMS,
- "Exceeded dependency length - %d", dependencyIndex);
- }
-
- // Copy the current dependency into the string.
- ::wcsncpy_s(&dependenciesWide[dependencyIndex], dependenciesLen, dependencyWide.c_str(), dependencyLen);
- dependencyIndex += dependencyLen;
-
- // Null-terminate it.
- dependenciesWide[dependencyIndex] = L'\0';
- dependencyIndex++;
- }
-
- // Make sure the length of the dependenciesWide array won't be exceeded.
- if ((dependencyIndex + 1) >= dependenciesLen) {
- CAF_CM_EXCEPTIONEX_VA1(
- NoSuchElementException, ERROR_NO_MORE_ITEMS,
- "Exceeded dependency length - %d", dependencyIndex);
- }
-
- // The dependency string is terminated by two NULLs.
- dependenciesWide[dependencyIndex] = L'\0';
-
- // Other config info
- std::wstring displayNameWide;
- if (! serviceDisplayName.empty()) {
- displayNameWide = CStringUtils::convertNarrowToWide(serviceDisplayName);
- } else {
- displayNameWide = CStringUtils::convertNarrowToWide(_serviceName);
- }
-
- std::wstring accountWide;
- std::wstring passwdWide;
- if (!serviceAccountName.empty()) {
- CAF_CM_VALIDATE_STRING(serviceAccountPasswd);
- const std::string account = ".\\" + serviceAccountName;
- accountWide = CStringUtils::convertNarrowToWide(account);
- passwdWide = CStringUtils::convertNarrowToWide(serviceAccountPasswd);
- }
-
- const wchar_t* accountWidePtr = accountWide.empty() ? NULL : accountWide.c_str();
- const wchar_t* passwdWidePtr = passwdWide.empty() ? NULL : passwdWide.c_str();
-
- const std::wstring serviceFilenameWide = CStringUtils::convertNarrowToWide(serviceFilename);
-
- // Open the service so that its OK for the service to be missing.
- if (openService(false)) {
- // Change the configuration information.
- BOOL bRc = ::ChangeServiceConfig(
- _hService, // handle to the service
- SERVICE_WIN32_OWN_PROCESS, // Only one Service in this process
- startType, // Start type: AUTO, BOOT, DEMAND, DISABLED, START
- SERVICE_ERROR_NORMAL, // Error type (NORMAL)
- serviceFilenameWide.c_str(),// Service's binary location
- NULL, // no load ordering grouping
- NULL, // no tag identifier
- dependenciesWide, // this list of dependenciesWide
- accountWidePtr, // account
- passwdWidePtr, // password
- displayNameWide.c_str()); // Display name
-
- // If the call failed, throw an exception.
- if (0 == bRc) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA3(lastError, "::ChangeServiceConfig() Failed - serviceName: %s, serviceFilename: %s, msg: \"%s\"",
- _serviceName.c_str(), serviceFilename.c_str(), errorMsg.c_str());
- }
- } else {
- const std::wstring serviceNameWide = CStringUtils::convertNarrowToWide(_serviceName);
-
- // Create the Service
- _hService = ::CreateService(
- _hSCM, // handle to the SCM
- serviceNameWide.c_str(), // Binary name of the Service
- displayNameWide.c_str(), // The name to be displayed
- SERVICE_ALL_ACCESS, // The desired Access
- SERVICE_WIN32_OWN_PROCESS, // Only one Service in this process
- startType, // Start type (AUTO, or DISABLED)
- SERVICE_ERROR_NORMAL, // Error type (NORMAL)
- serviceFilenameWide.c_str(),// Service's binary location
- NULL, // no load ordering grouping
- NULL, // no tag identifier
- dependenciesWide, // this list of dependencies
- accountWidePtr, // account
- passwdWidePtr); // password
-
- // If the call failed, throw an exception.
- if (! _hService) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA3(lastError, "::CreateService() Failed - serviceName: %s, serviceFilename: %s, msg: \"%s\"",
- _serviceName.c_str(), serviceFilename.c_str(), errorMsg.c_str());
- }
- }
-
- // Set the description
- std::wstring wsDescription(serviceDescription.empty() ? L"" : CStringUtils::convertNarrowToWide(serviceDescription));
-
- SERVICE_DESCRIPTION stDescription;
- stDescription.lpDescription = const_cast<LPWSTR>(wsDescription.c_str());
-
- const BOOL bRc = ::ChangeServiceConfig2(_hService, SERVICE_CONFIG_DESCRIPTION, &stDescription);
- if (bRc == 0) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA3(lastError, "::ChangeServiceConfig2() Failed - serviceName: %s, serviceFilename: %s, msg: \"%s\"",
- _serviceName.c_str(), serviceFilename.c_str(), errorMsg.c_str());
- }
-
- // Make sure the service can be opened.
- openService(true);
- }
- CAF_CM_EXIT;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::changeService()
-//
-// Modifies the Service with only the non-empty elements passed in
-// NOTE: If you want to change other service settings, use CreateService
-// instead; it will also modify an existing service
-//
-///////////////////////////////////////////////////////////////////////////////
-void CWinScm::changeService(
- const std::string& serviceFilename,
- const std::string& serviceDisplayName,
- const std::string& serviceDescription,
- const std::string& serviceAccountName,
- const std::string& serviceAccountPasswd,
- const DWORD startupType) {
- CAF_CM_FUNCNAME("changeService");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- // Open the Sevice Control Manager.
- attachScm();
-
- // Open the service
- openService(true);
-
- // Other config info
- std::wstring binaryPathNameWide;
- if (!serviceFilename.empty()) {
- binaryPathNameWide = CStringUtils::convertNarrowToWide(serviceFilename);
- }
-
- std::wstring displayNameWide = NULL;
- if (!serviceDisplayName.empty()) {
- displayNameWide = CStringUtils::convertNarrowToWide(serviceDisplayName);
- }
-
- std::wstring accountWide;
- std::wstring passwdWide;
- if (!serviceAccountName.empty()) {
- CAF_CM_VALIDATE_STRING(serviceAccountPasswd);
- const std::string account = ".\\" + serviceAccountName;
- accountWide = CStringUtils::convertNarrowToWide(account);
- passwdWide = CStringUtils::convertNarrowToWide(serviceAccountPasswd);
- }
-
- const wchar_t* accountWidePtr = accountWide.empty() ? NULL : accountWide.c_str();
- const wchar_t* passwdWidePtr = passwdWide.empty() ? NULL : passwdWide.c_str();
-
- DWORD startType = SERVICE_NO_CHANGE;
- if (SERVICE_NO_CHANGE != startupType) {
- switch(startupType) {
- case SERVICE_BOOT_START:
- case SERVICE_SYSTEM_START:
- case SERVICE_AUTO_START:
- case SERVICE_DEMAND_START:
- case SERVICE_DISABLED:
- startType = startupType;
- break;
- default:
- CAF_CM_LOG_WARN_VA1("Unrecognized value for service startup type (using anyway) - startupType: %d", startupType);
- startType = startupType;
- break;
- }
- }
-
- // Change the configuration information.
- BOOL bRc = ::ChangeServiceConfig(
- _hService, // handle to the service
- SERVICE_NO_CHANGE, // Only one Service in this process
- startType, // Start type: AUTO, BOOT, DEMAND, DISABLED, START
- SERVICE_NO_CHANGE, // Error type (NORMAL)
- binaryPathNameWide.c_str(), // Service's binary location
- NULL, // no load ordering grouping
- NULL, // no tag identifier
- NULL, // this list of dependencies
- accountWidePtr, // account
- passwdWidePtr, // password
- displayNameWide.c_str()); // Display name
-
- // If the call failed, throw an exception.
- if (0 == bRc) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA3(lastError, "::ChangeServiceConfig() Failed - serviceName: %s, binaryPathNameWide: %s, msg: \"%s\"",
- _serviceName.c_str(), binaryPathNameWide.c_str(), errorMsg.c_str());
- }
-
- if (!serviceDescription.empty()) {
- // Set the description
- SERVICE_DESCRIPTION stDescription;
- stDescription.lpDescription = const_cast<LPWSTR>(
- CStringUtils::convertNarrowToWide(serviceDescription).c_str());
-
- // Check to see if this function is supported on this platform, if so we can use it.
- BOOL bRc = ::ChangeServiceConfig2(_hService, SERVICE_CONFIG_DESCRIPTION, &stDescription);
- if (!bRc) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA3(lastError, "::ChangeServiceConfig2() Failed - serviceName: %s, binaryPathNameWide: %s, msg: \"%s\"",
- _serviceName.c_str(), binaryPathNameWide.c_str(), errorMsg.c_str());
- }
- }
-
- // Make sure the service can be opened.
- openService(true);
- }
- CAF_CM_EXIT;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::deleteService()
-//
-// Delete this Service
-//
-///////////////////////////////////////////////////////////////////////////////
-void CWinScm::deleteService(
- const DWORD stopRetryMax/* = s_stopRetryMax*/,
- const DWORD stopRetryIntervalMillisecs/* = s_stopRetryIntervalMillisecs*/,
- const DWORD servicePid/* = 0*/) {
- CAF_CM_FUNCNAME("deleteService");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- // Open the service so that its OK for the service to be missing.
- if (openService(false)) {
- // Stop the service.
- stopService(stopRetryMax, stopRetryIntervalMillisecs, servicePid);
-
- // Delete the service.
- if (! ::DeleteService(_hService)) {
- const DWORD cdwError = ::GetLastError();
-
- // If the service has already been marked for deletion, then this is a no-op.
- if (ERROR_SERVICE_MARKED_FOR_DELETE == cdwError) {
- CAF_CM_LOG_WARN_VA1("Already marked for deletion - serviceName: %s", _serviceName.c_str());
- } else {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError, "::DeleteService() Failed - serviceName: %s, msg: \"%s\"",
- _serviceName.c_str(), errorMsg.c_str());
- }
- } else {
- closeHandle(_hService);
- }
- }
- }
- CAF_CM_EXIT;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::changeServiceRecoveryProperties()
-//
-// Modifies the Service Recovery Options
-// NOTE: If you want to change other service settings, use CreateService
-// instead; it will also modify an existing service
-//
-// serviceFilename - service name
-// firstFailureAction,
-// secondFailureAction,
-// subsequentFailureAction
-// members of enum _SC_ACTION_TYPE
-// SC_ACTION_NONE = 0,
-// SC_ACTION_RESTART = 1,
-// SC_ACTION_REBOOT = 2,
-// SC_ACTION_RUN_COMMAND = 3
-// ** I am seeing "access denied" when SC_ACTION_REBOOT is included
-// ** If all three are SC_ACTION_NONE, the reset period is deleted
-// cresetFailureCountAfter_days - failure count is reset to 0 after this many days
-// -1 is INFINITE. This shows as infinite using "sc qfailure" but as 49710 in SCM
-// crestartServiceAfter_minutes - for action SC_ACTION_RESTART, service will be started after this period
-// clpstrCommandLineToRun - for action SC_ACTION_RUN_COMMAND, this command line will be passed to CreateProcess
-// If this is null, the command will be unchanged
-// If "", the command will be cleared
-// crebootComputerAfter_minutes - for action SC_ACTION_REBOOT, the computer will reboot after this period
-// clpstrRestartMessage - for action SC_ACTION_REBOOT, this message will be sent to all sessions prior to reboot period
-// If this is null, the message will be unchanged
-// If "", the message will be cleared
-//
-///////////////////////////////////////////////////////////////////////////////
-void CWinScm::changeServiceRecoveryProperties(
- const std::string& serviceFilename,
- const DWORD firstFailureAction,
- const DWORD secondFailureAction,
- const DWORD subsequentFailureAction,
- const DWORD cresetFailureCountAfter_days,
- const DWORD crestartServiceAfter_minutes,
- const LPCWSTR clpstrCommandLineToRun,
- const DWORD crebootComputerAfter_minutes,
- const LPCWSTR clpstrRestartMessage) {
- CAF_CM_FUNCNAME("changeServiceRecoveryProperties");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- // Open the Sevice Control Manager.
- attachScm();
-
- // Open the service
- openService(true);
-
- // Change the configuration information.
- SERVICE_FAILURE_ACTIONS stFailureActions;
-
- // reset failure count after...
- // The length of time, in seconds, after which to reset the failure count to zero if there are no failures. Specify INFINITE to indicate that this value should never be reset.
- if (cresetFailureCountAfter_days == INFINITE) {
- stFailureActions.dwResetPeriod = INFINITE;
- } else {
- // convert to seconds = * 24 hours/day * 60 minutes/hour * 60 seconds/minute
- stFailureActions.dwResetPeriod = cresetFailureCountAfter_days * 24 * 60 * 60;
- }
-
- // Reboot message
- // Message to broadcast to server users before rebooting in response to the SC_ACTION_REBOOT service controller action.
- // If this value is NULL, the reboot message is unchanged. If the value is an empty string (""), the reboot message is deleted and no message is broadcast.
- //
- stFailureActions.lpRebootMsg = const_cast<wchar_t*>(clpstrRestartMessage);
-
- // Command to run
- // Command line of the process for the CreateProcess function to execute in response to the SC_ACTION_RUN_COMMAND service controller action. This process runs under the same account as the service.
- // If this value is NULL, the command is unchanged. If the value is an empty string (""), the command is deleted and no program is run when the service fails.
- stFailureActions.lpCommand = const_cast<wchar_t*>(clpstrCommandLineToRun);
-
- // actions
- // cActions
- // Number of elements in the lpsaActions array.
- // If this value is 0, but lpsaActions is not NULL, the reset period and array of failure actions are deleted.
- //
- // lpsaActions
- // Pointer to an array of SC_ACTION structures.
- // If this value is NULL, the cActions and resetPeriod members are ignored.
- SC_ACTION aAction[3];
- if ((firstFailureAction != SC_ACTION_NONE) ||
- (secondFailureAction != SC_ACTION_NONE) ||
- (subsequentFailureAction != SC_ACTION_NONE)) {
- stFailureActions.cActions = 3;
- stFailureActions.lpsaActions = aAction;
- aAction[0].Type = SC_ACTION_TYPE(firstFailureAction);
- aAction[1].Type = SC_ACTION_TYPE(secondFailureAction);
- aAction[2].Type = SC_ACTION_TYPE(subsequentFailureAction);
-
- for (int32 i=0; i< 3; i++) {
- switch(aAction[i].Type) {
- case SC_ACTION_NONE:
- aAction[i].Delay = 0;
- break;
- case SC_ACTION_REBOOT:
- // convert minutes to milliseconds
- aAction[i].Delay = crebootComputerAfter_minutes * 60 * 1000;
- break;
- case SC_ACTION_RESTART:
- aAction[i].Delay = crestartServiceAfter_minutes * 60 * 1000;
- break;
- case SC_ACTION_RUN_COMMAND:
- // reuse the restart service parameter
- aAction[i].Delay = crestartServiceAfter_minutes * 60 * 1000;
- break;
- default:
- aAction[i].Type = SC_ACTION_NONE;
- aAction[i].Delay = 0;
- break;
- }
- }
- } else {
- // All actions are none - clear the actions
- stFailureActions.cActions = 0;
- stFailureActions.lpsaActions = aAction;
- }
-
- // make the requested changes
- // Check to see if this function is supported on this platform, if so we can use it.
- BOOL bRc = ::ChangeServiceConfig2(_hService, SERVICE_CONFIG_FAILURE_ACTIONS, &stFailureActions);
- if (!bRc) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError, "::ChangeServiceConfig2() Failed - serviceName: %s, msg: \"%s\"",
- _serviceName.c_str(), errorMsg.c_str());
- }
-
- // Make sure the service can be opened.
- openService(true);
- }
- CAF_CM_EXIT;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::startService()
-//
-// Starts the Service
-//
-///////////////////////////////////////////////////////////////////////////////
-SERVICE_STATUS CWinScm::startService(
- const DWORD startPollMax/* = s_startPollMax*/,
- const DWORD startPollIntervalMillisecs/* = s_startPollIntervalMillisecs*/,
- const DWORD startRetryMax/* = s_startRetryMax*/,
- const DWORD startRetryIntervalMillisecs/* = s_startRetryIntervalMillisecs*/) {
- CAF_CM_FUNCNAME("startService");
-
- SERVICE_STATUS stServiceStatus;
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- // Initialize the structure.
- ::memset(&stServiceStatus, 0, sizeof(stServiceStatus));
-
- // Enter a loop that tries to restart the service.
- bool isFirstTime = true;
- DWORD retryCnt = 0;
- for (retryCnt = 0; (0 == startRetryMax) || (retryCnt < startRetryMax); retryCnt++) {
- // Don't Sleep the first time through the loop.
- if (isFirstTime) {
- isFirstTime = false;
- } else {
- ::Sleep(startRetryIntervalMillisecs);
- }
-
- // Attempt to start the service.
- CAF_CM_LOG_INFO_VA2("Attempting to start service - serviceName: %s, retryCnt: %d", _serviceName.c_str(), retryCnt);
- stServiceStatus = startServiceInternal(startPollMax, startPollIntervalMillisecs);
-
- // If the service is started, then exit the loop.
- if ((startPollMax == 0) || (stServiceStatus.dwCurrentState == SERVICE_RUNNING)) {
- break;
- }
-
- CAF_CM_LOG_ERROR_VA2("Failed to start service - serviceName: %s, retryCnt: %d", _serviceName.c_str(), retryCnt);
- }
-
- // Is the service running?
- if ((startPollMax > 0) && (stServiceStatus.dwCurrentState != SERVICE_RUNNING)) {
- CAF_CM_EXCEPTIONEX_VA2(
- IllegalStateException, E_FAIL,
- "Unable to start the service - serviceName: %s, retryCnt: %d", _serviceName.c_str(), retryCnt);
- }
-
- if (stServiceStatus.dwCurrentState == SERVICE_RUNNING) {
- CAF_CM_LOG_INFO_VA2("Successfully started the service - serviceName: %s, retryCnt: %d", _serviceName.c_str(), retryCnt);
- }
- }
- CAF_CM_EXIT;
-
- return stServiceStatus;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::stopService()
-//
-// Stops the Service
-//
-///////////////////////////////////////////////////////////////////////////////
-SERVICE_STATUS CWinScm::stopService(
- const DWORD stopRetryMax/* = s_stopRetryMax*/,
- const DWORD stopRetryIntervalMillisecs/* = s_stopRetryIntervalMillisecs*/,
- const DWORD servicePid/* = 0*/) {
- CAF_CM_FUNCNAME("stopService");
-
- SERVICE_STATUS stServiceStatus;
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- // Make sure the previous service (if any) is closed.
- closeHandle(_hService);
-
- // Initialize the input param.
- ::memset(&stServiceStatus, 0, sizeof(stServiceStatus));
-
- // Is the service stopped?
- if (getServiceStatus().dwCurrentState == SERVICE_STOPPED) {
- CAF_CM_LOG_WARN_VA1("The service is already stopped - serviceName: %s", _serviceName.c_str());
- } else {
- HANDLE serviceProcessHandle = NULL;
-
- // If the service PID is valid and this is the "local" machine, then open the process just
- // in case it needs to be terminated later.
- if ((servicePid > 0) && _machineName.empty()) {
- // Try to set the debug privelege to ensure that we can kill the process.
- grantPrivilege(SE_DEBUG_NAME);
-
- serviceProcessHandle = ::OpenProcess(PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION, FALSE, servicePid);
- if (! serviceProcessHandle) {
- const DWORD lastError = ::GetLastError();
- CAF_CM_LOG_ERROR_VA2("::OpenProcess() Failed - serviceName: %s, servicePid: %d", _serviceName.c_str(), servicePid);
- }
- }
-
- // if there are any services that depend on us, stop them first
-// CdeqDependentOnMe deqDeps;
-// getDependentServices(deqDeps);
- ERc eRcDependentsStopped = ERcSucceeded;
-// if (!deqDeps.empty())
-// {
-// eRcDependentsStopped = stopDependentServices(deqDeps, s_stopRetryMax, s_stopRetryIntervalMillisecs);
-// }
-
- // stop our service only if we are able to stop all services dependent upon us
- if (eRcDependentsStopped == ERcSucceeded) {
- // Tell the service to stop.
- if (getServiceStatus().dwCurrentState != SERVICE_STOP_PENDING) {
- controlService(SERVICE_CONTROL_STOP);
- }
-
- // Wait for the service to stop.
- for (DWORD stopCnt = 0; stopCnt < stopRetryMax; stopCnt++) {
- CAF_CM_LOG_INFO_VA2("Waiting for service to stop - serviceName: %s, stopCnt: %d", _serviceName.c_str(), stopCnt);
-
- // Is the service stopped?
- if (getServiceStatus().dwCurrentState == SERVICE_STOPPED)
- break;
-
- // Give the Service time to stop
- ::Sleep(stopRetryIntervalMillisecs);
- }
-
- // If the handle is valid then I'm supposed to kill the process if it's still alive.
- if (serviceProcessHandle) {
- // Get the exit code of the process to determine whether or not it's still alive.
- DWORD exitCode = 0;
- if (0 == ::GetExitCodeProcess(serviceProcessHandle, &exitCode)) {
- const DWORD lastError = ::GetLastError();
- CAF_CM_LOG_ERROR_VA2("::GetExitCodeProcess() Failed - serviceName: %s, servicePid: %d",
- _serviceName.c_str(), servicePid);
- } else {
- // If the process is still alive, then terminate it.
- if (STILL_ACTIVE == exitCode) {
- // Terminate the process.
- if (0 == ::TerminateProcess(serviceProcessHandle, 1)) {
- // Hang onto the error code.
- const DWORD cdwLastErrorTerminateProcess = ::GetLastError();
-
- // Get the exit code of the process to determine whether or not it's still alive.
- DWORD exitCode = 0;
- if (0 == ::GetExitCodeProcess(serviceProcessHandle, &exitCode)) {
- const DWORD lastError = ::GetLastError();
- CAF_CM_LOG_ERROR_VA2("::GetExitCodeProcess() Failed - serviceName: %s, servicePid: %d", _serviceName.c_str(), servicePid);
- } else {
- // If the process is still alive, then TerminateProcess clearly failed.
- if (STILL_ACTIVE == exitCode)
- CAF_CM_LOG_ERROR_VA1("::TerminateProcess() Failed - serviceName: %s", _serviceName.c_str());
- }
- }
- }
- }
- }
- }
- }
-
- stServiceStatus = getServiceStatus();
- if (stServiceStatus.dwCurrentState != SERVICE_STOPPED) {
- CAF_CM_LOG_WARN_VA1("Failed to stop service - serviceName: %s", _serviceName.c_str());
- }
-
- }
- CAF_CM_EXIT;
-
- return stServiceStatus;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::getServiceStatus()
-//
-// Gets the status of this service.
-//
-///////////////////////////////////////////////////////////////////////////////
-SERVICE_STATUS CWinScm::getServiceStatus(
- const bool isExceptionOnMissingService/* = true*/) {
- CAF_CM_FUNCNAME("getServiceStatus");
-
- SERVICE_STATUS stServiceStatus;
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- // Initialize the input param.
- ::memset(&stServiceStatus, 0, sizeof(stServiceStatus));
-
- // Try to open the service. If it's possible to open it, then get the service status. Otherwise,
- // the service isn't there and the state is set to stopped.
- if (openService(isExceptionOnMissingService, SC_MANAGER_CONNECT, SERVICE_QUERY_STATUS)) {
- // Get the state of the service.
- if (0 == ::QueryServiceStatus(_hService, &stServiceStatus)) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError, "::QueryServiceStatus() Failed - serviceName: %s, msg: \"%s\"",
- _serviceName.c_str(), errorMsg.c_str());
- }
- } else {
- stServiceStatus.dwCurrentState = SERVICE_STOPPED;
- }
- }
- CAF_CM_EXIT;
-
- return stServiceStatus;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::controlService()
-//
-// Controls the Service
-//
-///////////////////////////////////////////////////////////////////////////////
-SERVICE_STATUS CWinScm::controlService(
- const DWORD cdwCommand) {
- CAF_CM_FUNCNAME("controlService");
-
- SERVICE_STATUS stServiceStatus;
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- // Initialize the input param.
- ::memset(&stServiceStatus, 0, sizeof(stServiceStatus));
-
- // Open the service.
- openService(true);
-
- if (0 == ::ControlService(_hService, cdwCommand, &stServiceStatus)) {
- const DWORD cdwError = ::GetLastError();
- CAF_CM_LOG_WARN_VA1("::ControlService() Failed - serviceName: %s", _serviceName.c_str());
-
- stServiceStatus = getServiceStatus();
- }
- }
- CAF_CM_EXIT;
-
- return stServiceStatus;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CEcmColService::setStatus()
-//
-// Wrapper function to implement API call SetServiceStatus
-//
-///////////////////////////////////////////////////////////////////////////////
-void CWinScm::setStatus(
- const SERVICE_STATUS_HANDLE chSrv,
- const DWORD state,
- const DWORD exitCode,
- const DWORD progress/* = 0*/,
- const DWORD waitHintMilliseconds/* = 3000 */) {
- CAF_CM_FUNCNAME("setStatus");
-
- CAF_CM_ENTER {
- // Declare a SERVICE_STATUS structure, and fill it in
- SERVICE_STATUS srvStatus;
-
- // We're the only Service running in our current process
- srvStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
-
- // Set the state of the Service from the argument, and save it away
- srvStatus.dwCurrentState = state;
-
- // Which commands sould we accept from the SCM? All the common ones...
- srvStatus.dwControlsAccepted =
- SERVICE_ACCEPT_STOP |
- SERVICE_ACCEPT_SHUTDOWN |
- SERVICE_ACCEPT_POWEREVENT;
-
- // Set the Win32 exit code for the Service
- srvStatus.dwWin32ExitCode = exitCode;
-
- // Set the Service-specific exit code
- srvStatus.dwServiceSpecificExitCode = 0;
-
- // Set the checkpoint value
- srvStatus.dwCheckPoint = exitCode;
-
- // Set the timeout for waits
- // Note: Here we are telling the SMC how int32 it should wait for the next
- // status message. As int32 as the SCM gets the next status message before
- // this time has elapsed, we are OK, if the SCM has not received a message
- // and the check point value (exitCode) has not been incremented, the
- // SCM will assume that something is wrong and end this Service. So be
- // generous. 3 seconds seems to be standard but is overridable.
- srvStatus.dwWaitHint = waitHintMilliseconds;
-
- // Pass the structure to the SCM.
- if (! ::SetServiceStatus(chSrv, &srvStatus)) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError, "::SetServiceStatus() Failed - serviceName: %s, msg: \"%s\"",
- _serviceName.c_str(), errorMsg.c_str());
- }
- }
- CAF_CM_EXIT;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::openService()
-//
-// Opens the service.
-//
-///////////////////////////////////////////////////////////////////////////////
-bool CWinScm::openService(
- const bool isExceptionOnMissingService,
- const DWORD scmDesiredAccess/* = SC_MANAGER_ALL_ACCESS*/,
- const DWORD desiredAccess/* = SERVICE_ALL_ACCESS*/) {
- CAF_CM_FUNCNAME("openService");
-
- bool isServiceFound = true;
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- closeHandle(_hService);
-
- // Open the Service Control Manager.
- attachScm(scmDesiredAccess, isExceptionOnMissingService);
-
- // Get a handle to the Service that we want to delete
- const std::wstring serviceNameWide = CStringUtils::convertNarrowToWide(_serviceName);
- _hService = ::OpenService(
- _hSCM, // handle to the SCM
- serviceNameWide.c_str(),// name of the Service to delete
- desiredAccess); // desired access
-
- if (! _hService) {
- const DWORD lastError = ::GetLastError();
-
- // If the service doesn't exist, then this is a no-op.
- if (ERROR_SERVICE_DOES_NOT_EXIST == lastError) {
- if (isExceptionOnMissingService) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError, "::OpenService() says that the service does not exist - serviceName: %s, msg: \"%s\"",
- _serviceName.c_str(), errorMsg.c_str());
- }
-
- isServiceFound = false;
- } else {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError, "::OpenService() Failed - serviceName: %s, msg: \"%s\"",
- _serviceName.c_str(), errorMsg.c_str());
- }
- }
- }
- CAF_CM_EXIT;
-
- return isServiceFound;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::getServiceConfig()
-//
-///////////////////////////////////////////////////////////////////////////////
-CWinScm::SmartPtrSServiceConfig CWinScm::getServiceConfig(
- const bool isExceptionOnMissingService) {
- CAF_CM_FUNCNAME("getServiceConfig");
-
- SmartPtrSServiceConfig spcConfig;
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- if (openService(isExceptionOnMissingService, SC_MANAGER_CONNECT, SERVICE_QUERY_CONFIG)) {
- // Docs say that 8K is the max so just go for it
- BYTE configBuffer[8192];
- LPQUERY_SERVICE_CONFIG pstServiceConfig = reinterpret_cast<LPQUERY_SERVICE_CONFIG>(configBuffer);
-
- DWORD dwBytesNeeded = 0;
- if (0 == ::QueryServiceConfig(
- _hService,
- pstServiceConfig,
- 8191,
- &dwBytesNeeded)) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError, "::QueryServiceConfig() Failed - serviceName: %s, msg: \"%s\"",
- _serviceName.c_str(), errorMsg.c_str());
- }
-
- // Copy the data into a smart class
- spcConfig.CreateInstance();
- spcConfig->_serviceType = pstServiceConfig->dwServiceType;
- spcConfig->_startType = pstServiceConfig->dwStartType;
- spcConfig->_errorControl = pstServiceConfig->dwErrorControl;
- spcConfig->_binaryPathName = CStringUtils::convertWideToNarrow(pstServiceConfig->lpBinaryPathName);
- spcConfig->_loadOrderGroup = CStringUtils::convertWideToNarrow(pstServiceConfig->lpLoadOrderGroup);
- spcConfig->_tagId = pstServiceConfig->dwTagId;
- spcConfig->_dependencies = CStringUtils::convertWideToNarrow(pstServiceConfig->lpDependencies);
- spcConfig->_serviceStartName = CStringUtils::convertWideToNarrow(pstServiceConfig->lpServiceStartName);
- spcConfig->_displayName = CStringUtils::convertWideToNarrow(pstServiceConfig->lpDisplayName);
- }
- }
- CAF_CM_EXIT;
-
- return spcConfig;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::closeHandle()
-//
-// Closes a handle.
-//
-///////////////////////////////////////////////////////////////////////////////
-void CWinScm::closeHandle(
- SC_HANDLE& rhService) {
- CAF_CM_FUNCNAME("closeHandle");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- if (rhService) {
- if (0 == ::CloseServiceHandle(rhService)) {
- const DWORD cdwError = ::GetLastError();
- CAF_CM_LOG_ERROR_VA1("::CloseServiceHandle() Failed - serviceName: %s", _serviceName);
- }
-
- rhService = NULL;
- }
- }
- CAF_CM_EXIT;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::startServiceInternal()
-//
-// Starts the Service
-//
-///////////////////////////////////////////////////////////////////////////////
-SERVICE_STATUS CWinScm::startServiceInternal(
- const DWORD startPollMax,
- const DWORD startPollIntervalMillisecs) {
- CAF_CM_FUNCNAME("startServiceInternal");
-
- SERVICE_STATUS stServiceStatus;
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- // Make sure the previous service (if any) is closed.
- closeHandle(_hService);
-
- // Initialize the input param.
- ::memset(&stServiceStatus, 0, sizeof(stServiceStatus));
-
- // Is the service stopped?
- if (getServiceStatus().dwCurrentState == SERVICE_RUNNING) {
- CAF_CM_LOG_WARN_VA1("The service is already running - serviceName: %s", _serviceName.c_str());
- } else {
- // Start the service.
- if (0 == ::StartService(_hService, 0, NULL)) {
- const DWORD lastError = ::GetLastError();
- if (ERROR_SERVICE_ALREADY_RUNNING != lastError) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError, "::StartService() Failed - serviceName: %s, msg: \"%s\"",
- _serviceName.c_str(), errorMsg.c_str());
- }
-
- CAF_CM_LOG_WARN_VA1("The service is already running - serviceName: %s", _serviceName.c_str());
- }
-
- // Wait for the service to start.
- for (DWORD dwPollCnt = 0; dwPollCnt < startPollMax; dwPollCnt++) {
- // Is the service running?
- if (getServiceStatus().dwCurrentState == SERVICE_RUNNING) {
- break;
- }
-
- // Give the Service time to start
- ::Sleep(startPollIntervalMillisecs);
- }
- }
-
- stServiceStatus = getServiceStatus();
- }
- CAF_CM_EXIT;
-
- return stServiceStatus;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::getDependentServices()
-//
-// Gets all the services dependent on this one
-//
-///////////////////////////////////////////////////////////////////////////////
-void CWinScm::getDependentServices(
- CdeqDependentOnMe& rdeqDependentOnMe) {
- CAF_CM_FUNCNAME("getDependentServices");
-
- static const DWORD scdwNumElems = 50;
- static const DWORD scdwAddtlInfoPerElem = 100;
-
- ENUM_SERVICE_STATUS* serviceStatus = NULL;
-
- try {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- // Make sure the services is open.
- openService(true, SC_MANAGER_CONNECT, SERVICE_ENUMERATE_DEPENDENTS);
-
- // Initialize the input param.
- rdeqDependentOnMe.clear();
-
- // Create a buffer with a default number of elements and additional
- // info (used to contain the strings that the structure points to).
- DWORD serviceStatusBufSz = scdwNumElems * scdwAddtlInfoPerElem;
- serviceStatus = new ENUM_SERVICE_STATUS[serviceStatusBufSz + 1];
-
- // Loop until all of the dependent services are retrieved.
- BOOL bRet = FALSE;
- BOOL bExitLoop = FALSE;
- do {
- // Get the dependent services.
- DWORD dwBytesNeeded = 0;
- DWORD dwNumServices = 0;
- DWORD dwLastError = ERROR_SUCCESS;
- bRet = ::EnumDependentServices(
- _hService,
- SERVICE_ACTIVE,
- serviceStatus,
- serviceStatusBufSz,
- &dwBytesNeeded,
- &dwNumServices);
-
- // If the call returned FALSE get the last error. FALSE isn't necessarily
- // a bad condition. The last error must be checked.
- if (! bRet)
- dwLastError = ::GetLastError();
-
- // If the call returned FALSE AND the last error isn't "more data"
- // then this is a bad condition.
- if (! bRet && (dwLastError != ERROR_MORE_DATA)) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError, "::EnumDependentServices() Failed - serviceName: %s, msg: \"%s\"",
- _serviceName.c_str(), errorMsg.c_str());
- }
-
- // One of three things is possible:
- //
- // 1. There are services available and the last error
- // was "more data"
- //
- // 2. There are no services available and the call
- // returned TRUE: i.e. no dependent services
- //
- // 3. There are no services and the call returned
- // FALSE: i.e. the buffer isn't big enough
-
- if (0 == dwNumServices) {
- // If the call returned TRUE then this simply means
- // that there are no services.
- if (bRet) {
- bExitLoop = true;
- } else {
- if (dwBytesNeeded < sizeof(ENUM_SERVICE_STATUS)) {
- CAF_CM_EXCEPTIONEX_VA1(
- InvalidArgumentException, E_INVALIDARG,
- "dwBytesNeeded < sizeof(ENUM_SERVICE_STATUS) - serviceName: %s", _serviceName.c_str());
- }
-
- // Resize the buffer to contain all of the bytes.
- delete[] serviceStatus;
- serviceStatusBufSz = dwBytesNeeded - sizeof(ENUM_SERVICE_STATUS);
- serviceStatus = new ENUM_SERVICE_STATUS[serviceStatusBufSz + 1];
- }
- } else {
- // Loop through the services returned and add them to the list
- for (DWORD dwServiceIndex = 0; dwServiceIndex < dwNumServices; dwServiceIndex++) {
- const std::string serviceName = CStringUtils::convertWideToNarrow(serviceStatus[ dwServiceIndex ].lpServiceName);
- rdeqDependentOnMe.push_back(serviceName);
- }
-
- bExitLoop = true;
- }
- } while(!bExitLoop);
- }
- CAF_CM_CATCH_ALL;
-
- if (serviceStatus != NULL) {
- delete[] serviceStatus;
- }
-
- CAF_CM_THROWEXCEPTION;
-}
-
-CWinScm::ERc CWinScm::stopDependentServices(
- CdeqDependentOnMe& rdeqDependentOnMe,
- const DWORD stopRetryMax/* = s_stopRetryMax*/,
- const DWORD stopRetryIntervalMillisecs/* = s_stopRetryIntervalMillisecs*/) {
- CAF_CM_FUNCNAME("stopDependentServices");
-
- ERc eRcDependentsStopped = ERcSucceeded;
-
- CAF_CM_ENTER {
- // stop the services dependent upon us from outside to inside
- CdeqDependentOnMe::iterator deqIter = rdeqDependentOnMe.begin();
- CdeqDependentOnMe::iterator deqIterEnd = rdeqDependentOnMe.end();
- SmartPtrCWinScm dependentScm;
- for (; deqIter != deqIterEnd; deqIter++) {
- const std::string depServiceName = *deqIter;
-
- SERVICE_STATUS stServiceStatus;
- ::memset(&stServiceStatus, 0, sizeof(stServiceStatus));
-
- // Create SCM object for the dependent service
- dependentScm.CreateInstance();
- dependentScm->initialize(depServiceName, _machineName);
-
- // Tell the service to stop.
- if (dependentScm->getServiceStatus().dwCurrentState != SERVICE_STOP_PENDING) {
- dependentScm->controlService(SERVICE_CONTROL_STOP);
- }
-
- // Wait for the service to stop.
- for (DWORD stopCnt = 0; stopCnt < stopRetryMax; stopCnt++) {
- CAF_CM_LOG_INFO_VA2("Waiting for dependent service to stop - serviceName: %s", depServiceName.c_str(), stopCnt);
-
- // Is the service stopped?
- stServiceStatus = dependentScm->getServiceStatus();
- if (stServiceStatus.dwCurrentState == SERVICE_STOPPED) {
- break;
- }
-
- // Give the Service time to stop
- ::Sleep(stopRetryIntervalMillisecs);
- }
-
- stServiceStatus = dependentScm->getServiceStatus();
- if (stServiceStatus.dwCurrentState != SERVICE_STOPPED) {
- eRcDependentsStopped = ERcFailed;
- CAF_CM_LOG_ERROR_VA1("Failed to stop dependent service - serviceName: %s", depServiceName.c_str());
- break;
- }
- }
- }
- CAF_CM_EXIT;
-
- return eRcDependentsStopped;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// CWinScm::attachScm()
-//
-// Attaches to the SCM.
-//
-///////////////////////////////////////////////////////////////////////////////
-CWinScm::ERc CWinScm::attachScm(
- const DWORD desiredAccess/* = SC_MANAGER_ALL_ACCESS*/,
- const bool isExceptionOnFailure/* = true*/) {
- CAF_CM_FUNCNAME("attachScm");
-
- ERc eRc = ERcSucceeded;
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- if (! _hSCM) {
- // Open the Sevice Control Manager.
- const std::wstring machineNameWide = CStringUtils::convertNarrowToWide(_machineName);
- _hSCM = ::OpenSCManager(machineNameWide.c_str(), NULL, desiredAccess);
- if (! _hSCM) {
- // Get the error that describes what happened.
- const DWORD lastError = ::GetLastError();
-
- // If the user wants an exception, give it to 'em.
- if (isExceptionOnFailure) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError, "::OpenSCManager() Failed - serviceName: %s, msg: \"%s\"",
- _serviceName.c_str(), errorMsg.c_str());
- }
-
- // If the user doesn't want an exception, then log it as a warning.
- CAF_CM_LOG_WARN_VA1("::OpenSCManager() Failed - serviceName: %s", _serviceName.c_str());
-
- // Map the return code.
- switch(lastError) {
- case ERROR_ACCESS_DENIED:
- eRc = ERcAccessDenied;
- break;
-
- default:
- eRc = ERcFailed;
- break;
- }
- }
- }
- }
- CAF_CM_EXIT;
-
- return eRc;
-}
-
-void CWinScm::grantPrivilege(
- const std::wstring& privilegeWide) {
- CAF_CM_FUNCNAME("grantPrivilege");
-
- CAF_CM_ENTER {
- CAF_CM_VALIDATE_STRING(privilegeWide);
-
- DWORD lastError = 0;
-
- HANDLE hToken = NULL;
- const BOOL bCallSucceeded = ::OpenProcessToken(
- ::GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken);
- if (! bCallSucceeded) {
- lastError = ::GetLastError();
- CAF_CM_LOG_WARN_VA0("::OpenProcessToken() Failed");
- } else {
- const std::string privilege = CStringUtils::convertWideToNarrow(privilegeWide);
-
- LUID stLuidPrivilege;
- if (::LookupPrivilegeValue(NULL, privilegeWide.c_str(), &stLuidPrivilege)) {
- TOKEN_PRIVILEGES tkp;
- tkp.PrivilegeCount = 1;
- tkp.Privileges[0].Luid = stLuidPrivilege;
- tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- if (! ::AdjustTokenPrivileges(hToken, FALSE,
- &tkp, sizeof( tkp ), NULL, NULL)) {
- lastError = ::GetLastError();
- CAF_CM_LOG_WARN_VA1("::AdjustTokenPrivileges Failed - privilege: %s", privilege.c_str());
- }
- }
- else
- {
- lastError = ::GetLastError();
- CAF_CM_LOG_WARN_VA1("::LookupPrivilegeValue Failed - privilege: %s", privilege.c_str());
- }
- }
- }
- CAF_CM_EXIT;
-}
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: June 25, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CWinScm_h_
-#define CWinScm_h_
-
-namespace Caf {
-
-/// TODO - describe class
-class COMMONAGGREGATOR_LINKAGE CWinScm {
-public:
- typedef enum {
- ERcSucceeded,
- ERcFailed,
- ERcAccessDenied
- } ERc;
-
- struct SServiceConfig {
- DWORD _serviceType;
- DWORD _startType;
- DWORD _errorControl;
- std::string _binaryPathName;
- std::string _loadOrderGroup;
- DWORD _tagId;
- std::string _dependencies;
- std::string _serviceStartName;
- std::string _displayName;
- };
- CAF_DECLARE_SMART_POINTER(SServiceConfig);
-
-public:
- typedef std::vector<std::string> CvecDependencies;
- typedef std::deque<std::string> CdeqDependentOnMe;
-
-public:
- CWinScm();
- CWinScm(const std::string& serviceName);
- virtual ~CWinScm();
-
-public:
- /// Initializes the object.
- void initialize(
- const std::string& serviceName,
- const std::string& machineName);
-
-public:
- /// Creates the Service.
- void createService(
- const std::string& crstrServiceFilename,
- const DWORD cdwStartType = SERVICE_DEMAND_START,
- const CvecDependencies cvecDependencies = CvecDependencies());
-
- /// Creates the Service.
- void createService(
- const std::string& crstrServiceFilename,
- const std::string& crstrServiceDisplayName,
- const std::string& crstrServiceDescription,
- const std::string& crstrServiceAccountName,
- const std::string& crstrServiceAccountPasswd,
- const DWORD cdwStartType = SERVICE_DEMAND_START,
- const CvecDependencies cvecDependencies = CvecDependencies());
-
-public:
- void changeService(
- const std::string& crstrServiceFilename,
- const std::string& crstrServiceDisplayName = std::string(),
- const std::string& crstrServiceDescription = std::string(),
- const std::string& crstrServiceAccountName = std::string(),
- const std::string& crstrServiceAccountPasswd = std::string(),
- const DWORD cdwStartupType = SERVICE_NO_CHANGE);
-
- void changeServiceRecoveryProperties(
- const std::string& crstrServiceFilename,
- const DWORD cdwFirstFailureAction,
- const DWORD cdwSecondFailureAction,
- const DWORD cdwSubsequentFailureAction,
- const DWORD cdwResetFailureCountAfter_days,
- const DWORD cdwRestartServiceAfter_minutes,
- const LPCWSTR clpstrCommandLineToRun,
- const DWORD cdwRebootComputerAfter_minutes,
- const LPCWSTR clpstrRestartMessage );
-
-public:
- void deleteService(
- const DWORD cdwStopRetryMax = s_stopRetryMax,
- const DWORD cdwStopRetryIntervalMillisecs = s_stopRetryIntervalMillisecs,
- const DWORD cdwServicePid = 0);
-
-public:
- SERVICE_STATUS startService(
- const DWORD cdwStartPollMax = s_startPollMax,
- const DWORD cdwStartPollIntervalMillisecs = s_startPollIntervalMillisecs,
- const DWORD cdwStartRetryMax = s_startRetryMax,
- const DWORD cdwStartRetryIntervalMillisecs = s_startRetryIntervalMillisecs);
-
- SERVICE_STATUS stopService(
- const DWORD cdwStopRetryMax = s_stopRetryMax,
- const DWORD cdwStopRetryIntervalMillisecs = s_stopRetryIntervalMillisecs,
- const DWORD cdwServicePid = 0);
-
-public:
- SERVICE_STATUS getServiceStatus(
- const bool cbIsExceptionOnMissingService = true);
-
- SERVICE_STATUS controlService(
- const DWORD cdwCommand);
-
- bool openService(
- const bool cbIsExceptionOnMissingService,
- const DWORD scmDesiredAccess = SC_MANAGER_ALL_ACCESS,
- const DWORD desiredAccess = SERVICE_ALL_ACCESS
- );
-
- void setStatus(
- const SERVICE_STATUS_HANDLE chSrv,
- const DWORD cdwState,
- const DWORD cdwExitCode,
- const DWORD cdwProgress = 0,
- const DWORD cdwWaitHintMilliseconds = 3000 );
-
-public:
- void getDependentServices(
- CdeqDependentOnMe& rdeqDependentOnMe);
-
- ERc stopDependentServices(
- CdeqDependentOnMe& rdeqDependentOnMe,
- const DWORD cdwStopRetryMax = s_stopRetryMax,
- const DWORD cdwStopRetryIntervalMillisecs = s_stopRetryIntervalMillisecs);
-
- SmartPtrSServiceConfig getServiceConfig(
- const bool cbIsExceptionOnMissingService = true);
-
-private:
- void closeHandle(SC_HANDLE& rhService);
-
- SERVICE_STATUS startServiceInternal(
- const DWORD cdwStartPollMax = s_startPollMax,
- const DWORD cdwStartPollIntervalMillisecs = s_startPollIntervalMillisecs);
-
- void attachScmRequired(
- const DWORD desiredAccess = SC_MANAGER_ALL_ACCESS);
-
- void attachScmOptional(
- const DWORD desiredAccess = SC_MANAGER_ALL_ACCESS);
-
- ERc attachScm(
- const DWORD cdwDesiredAccess = SC_MANAGER_ALL_ACCESS,
- const bool cbIsExceptionOnFailure = true);
-
- void grantPrivilege(
- const std::wstring& privilegeWide);
-
-private:
- // The maximum number of times to wait for the service to stop and time
- // to wait between each attempt.
- static const DWORD s_stopRetryMax;
- static const DWORD s_stopRetryIntervalMillisecs;
-
- static const DWORD s_startPollMax;
- static const DWORD s_startPollIntervalMillisecs;
- static const DWORD s_startRetryMax;
- static const DWORD s_startRetryIntervalMillisecs;
-
-private:
- bool _isInitialized;
- std::string _serviceName;
- std::string _machineName;
- SC_HANDLE _hSCM;
- SC_HANDLE _hService;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CWinScm);
-};
-
-CAF_DECLARE_SMART_POINTER(CWinScm);
-
-}
-
-#endif // #ifndef CWinScm_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: June 25, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#include "stdafx.h"
-#include "CWinServiceInstance.h"
-
-CWinServiceInstance::CWinServiceInstance() :
- CAF_CM_INIT_LOG("CWinServiceInstance"),
- _isInitialized(false) {
-}
-
-CWinServiceInstance::~CWinServiceInstance() {
- CAF_CM_FUNCNAME("~CWinServiceInstance");
-}
-
-void CWinServiceInstance::initialize(
- const SmartPtrCWinServiceState& winServiceState) {
- CAF_CM_FUNCNAME("initialize");
- CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized);
- CAF_CM_VALIDATE_SMARTPTR(winServiceState);
-
- _winServiceState = winServiceState;
- _isInitialized = true;
-}
-
-////////////////////////////////////////////////////////////////////////
-//
-// CWinServiceInstance::runService()
-//
-// Fires off and monitors the main service thread
-//
-////////////////////////////////////////////////////////////////////////
-void CWinServiceInstance::runService() {
- CAF_CM_FUNCNAME("runService");
-
- static const DWORD scdwCheckStateSecs = 10;
-
- try {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- // Loop until stop event...
- bool bIsContinue = true;
- while (bIsContinue) {
- const bool isSignaled = _winServiceState->waitForServiceStop(
- scdwCheckStateSecs * 1000);
- if (isSignaled) {
- CAF_CM_LOG_INFO_VA0("Received the stop event");
-
- // Let the worker thread know it's time to stop.
- const SmartPtrIWork work = _winServiceState->getWork();
- work->stopWork();
-
- bIsContinue = false;
- }
-
- // Check the worker thread
- if (bIsContinue) {
- const bool isWorkerSignaled =
- _winServiceState->waitForWorkerThreadFinished(10);
- if (isWorkerSignaled) {
- CAF_CM_LOG_INFO_VA0("Worker thread is not running");
- bIsContinue = false;
- }
- }
- }
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_LOG_CRIT_CAFEXCEPTION;
-
- try {
- CAF_CM_LOG_INFO_VA0("Service is stopping - waiting for worker thread to finish");
-
- const bool isSignaled = _winServiceState->waitForWorkerThreadFinished(
- _winServiceState->getWorkerThreadStopMs());
- if (!isSignaled) {
- CAF_CM_LOG_WARN_VA1("Worker thread did not stop within timeout period - %d",
- _winServiceState->getWorkerThreadStopMs());
- }
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_LOG_CRIT_CAFEXCEPTION;
-
- CAF_CM_THROWEXCEPTION;
-}
-
-void CWinServiceInstance::runWorkerThread() {
- CAF_CM_FUNCNAME("runWorkerThread");
-
- try {
- CafInitialize::init();
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- _winServiceState->putCurrentServiceState(SERVICE_RUNNING);
- if (_winServiceState->getIsService()) {
- _winServiceState->setStatus();
- }
-
- const SmartPtrIWork work = _winServiceState->getWork();
- work->doWork();
-
- _winServiceState->putCurrentServiceState(SERVICE_STOP_PENDING);
- if (_winServiceState->getIsService()) {
- _winServiceState->setStatus();
- }
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_LOG_CRIT_CAFEXCEPTION;
-
- try {
- CAF_CM_LOG_INFO_VA0("workerThread is shutting down");
-
- // Let the main thread know what's going on.
- _winServiceState->signalServiceStop();
- _winServiceState->signalWorkerThreadFinished();
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_LOG_CRIT_CAFEXCEPTION;
-
- CafInitialize::term();
-
- CAF_CM_THROWEXCEPTION;
-}
-
-CWinServiceInstance::SCommandLineParams CWinServiceInstance::processCommandLine(
- int32 argc,
- char** argv) const {
- CAF_CM_FUNCNAME("processCommandLine");
-
- CAF_CM_LOG_DEBUG_VA0("processCommandLine");
-
- SCommandLineParams commandLineParams;
- if (argc == 1) {
- commandLineParams._eMode = EModeRunAsService;
- } else if (argc == 2) {
- if ((::_stricmp("/Service", argv[1]) == 0)
- || (::_stricmp("-Service", argv[1]) == 0)
- || (::_stricmp("/RegServer", argv[1]) == 0)
- || (::_stricmp("-RegServer", argv[1]) == 0)) {
- commandLineParams._eMode = EModeRegister;
- } else if ((::_stricmp("/UnregService", argv[1]) == 0)
- || (::_stricmp("-UnregService", argv[1]) == 0)
- || (::_stricmp("/UnregServer", argv[1]) == 0)
- || (::_stricmp("-UnregServer", argv[1]) == 0)) {
- commandLineParams._eMode = EModeUnregister;
- } else if ((::_stricmp("/n", argv[1]) == 0)
- || (::_stricmp("-n", argv[1]) == 0)) {
- commandLineParams._eMode = EModeRunAsConsole;
- } else {
- commandLineParams._eMode = EModeUnknown;
- CWinServiceInstance::usage(_winServiceState->getServiceName());
- }
- } else {
- commandLineParams._eMode = EModeUnknown;
- CWinServiceInstance::usage(_winServiceState->getServiceName());
- }
-
- return commandLineParams;
-}
-
-void CWinServiceInstance::install(
- const std::string& fileName) const {
- CAF_CM_FUNCNAME("install");
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- CAF_CM_LOG_DEBUG_VA2("Installing the service - serviceName: %s, path: %s",
- _winServiceState->getServiceName().c_str(), fileName.c_str());
-
- // Create the service.
- CWinScm winScm(_winServiceState->getServiceName());
- winScm.createService(
- fileName, // ServiceFilename
- _winServiceState->getDisplayName(), // ServiceDisplayName,
- _winServiceState->getDescription(), // ServiceDescription,
- std::string(), // ServiceAccountName,
- std::string(), //ServiceAccountPasswd,
- SERVICE_AUTO_START);
-}
-
-void CWinServiceInstance::uninstall() const {
- CAF_CM_FUNCNAME("uninstall");
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- CAF_CM_LOG_DEBUG_VA1("Uninstalling the service - serviceName: %s",
- _winServiceState->getServiceName().c_str());
-
- // Remove the service.
- CWinScm winScm(_winServiceState->getServiceName());
- winScm.deleteService();
-}
-
-void CWinServiceInstance::usage(
- const std::string& serviceName) const {
- CAF_CM_FUNCNAME("usage");
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- ::fprintf(stderr, "usage: %s [/Service] | [-Service] |\n"
- "\t[/RegServer] | [-RegServer]\n"
- "\tRegister service\n\n", serviceName.c_str());
- ::fprintf(stderr, "usage: %s [/UnregService] | [-UnregService] |\n"
- "\t[/UnregServer] | [-UnregServer]\n"
- "\tUnregister service\n\n", serviceName.c_str());
- ::fprintf(stderr, "usage: %s -n\n"
- "\t[-n]\tRun in console mode\n", serviceName.c_str());
-}
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: June 25, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CWinServiceInstance_h_
-#define CWinServiceInstance_h_
-
-namespace Caf {
-
-class COMMONAGGREGATOR_LINKAGE CWinServiceInstance {
-public:
- typedef enum EServerMode {
- EModeUnknown,
- EModeRunAsService,
- EModeRunAsConsole,
- EModeRegister,
- EModeUnregister
- };
-
- struct SCommandLineParams {
- EServerMode _eMode;
- };
-
-public:
- CWinServiceInstance();
- virtual ~CWinServiceInstance();
-
-public:
- /// Initializes the component.
- void initialize(
- const SmartPtrCWinServiceState& winServiceState);
-
- /// Monitors for the signal indicating that the service should be stopped.
- void runService();
-
- /// Runs in the worker thread and performs the work of this service.
- void runWorkerThread();
-
-public:
- /// Processes the command-line arguments.
- SCommandLineParams processCommandLine(
- int32 argc,
- char** argv) const;
-
- /// Installs the service.
- void install(
- const std::string& fileName) const;
-
- /// Uninstalls the service.
- void uninstall() const;
-
-private:
- /// Produces the usage message.
- void usage(
- const std::string& serviceName) const;
-
-public:
- bool _isInitialized;
- SmartPtrCWinServiceState _winServiceState;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CWinServiceInstance);
-};
-
-CAF_DECLARE_SMART_POINTER(CWinServiceInstance);
-
-}
-
-#endif // #ifndef CWinServiceInstance_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: June 29, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#include "stdafx.h"
-#include "CWinServiceState.h"
-
-using namespace Caf;
-
-CWinServiceState::CWinServiceState() :
- CAF_CM_INIT_LOG("CWinServiceState"),
- _isInitialized(false),
- _isService(true),
- _serviceHandle(NULL),
- _currentServiceState(0),
- _scmWaitHintMs(3000),
- _workerThreadStopMs(1500) {
- CAF_CM_INIT_THREADSAFE;
- _waitMutex.CreateInstance();
- _waitMutex->initialize();
-}
-
-CWinServiceState::~CWinServiceState() {
-}
-
-void CWinServiceState::initialize(
- const std::string& serviceName,
- const std::string& displayName,
- const std::string& description,
- const SmartPtrIWork& work) {
- CAF_CM_FUNCNAME("initialize");
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized);
- CAF_CM_VALIDATE_STRING(serviceName);
- CAF_CM_VALIDATE_STRING(displayName);
- CAF_CM_VALIDATE_SMARTPTR(work);
-
- // Store the elements of the path into member variables.
- _serviceName = serviceName;
- _displayName = displayName;
- _description = description;
- _work = work;
-
- _serviceStopSignal.initialize("serviceStopSignal");
- _workerThreadFinishedSignal.initialize("workerThreadFinishedSignal");
-
- _isInitialized = true;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-}
-
-std::string CWinServiceState::getServiceName() const {
- CAF_CM_FUNCNAME("getServiceName");
-
- std::string rc;
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- rc = _serviceName;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-
- return rc;
-}
-
-std::string CWinServiceState::getDisplayName() const {
- CAF_CM_FUNCNAME("getDisplayName");
-
- std::string rc;
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- rc = _displayName;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-
- return rc;
-}
-
-std::string CWinServiceState::getDescription() const {
- CAF_CM_FUNCNAME("getDescription");
-
- std::string rc;
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- rc = _description;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-
- return rc;
-}
-
-SmartPtrIWork CWinServiceState::getWork() const {
- CAF_CM_FUNCNAME("getWork");
-
- SmartPtrIWork rc;
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- rc = _work;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-
- return rc;
-}
-
-DWORD CWinServiceState::getWorkerThreadStopMs() const {
- CAF_CM_FUNCNAME("getWorkerThreadStopMs");
-
- DWORD rc = 0;
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- rc = _workerThreadStopMs;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-
- return rc;
-}
-
-DWORD CWinServiceState::getScmWaitHintMs() const {
- CAF_CM_FUNCNAME("getScmWaitHintMs");
-
- DWORD rc = 0;
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- rc = _scmWaitHintMs;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-
- return rc;
-}
-
-bool CWinServiceState::getIsService() const {
- CAF_CM_FUNCNAME("getIsService");
-
- bool rc = false;
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- rc = _isService;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-
- return rc;
-}
-
-void CWinServiceState::putIsService(
- const bool isService) {
- CAF_CM_FUNCNAME("putIsService");
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- _isService = isService;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-}
-
-SERVICE_STATUS_HANDLE CWinServiceState::getServiceHandle() const {
- CAF_CM_FUNCNAME("getServiceHandle");
-
- SERVICE_STATUS_HANDLE rc = NULL;
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- rc = _serviceHandle;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-
- return rc;
-}
-
-void CWinServiceState::putServiceHandle(
- const SERVICE_STATUS_HANDLE serviceHandle) {
- CAF_CM_FUNCNAME("putServiceHandle");
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- CAF_CM_VALIDATE_PTR(serviceHandle);
- _serviceHandle = serviceHandle;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-}
-
-DWORD CWinServiceState::getCurrentServiceState() const {
- CAF_CM_FUNCNAME("getCurrentServiceState");
-
- DWORD rc = 0;
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- rc = _currentServiceState;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-
- return rc;
-}
-
-std::string CWinServiceState::getCurrentServiceStateStr() const {
- CAF_CM_FUNCNAME("getCurrentServiceState");
-
- std::string rc;
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- switch (_currentServiceState) {
- case SERVICE_CONTINUE_PENDING:
- rc = "SERVICE_CONTINUE_PENDING";
- break;
- case SERVICE_PAUSE_PENDING:
- rc = "SERVICE_PAUSE_PENDING";
- break;
- case SERVICE_PAUSED:
- rc = "SERVICE_PAUSED";
- break;
- case SERVICE_RUNNING:
- rc = "SERVICE_RUNNING";
- break;
- case SERVICE_START_PENDING:
- rc = "SERVICE_START_PENDING";
- break;
- case SERVICE_STOP_PENDING:
- rc = "SERVICE_STOP_PENDING";
- break;
- case SERVICE_STOPPED:
- rc = "SERVICE_STOPPED";
- break;
- default:
- rc = "Unknown";
- break;
- }
- }
- CAF_CM_UNLOCK_AND_EXIT;
-
- return rc;
-}
-
-void CWinServiceState::putCurrentServiceState(
- const DWORD currentServiceState) {
- CAF_CM_FUNCNAME("putCurrentServiceState");
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
- _currentServiceState = currentServiceState;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-}
-
-void CWinServiceState::signalServiceStop() {
- CAF_CM_FUNCNAME("signalServiceStop");
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- CAF_CM_LOG_DEBUG_VA1("Signal (%s)", _serviceStopSignal.getName().c_str());
- _serviceStopSignal.signal();
- }
- CAF_CM_UNLOCK_AND_EXIT;
-}
-
-bool CWinServiceState::waitForServiceStop(
- const uint32 timeoutMs) {
- CAF_CM_FUNCNAME("waitForServiceStop");
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- //CAF_CM_LOG_DEBUG_VA2("Wait (%s) - waitMs: %d", _serviceStopSignal.getName().c_str(), timeoutMs);
- CAutoMutexLockUnlock waitMutexAutoLock(_waitMutex);
- const bool isSignaled = _serviceStopSignal.waitOrTimeout(_waitMutex, timeoutMs);
-
- return isSignaled;
-}
-
-void CWinServiceState::signalWorkerThreadFinished() {
- CAF_CM_FUNCNAME("signalWorkerThreadFinished");
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- CAF_CM_LOG_DEBUG_VA1("Signal (%s)", _workerThreadFinishedSignal.getName().c_str());
- _workerThreadFinishedSignal.signal();
- }
- CAF_CM_UNLOCK_AND_EXIT;
-}
-
-bool CWinServiceState::waitForWorkerThreadFinished(
- const uint32 timeoutMs) {
- CAF_CM_FUNCNAME("waitForWorkerThreadFinished");
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- //CAF_CM_LOG_DEBUG_VA2("Wait (%s) - waitMs: %d", _workerThreadFinishedSignal.getName().c_str(), timeoutMs);
- CAutoMutexLockUnlock waitMutexAutoLock(_waitMutex);
- const bool isSignaled = _workerThreadFinishedSignal.waitOrTimeout(_waitMutex, timeoutMs);
-
- return isSignaled;
-}
-
-void CWinServiceState::close() {
- CAF_CM_FUNCNAME("close");
-
- CAF_CM_ENTER_AND_LOCK {
- CAF_CM_PRECOND_ISINITIALIZED(_isInitialized);
-
- _serviceHandle = NULL;
- _isService = true;
- _currentServiceState = 0;
- _scmWaitHintMs = 3000;
- _workerThreadStopMs = 1500;
-
- _serviceStopSignal.close();
- _workerThreadFinishedSignal.close();
-
- _isInitialized = false;
- }
- CAF_CM_UNLOCK_AND_EXIT;
-}
-
-void CWinServiceState::setStatus() {
- CAF_CM_FUNCNAME("setStatus");
-
- CAF_CM_LOG_DEBUG_VA1("setStatus - %s", getCurrentServiceStateStr().c_str());
-
- CWinScm winScm(getServiceName());
- winScm.setStatus(getServiceHandle(),
- getCurrentServiceState(),
- (DWORD) NO_ERROR,
- (DWORD) 0,
- getScmWaitHintMs());
-}
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: June 29, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CWinServiceState_h_
-#define CWinServiceState_h_
-
-namespace Caf {
-
-class COMMONAGGREGATOR_LINKAGE CWinServiceState {
-public:
- CWinServiceState();
- virtual ~CWinServiceState();
-
-public:
- /// Initializes the component.
- void initialize(
- const std::string& serviceName,
- const std::string& displayName,
- const std::string& description,
- const SmartPtrIWork& work);
-
- /// Gets the name of the service.
- std::string getServiceName() const;
-
- /// Gets the display name of the service.
- std::string getDisplayName() const;
-
- /// Gets the Description of the service.
- std::string getDescription() const;
-
- /// Gets interface for the implementation of the work to be
- /// performed by this service.
- SmartPtrIWork getWork() const;
-
-public:
- /// Gets the number of Milliseconds to wait for the worker thread to stop.
- DWORD getWorkerThreadStopMs() const;
-
- /// Gets the number of Milliseconds that the SCM should wait for a status update.
- DWORD getScmWaitHintMs() const;
-
-public:
- /// Gets whether the code is running as a service or as console (for debugging)
- bool getIsService() const;
-
- /// Puts whether the code is running as a service or as console (for debugging)
- void putIsService(
- const bool isService);
-
- /// Gets the handle to this service.
- SERVICE_STATUS_HANDLE getServiceHandle() const;
-
- /// Puts the handle to this service.
- void putServiceHandle(
- const SERVICE_STATUS_HANDLE serviceHandle);
-
- /// Gets the current state of this service.
- DWORD getCurrentServiceState() const;
-
- /// Gets the current state of this service as a String (for debugging).
- std::string getCurrentServiceStateStr() const;
-
- /// Puts the current state of this service that's updated by the code as it
- /// runs through various phases.
- void putCurrentServiceState(
- const DWORD currentServiceState);
-
-public:
- /// Sends a signal to the service, telling it that it's time to stop.
- void signalServiceStop();
-
- /// Wait for the service to stop.
- bool waitForServiceStop(
- const uint32 timeoutMs);
-
- /// Sends a signal indicating that the worker thread has finished working.
- void signalWorkerThreadFinished();
-
- /// Wait for the worker thread to finish working.
- bool waitForWorkerThreadFinished(
- const uint32 timeoutMs);
-
-public:
- /// Closes everything down and re-sets the component.
- void close();
-
- // Wrapper function to implement API call SetServiceStatus
- void setStatus();
-
-private:
- bool _isInitialized;
-
- std::string _serviceName;
- std::string _displayName;
- std::string _description;
- SmartPtrIWork _work;
-
- DWORD _workerThreadStopMs;
- DWORD _scmWaitHintMs;
-
- bool _isService;
-
- SERVICE_STATUS_HANDLE _serviceHandle;
-
- DWORD _currentServiceState;
-
- CThreadSignal _serviceStopSignal;
- CThreadSignal _workerThreadFinishedSignal;
-
- SmartPtrCAutoMutex _waitMutex;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(CWinServiceState);
-};
-
-CAF_DECLARE_SMART_POINTER(CWinServiceState);
-
-}
-
-#endif // #ifndef CWinServiceState_h_
+++ /dev/null
-/*
- * Author: mdonahue
- * Created: Jan 19, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef IAPPCONFIG_H_
-#define IAPPCONFIG_H_
-
-namespace Caf {
-
-struct __declspec(novtable)
-IAppConfig : public ICafObject {
- CAF_DECL_UUID("e57f2252-ce11-4d15-9338-aa928333f7a3")
-
- virtual SmartPtrIConfigParams getParameters(const std::string& sectionName) = 0;
-
- virtual bool getString(
- const std::string& sectionName,
- const std::string& parameterName,
- std::string& value,
- const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0;
-
- virtual bool getUint32(
- const std::string& sectionName,
- const std::string& parameterName,
- uint32& value,
- const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0;
-
- virtual bool getInt32(
- const std::string& sectionName,
- const std::string& parameterName,
- int32& value,
- const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0;
-
- virtual bool getBoolean(
- const std::string& sectionName,
- const std::string& parameterName,
- bool& value,
- const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0;
-
- virtual bool getGlobalString(
- const std::string& parameterName,
- std::string& value,
- const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0;
-
- virtual bool getGlobalUint32(
- const std::string& parameterName,
- uint32& value,
- const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0;
-
- virtual bool getGlobalInt32(
- const std::string& parameterName,
- int32& value,
- const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0;
-
- virtual bool getGlobalBoolean(
- const std::string& parameterName,
- bool& value,
- const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0;
-
- virtual std::string resolveValue(const std::string& value) = 0;
-};
-
-CAF_DECLARE_SMART_INTERFACE_POINTER(IAppConfig);
-
-SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfig();
-
-SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfig(const std::string& configFile);
-
-SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfig(const Cdeqstr& configFileCollection);
-
-SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfigAppend(const std::string& configFile);
-
-SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfigAppend(const Cdeqstr& configFileCollection);
-}
-
-#endif /* IAPPCONFIG_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Jan 28, 2015
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef IAPPCONFIGWRITE_H_
-#define IAPPCONFIGWRITE_H_
-
-namespace Caf {
-
-struct __declspec(novtable)
-IAppConfigWrite : public ICafObject {
- CAF_DECL_UUID("3cf708c6-b92d-46c3-83d8-edeccecf5ba4")
-
- virtual void setString(
- const std::string& sectionName,
- const std::string& parameterName,
- const std::string& value) = 0;
-
- virtual void setUint32(
- const std::string& sectionName,
- const std::string& parameterName,
- const uint32& value) = 0;
-
- virtual void setInt32(
- const std::string& sectionName,
- const std::string& parameterName,
- const int32& value) = 0;
-
- virtual void setBoolean(
- const std::string& sectionName,
- const std::string& parameterName,
- const bool& value) = 0;
-
- virtual void setGlobalString(
- const std::string& parameterName,
- const std::string& value) = 0;
-
- virtual void setGlobalUint32(
- const std::string& parameterName,
- const uint32& value) = 0;
-
- virtual void setGlobalInt32(
- const std::string& parameterName,
- const int32& value) = 0;
-
- virtual void setGlobalBoolean(
- const std::string& parameterName,
- const bool& value) = 0;
-};
-
-CAF_DECLARE_SMART_INTERFACE_POINTER(IAppConfigWrite);
-
-SmartPtrIAppConfigWrite COMMONAGGREGATOR_LINKAGE getAppConfigWrite();
-
-SmartPtrIAppConfigWrite COMMONAGGREGATOR_LINKAGE getAppConfigWrite(const std::string& configFile);
-
-SmartPtrIAppConfigWrite COMMONAGGREGATOR_LINKAGE getAppConfigWrite(const Cdeqstr& configFileCollection);
-}
-
-#endif /* IAPPCONFIGWRITE_H_ */
+++ /dev/null
-/*
- * Author: mdonahue
- * Created: Jan 28, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef IAPPLICATIONCONTEXT_H_
-#define IAPPLICATIONCONTEXT_H_
-
-
-namespace Caf {
-
-struct __declspec(novtable)
-IAppContext : public ICafObject {
- CAF_DECL_UUID("f1d65e47-0f12-4301-861c-6a8c90099dae")
-
- // key=bean id
- typedef std::map<std::string, SmartPtrIBean> CBeans;
- CAF_DECLARE_SMART_POINTER(CBeans);
-
- virtual SmartPtrIBean getBean(const std::string& name) const = 0;
-};
-
-CAF_DECLARE_SMART_INTERFACE_POINTER(IAppContext);
-}
-
-#endif /* IAPPLICATIONCONTEXT_H_ */
+++ /dev/null
-/*
- * Author: mdonahue
- * Created: Jan 17, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef ICONFIGPARAMS_H_
-#define ICONFIGPARAMS_H_
-
-namespace Caf {
-
-struct __declspec(novtable)
-IConfigParams : public ICafObject
-{
- typedef enum {
- PARAM_REQUIRED,
- PARAM_OPTIONAL
- } EParamDisposition;
-
- virtual GVariant* lookup(
- const char* key,
- const EParamDisposition disposition = PARAM_REQUIRED) const = 0;
-
- virtual std::string getSectionName() const = 0;
-
- virtual void insert(const char* key, GVariant* value) = 0;
-};
-
-CAF_DECLARE_SMART_INTERFACE_POINTER(IConfigParams);
-
-}
-
-#endif /* ICONFIGPARAMS_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: June 29, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef _CommonAggregator_IWork_h_
-#define _CommonAggregator_IWork_h_
-
-namespace Caf {
-
-/// TODO - describe interface
-struct __declspec(novtable)
- IWork : public ICafObject {
- CAF_DECL_UUID("76c269db-691f-439d-b47d-87ce55639c8f")
-
-public: // Read operations
- virtual void doWork() = 0;
- virtual void stopWork() = 0;
-};
-
-CAF_DECLARE_SMART_INTERFACE_POINTER(IWork);
-
-}
-
-#endif // #ifndef _CommonAggregator_IWork_h_
-
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef EnumConvertersXml_h_
-#define EnumConvertersXml_h_
-
-namespace Caf {
-
- namespace EnumConvertersXml {
- /// Converts the parameter type to a string
- std::string DOCUTILS_LINKAGE convertParameterTypeToString(
- const PARAMETER_TYPE parameterType);
-
- /// Converts the string to a parameter type
- PARAMETER_TYPE DOCUTILS_LINKAGE convertStringToParameterType(
- const std::string parameterType);
-
- /// Converts the property type to a string
- std::string DOCUTILS_LINKAGE convertPropertyTypeToString(
- const PROPERTY_TYPE propertyType);
-
- /// Converts the string to a property type
- PROPERTY_TYPE DOCUTILS_LINKAGE convertStringToPropertyType(
- const std::string propertyType);
-
- /// Converts the validator type to a string
- std::string DOCUTILS_LINKAGE convertValidatorTypeToString(
- const VALIDATOR_TYPE validatorType);
-
- /// Converts the string to a validator type
- VALIDATOR_TYPE DOCUTILS_LINKAGE convertStringToValidatorType(
- const std::string validatorType);
-
- /// Converts the operator type to a string
- std::string DOCUTILS_LINKAGE convertOperatorTypeToString(
- const OPERATOR_TYPE operatorType);
-
- /// Converts the string to a operator type
- OPERATOR_TYPE DOCUTILS_LINKAGE convertStringToOperatorType(
- const std::string operatorType);
-
- /// Converts the arity type to a string
- std::string DOCUTILS_LINKAGE convertArityTypeToString(
- const ARITY_TYPE arityType);
-
- /// Converts the string to an arity type
- ARITY_TYPE DOCUTILS_LINKAGE convertStringToArityType(
- const std::string arityType);
-
- /// Converts the parameter type to a string
- std::string DOCUTILS_LINKAGE convertPackageOSTypeToString(
- const PACKAGE_OS_TYPE packageOSType);
-
- /// Converts the string to a parameter type
- PACKAGE_OS_TYPE DOCUTILS_LINKAGE convertStringToPackageOSType(
- const std::string packageOSType);
-
- /// Converts the logging level enum type to a string
- std::string DOCUTILS_LINKAGE convertLoggingLevelTypeToString(
- const LOGGINGLEVEL_TYPE loggingLevelType);
-
- /// Converts the string to a logging level enum
- LOGGINGLEVEL_TYPE DOCUTILS_LINKAGE convertStringToLoggingLevelType(
- const std::string loggingLevelType);
-
- /// Converts the logging component enum type to a string
- std::string DOCUTILS_LINKAGE convertLoggingComponentTypeToString(
- const LOGGINGCOMPONENT_TYPE loggingComponentType);
-
- /// Converts the string to a logging component enum type
- LOGGINGCOMPONENT_TYPE DOCUTILS_LINKAGE convertStringToLoggingComponentType(
- const std::string loggingComponentType);
-
- std::string DOCUTILS_LINKAGE convertCmsPolicyToString(
- const CMS_POLICY cmsPolicy);
-
- CMS_POLICY DOCUTILS_LINKAGE convertStringToCmsPolicy(
- const std::string cmsPolicy);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef AddInCollectionXml_h_
-#define AddInCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the AddInCollection class to/from XML
- namespace AddInCollectionXml {
-
- /// Adds the AddInCollectionDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCAddInCollectionDoc addInCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the AddInCollectionDoc from the XML.
- SmartPtrCAddInCollectionDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef AddInsXml_h_
-#define AddInsXml_h_
-
-namespace Caf {
-
- /// Streams the AddIns class to/from XML
- namespace AddInsXml {
-
- /// Adds the AddInsDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCAddInsDoc addInsDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the AddInsDoc from the XML.
- SmartPtrCAddInsDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef AttachmentCollectionXml_h_
-#define AttachmentCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the AttachmentCollection class to/from XML
- namespace AttachmentCollectionXml {
-
- /// Adds the AttachmentCollectionDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCAttachmentCollectionDoc attachmentCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the AttachmentCollectionDoc from the XML.
- SmartPtrCAttachmentCollectionDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef AttachmentNameCollectionXml_h_
-#define AttachmentNameCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the AttachmentNameCollection class to/from XML
- namespace AttachmentNameCollectionXml {
-
- /// Adds the AttachmentNameCollectionDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the AttachmentNameCollectionDoc from the XML.
- SmartPtrCAttachmentNameCollectionDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef AttachmentXml_h_
-#define AttachmentXml_h_
-
-namespace Caf {
-
- /// Streams the Attachment class to/from XML
- namespace AttachmentXml {
-
- /// Adds the AttachmentDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCAttachmentDoc attachmentDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the AttachmentDoc from the XML.
- SmartPtrCAttachmentDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef AuthnAuthzCollectionXml_h_
-#define AuthnAuthzCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the AuthnAuthzCollection class to/from XML
- namespace AuthnAuthzCollectionXml {
-
- /// Adds the AuthnAuthzCollectionDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the AuthnAuthzCollectionDoc from the XML.
- SmartPtrCAuthnAuthzCollectionDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef AuthnAuthzXml_h_
-#define AuthnAuthzXml_h_
-
-namespace Caf {
-
- /// Streams the AuthnAuthz class to/from XML
- namespace AuthnAuthzXml {
-
- /// Adds the AuthnAuthzDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCAuthnAuthzDoc authnAuthzDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the AuthnAuthzDoc from the XML.
- SmartPtrCAuthnAuthzDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef CafCoreTypesXml_Inc_h_
-#define CafCoreTypesXml_Inc_h_
-
-#include "StatisticsXml.h"
-#include "RequestParameterXml.h"
-#include "RequestInstanceParameterXml.h"
-#include "ParameterCollectionXml.h"
-#include "PropertyXml.h"
-#include "PropertyCollectionXml.h"
-#include "AttachmentXml.h"
-#include "AttachmentCollectionXml.h"
-#include "AttachmentNameCollectionXml.h"
-#include "ClassFiltersXml.h"
-#include "FullyQualifiedClassGroupXml.h"
-#include "ClassSpecifierXml.h"
-#include "LoggingLevelElemXml.h"
-#include "LoggingLevelCollectionXml.h"
-#include "OperationXml.h"
-#include "AddInCollectionXml.h"
-#include "AddInsXml.h"
-#include "AuthnAuthzCollectionXml.h"
-#include "AuthnAuthzXml.h"
-#include "ProtocolCollectionXml.h"
-#include "ProtocolXml.h"
-#include "RequestConfigXml.h"
-#include "RequestHeaderXml.h"
-#include "RequestXml.h"
-
-#endif /* CafCoreTypesXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef CafCoreTypesXml_Link_h_
-#define CafCoreTypesXml_Link_h_
-
-#ifndef CAFCORETYPESXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define CAFCORETYPESXML_LINKAGE __declspec(dllexport)
- #else
- #define CAFCORETYPESXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define CAFCORETYPESXML_LINKAGE
- #endif
-#endif
-
-#include "CafCoreTypesXmlInc.h"
-
-#endif /* CafCoreTypesXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ClassFiltersXml_h_
-#define ClassFiltersXml_h_
-
-namespace Caf {
-
- /// Streams the ClassFilters class to/from XML
- namespace ClassFiltersXml {
-
- /// Adds the ClassFiltersDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCClassFiltersDoc classFiltersDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ClassFiltersDoc from the XML.
- SmartPtrCClassFiltersDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ClassSpecifierXml_h_
-#define ClassSpecifierXml_h_
-
-namespace Caf {
-
- /// Streams the ClassSpecifier class to/from XML
- namespace ClassSpecifierXml {
-
- /// Adds the ClassSpecifierDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCClassSpecifierDoc classSpecifierDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ClassSpecifierDoc from the XML.
- SmartPtrCClassSpecifierDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef FullyQualifiedClassGroupXml_h_
-#define FullyQualifiedClassGroupXml_h_
-
-namespace Caf {
-
- /// Streams the FullyQualifiedClassGroup class to/from XML
- namespace FullyQualifiedClassGroupXml {
-
- /// Adds the FullyQualifiedClassGroupDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassGroupDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the FullyQualifiedClassGroupDoc from the XML.
- SmartPtrCFullyQualifiedClassGroupDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef LoggingLevelCollectionXml_h_
-#define LoggingLevelCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the LoggingLevelCollection class to/from XML
- namespace LoggingLevelCollectionXml {
-
- /// Adds the LoggingLevelCollectionDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the LoggingLevelCollectionDoc from the XML.
- SmartPtrCLoggingLevelCollectionDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef LoggingLevelElemXml_h_
-#define LoggingLevelElemXml_h_
-
-namespace Caf {
-
- /// Streams the LoggingLevelElem class to/from XML
- namespace LoggingLevelElemXml {
-
- /// Adds the LoggingLevelElemDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCLoggingLevelElemDoc loggingLevelElemDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the LoggingLevelElemDoc from the XML.
- SmartPtrCLoggingLevelElemDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef OperationXml_h_
-#define OperationXml_h_
-
-namespace Caf {
-
- /// Streams the Operation class to/from XML
- namespace OperationXml {
-
- /// Adds the OperationDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCOperationDoc operationDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the OperationDoc from the XML.
- SmartPtrCOperationDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ParameterCollectionXml_h_
-#define ParameterCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the ParameterCollection class to/from XML
- namespace ParameterCollectionXml {
-
- /// Adds the ParameterCollectionDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCParameterCollectionDoc parameterCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ParameterCollectionDoc from the XML.
- SmartPtrCParameterCollectionDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef PropertyCollectionXml_h_
-#define PropertyCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the PropertyCollection class to/from XML
- namespace PropertyCollectionXml {
-
- /// Adds the PropertyCollectionDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCPropertyCollectionDoc propertyCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the PropertyCollectionDoc from the XML.
- SmartPtrCPropertyCollectionDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef PropertyXml_h_
-#define PropertyXml_h_
-
-namespace Caf {
-
- /// Streams the Property class to/from XML
- namespace PropertyXml {
-
- /// Adds the PropertyDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCPropertyDoc propertyDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the PropertyDoc from the XML.
- SmartPtrCPropertyDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProtocolCollectionXml_h_
-#define ProtocolCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the ProtocolCollection class to/from XML
- namespace ProtocolCollectionXml {
-
- /// Adds the ProtocolCollectionDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCProtocolCollectionDoc protocolCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProtocolCollectionDoc from the XML.
- SmartPtrCProtocolCollectionDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProtocolXml_h_
-#define ProtocolXml_h_
-
-namespace Caf {
-
- /// Streams the Protocol class to/from XML
- namespace ProtocolXml {
-
- /// Adds the ProtocolDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCProtocolDoc protocolDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProtocolDoc from the XML.
- SmartPtrCProtocolDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef RequestConfigXml_h_
-#define RequestConfigXml_h_
-
-namespace Caf {
-
- /// Streams the RequestConfig class to/from XML
- namespace RequestConfigXml {
-
- /// Adds the RequestConfigDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCRequestConfigDoc requestConfigDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the RequestConfigDoc from the XML.
- SmartPtrCRequestConfigDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef RequestHeaderXml_h_
-#define RequestHeaderXml_h_
-
-namespace Caf {
-
- /// Streams the RequestHeader class to/from XML
- namespace RequestHeaderXml {
-
- /// Adds the RequestHeaderDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCRequestHeaderDoc requestHeaderDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the RequestHeaderDoc from the XML.
- SmartPtrCRequestHeaderDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef RequestInstanceParameterXml_h_
-#define RequestInstanceParameterXml_h_
-
-namespace Caf {
-
- /// Streams the RequestInstanceParameter class to/from XML
- namespace RequestInstanceParameterXml {
-
- /// Adds the RequestInstanceParameterDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCRequestInstanceParameterDoc requestInstanceParameterDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the RequestInstanceParameterDoc from the XML.
- SmartPtrCRequestInstanceParameterDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef RequestParameterXml_h_
-#define RequestParameterXml_h_
-
-namespace Caf {
-
- /// Streams the RequestParameter class to/from XML
- namespace RequestParameterXml {
-
- /// Adds the RequestParameterDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCRequestParameterDoc requestParameterDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the RequestParameterDoc from the XML.
- SmartPtrCRequestParameterDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 21, 2014
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef RequestXml_h_
-#define RequestXml_h_
-
-namespace Caf {
-
- namespace RequestXml {
-
- SmartPtrCXmlElement CAFCORETYPESXML_LINKAGE parseString(
- const std::string& xml,
- const std::string& rootName);
-
- SmartPtrCXmlElement CAFCORETYPESXML_LINKAGE parseFile(
- const std::string& xml,
- const std::string& rootName);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef StatisticsXml_h_
-#define StatisticsXml_h_
-
-namespace Caf {
-
- /// Streams the Statistics class to/from XML
- namespace StatisticsXml {
-
- /// Adds the StatisticsDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCStatisticsDoc statisticsDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the StatisticsDoc from the XML.
- SmartPtrCStatisticsDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef CafInstallRequestXml_Inc_h_
-#define CafInstallRequestXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-#include "MinPackageElemXml.h"
-#include "PackageDefnXml.h"
-#include "FullPackageElemXml.h"
-#include "GetInventoryJobXml.h"
-#include "InstallProviderJobXml.h"
-#include "UninstallProviderJobXml.h"
-#include "InstallBatchXml.h"
-#include "InstallRequestXml.h"
-#include "InstallProviderSpecXml.h"
-#include "InstallPackageSpecXml.h"
-#include "CafInstallRequestXmlRoots.h"
-
-#endif /* CafInstallRequestXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef CafInstallRequestXml_Link_h_
-#define CafInstallRequestXml_Link_h_
-
-#ifndef CAFINSTALLREQUESTXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define CAFINSTALLREQUESTXML_LINKAGE __declspec(dllexport)
- #else
- #define CAFINSTALLREQUESTXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define CAFINSTALLREQUESTXML_LINKAGE
- #endif
-#endif
-
-#include "CafInstallRequestXmlInc.h"
-
-#endif /* CafInstallRequestXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef CafInstallRequestXmlRoots_h_
-#define CafInstallRequestXmlRoots_h_
-
-namespace Caf {
-
- namespace XmlRoots {
-
- /// Saves the InstallRequestDoc to a string.
- std::string CAFINSTALLREQUESTXML_LINKAGE saveInstallRequestToString(
- const SmartPtrCInstallRequestDoc installRequestDoc);
-
- /// Parses the InstallPackageSpecDoc from the string.
- SmartPtrCInstallRequestDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallRequestFromString(
- const std::string xml);
-
- /// Saves the InstallRequestDoc to a file.
- void CAFINSTALLREQUESTXML_LINKAGE saveInstallRequestToFile(
- const SmartPtrCInstallRequestDoc installRequestDoc,
- const std::string filePath);
-
- /// Parses the InstallPackageSpecDoc from the file.
- SmartPtrCInstallRequestDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallRequestFromFile(
- const std::string filePath);
-
- /// Saves the InstallProviderSpecDoc to a string.
- std::string CAFINSTALLREQUESTXML_LINKAGE saveInstallProviderSpecToString(
- const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc);
-
- /// Parses the InstallPackageSpecDoc from the string.
- SmartPtrCInstallProviderSpecDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallProviderSpecFromString(
- const std::string xml);
-
- /// Saves the InstallProviderSpecDoc to a file.
- void CAFINSTALLREQUESTXML_LINKAGE saveInstallProviderSpecToFile(
- const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc,
- const std::string filePath);
-
- /// Parses the InstallPackageSpecDoc from the file.
- SmartPtrCInstallProviderSpecDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallProviderSpecFromFile(
- const std::string filePath);
-
- /// Saves the InstallPackageSpecDoc to a string.
- std::string CAFINSTALLREQUESTXML_LINKAGE saveInstallPackageSpecToString(
- const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc);
-
- /// Parses the InstallPackageSpecDoc from the string.
- SmartPtrCInstallPackageSpecDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallPackageSpecFromString(
- const std::string xml);
-
- /// Saves the InstallPackageSpecDoc to a file.
- void CAFINSTALLREQUESTXML_LINKAGE saveInstallPackageSpecToFile(
- const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc,
- const std::string filePath);
-
- /// Parses the InstallPackageSpecDoc from the file.
- SmartPtrCInstallPackageSpecDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallPackageSpecFromFile(
- const std::string filePath);
- }
-}
-
-#endif /* CafInstallRequestXmlRoots_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef FullPackageElemXml_h_
-#define FullPackageElemXml_h_
-
-namespace Caf {
-
- /// Streams the FullPackageElem class to/from XML
- namespace FullPackageElemXml {
-
- /// Adds the FullPackageElemDoc into the XML.
- void CAFINSTALLREQUESTXML_LINKAGE add(
- const SmartPtrCFullPackageElemDoc fullPackageElemDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the FullPackageElemDoc from the XML.
- SmartPtrCFullPackageElemDoc CAFINSTALLREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef GetInventoryJobXml_h_
-#define GetInventoryJobXml_h_
-
-namespace Caf {
-
- /// Streams the GetInventoryJob class to/from XML
- namespace GetInventoryJobXml {
-
- /// Adds the GetInventoryJobDoc into the XML.
- void CAFINSTALLREQUESTXML_LINKAGE add(
- const SmartPtrCGetInventoryJobDoc getInventoryJobDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the GetInventoryJobDoc from the XML.
- SmartPtrCGetInventoryJobDoc CAFINSTALLREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef InstallBatchXml_h_
-#define InstallBatchXml_h_
-
-namespace Caf {
-
- /// Streams the InstallBatch class to/from XML
- namespace InstallBatchXml {
-
- /// Adds the InstallBatchDoc into the XML.
- void CAFINSTALLREQUESTXML_LINKAGE add(
- const SmartPtrCInstallBatchDoc installBatchDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the InstallBatchDoc from the XML.
- SmartPtrCInstallBatchDoc CAFINSTALLREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef InstallPackageSpecXml_h_
-#define InstallPackageSpecXml_h_
-
-namespace Caf {
-
- /// Streams the InstallPackageSpec class to/from XML
- namespace InstallPackageSpecXml {
-
- /// Adds the InstallPackageSpecDoc into the XML.
- void CAFINSTALLREQUESTXML_LINKAGE add(
- const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the InstallPackageSpecDoc from the XML.
- SmartPtrCInstallPackageSpecDoc CAFINSTALLREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef InstallProviderJobXml_h_
-#define InstallProviderJobXml_h_
-
-namespace Caf {
-
- /// Streams the InstallProviderJob class to/from XML
- namespace InstallProviderJobXml {
-
- /// Adds the InstallProviderJobDoc into the XML.
- void CAFINSTALLREQUESTXML_LINKAGE add(
- const SmartPtrCInstallProviderJobDoc installProviderJobDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the InstallProviderJobDoc from the XML.
- SmartPtrCInstallProviderJobDoc CAFINSTALLREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef InstallProviderSpecXml_h_
-#define InstallProviderSpecXml_h_
-
-namespace Caf {
-
- /// Streams the InstallProviderSpec class to/from XML
- namespace InstallProviderSpecXml {
-
- /// Adds the InstallProviderSpecDoc into the XML.
- void CAFINSTALLREQUESTXML_LINKAGE add(
- const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the InstallProviderSpecDoc from the XML.
- SmartPtrCInstallProviderSpecDoc CAFINSTALLREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef InstallRequestXml_h_
-#define InstallRequestXml_h_
-
-namespace Caf {
-
- /// Streams the InstallRequest class to/from XML
- namespace InstallRequestXml {
-
- /// Adds the InstallRequestDoc into the XML.
- void CAFINSTALLREQUESTXML_LINKAGE add(
- const SmartPtrCInstallRequestDoc installRequestDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the InstallRequestDoc from the XML.
- SmartPtrCInstallRequestDoc CAFINSTALLREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MinPackageElemXml_h_
-#define MinPackageElemXml_h_
-
-namespace Caf {
-
- /// Streams the MinPackageElem class to/from XML
- namespace MinPackageElemXml {
-
- /// Adds the MinPackageElemDoc into the XML.
- void CAFINSTALLREQUESTXML_LINKAGE add(
- const SmartPtrCMinPackageElemDoc minPackageElemDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MinPackageElemDoc from the XML.
- SmartPtrCMinPackageElemDoc CAFINSTALLREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef PackageDefnXml_h_
-#define PackageDefnXml_h_
-
-namespace Caf {
-
- /// Streams the PackageDefn class to/from XML
- namespace PackageDefnXml {
-
- /// Adds the PackageDefnDoc into the XML.
- void CAFINSTALLREQUESTXML_LINKAGE add(
- const SmartPtrCPackageDefnDoc packageDefnDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the PackageDefnDoc from the XML.
- SmartPtrCPackageDefnDoc CAFINSTALLREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef UninstallProviderJobXml_h_
-#define UninstallProviderJobXml_h_
-
-namespace Caf {
-
- /// Streams the UninstallProviderJob class to/from XML
- namespace UninstallProviderJobXml {
-
- /// Adds the UninstallProviderJobDoc into the XML.
- void CAFINSTALLREQUESTXML_LINKAGE add(
- const SmartPtrCUninstallProviderJobDoc uninstallProviderJobDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the UninstallProviderJobDoc from the XML.
- SmartPtrCUninstallProviderJobDoc CAFINSTALLREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DiagRequestXml_h_
-#define DiagRequestXml_h_
-
-namespace Caf {
-
- /// Streams the DiagRequest class to/from XML
- namespace DiagRequestXml {
-
- /// Adds the DiagRequestDoc into the XML.
- void DIAGREQUESTXML_LINKAGE add(
- const SmartPtrCDiagRequestDoc diagRequestDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DiagRequestDoc from the XML.
- SmartPtrCDiagRequestDoc DIAGREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DiagRequestXml_Inc_h_
-#define DiagRequestXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-#include "../DiagTypesXml/DiagTypesXmlLink.h"
-#include "DiagRequestXml.h"
-#include "DiagRequestXmlRoots.h"
-
-#endif /* DiagRequestXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DiagRequestXml_Link_h_
-#define DiagRequestXml_Link_h_
-
-#ifndef DIAGREQUESTXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define DIAGREQUESTXML_LINKAGE __declspec(dllexport)
- #else
- #define DIAGREQUESTXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define DIAGREQUESTXML_LINKAGE
- #endif
-#endif
-
-#include "DiagRequestXmlInc.h"
-
-#endif /* DiagRequestXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DiagRequestXmlRoots_h_
-#define DiagRequestXmlRoots_h_
-
-namespace Caf {
-
- namespace XmlRoots {
-
- /// Saves the DiagRequestDoc to a string.
- std::string DIAGREQUESTXML_LINKAGE saveDiagRequestToString(
- const SmartPtrCDiagRequestDoc diagRequestDoc);
-
- /// Parses the DiagRequestDoc from the string.
- SmartPtrCDiagRequestDoc DIAGREQUESTXML_LINKAGE parseDiagRequestFromString(
- const std::string xml);
-
- /// Saves the DiagRequestDoc to a file.
- void DIAGREQUESTXML_LINKAGE saveDiagRequestToFile(
- const SmartPtrCDiagRequestDoc diagRequestDoc,
- const std::string filePath);
-
- /// Parses the DiagRequestDoc from the file.
- SmartPtrCDiagRequestDoc DIAGREQUESTXML_LINKAGE parseDiagRequestFromFile(
- const std::string filePath);
- }
-}
-
-#endif /* DiagRequestXmlRoots_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DiagBatchXml_h_
-#define DiagBatchXml_h_
-
-namespace Caf {
-
- /// Streams the DiagBatch class to/from XML
- namespace DiagBatchXml {
-
- /// Adds the DiagBatchDoc into the XML.
- void DIAGTYPESXML_LINKAGE add(
- const SmartPtrCDiagBatchDoc diagBatchDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DiagBatchDoc from the XML.
- SmartPtrCDiagBatchDoc DIAGTYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DiagCollectInstancesXml_h_
-#define DiagCollectInstancesXml_h_
-
-namespace Caf {
-
- /// Streams the DiagCollectInstances class to/from XML
- namespace DiagCollectInstancesXml {
-
- /// Adds the DiagCollectInstancesDoc into the XML.
- void DIAGTYPESXML_LINKAGE add(
- const SmartPtrCDiagCollectInstancesDoc diagCollectInstancesDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DiagCollectInstancesDoc from the XML.
- SmartPtrCDiagCollectInstancesDoc DIAGTYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DiagDeleteValueCollectionXml_h_
-#define DiagDeleteValueCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the DiagDeleteValueCollection class to/from XML
- namespace DiagDeleteValueCollectionXml {
-
- /// Adds the DiagDeleteValueCollectionDoc into the XML.
- void DIAGTYPESXML_LINKAGE add(
- const SmartPtrCDiagDeleteValueCollectionDoc diagDeleteValueCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DiagDeleteValueCollectionDoc from the XML.
- SmartPtrCDiagDeleteValueCollectionDoc DIAGTYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DiagDeleteValueXml_h_
-#define DiagDeleteValueXml_h_
-
-namespace Caf {
-
- /// Streams the DiagDeleteValue class to/from XML
- namespace DiagDeleteValueXml {
-
- /// Adds the DiagDeleteValueDoc into the XML.
- void DIAGTYPESXML_LINKAGE add(
- const SmartPtrCDiagDeleteValueDoc diagDeleteValueDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DiagDeleteValueDoc from the XML.
- SmartPtrCDiagDeleteValueDoc DIAGTYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DiagSetValueCollectionXml_h_
-#define DiagSetValueCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the DiagSetValueCollection class to/from XML
- namespace DiagSetValueCollectionXml {
-
- /// Adds the DiagSetValueCollectionDoc into the XML.
- void DIAGTYPESXML_LINKAGE add(
- const SmartPtrCDiagSetValueCollectionDoc diagSetValueCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DiagSetValueCollectionDoc from the XML.
- SmartPtrCDiagSetValueCollectionDoc DIAGTYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DiagSetValueXml_h_
-#define DiagSetValueXml_h_
-
-namespace Caf {
-
- /// Streams the DiagSetValue class to/from XML
- namespace DiagSetValueXml {
-
- /// Adds the DiagSetValueDoc into the XML.
- void DIAGTYPESXML_LINKAGE add(
- const SmartPtrCDiagSetValueDoc diagSetValueDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DiagSetValueDoc from the XML.
- SmartPtrCDiagSetValueDoc DIAGTYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DiagTypesXml_Inc_h_
-#define DiagTypesXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-#include "DiagCollectInstancesXml.h"
-#include "DiagSetValueXml.h"
-#include "DiagSetValueCollectionXml.h"
-#include "DiagDeleteValueXml.h"
-#include "DiagDeleteValueCollectionXml.h"
-#include "DiagBatchXml.h"
-
-#endif /* DiagTypesXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DiagTypesXml_Link_h_
-#define DiagTypesXml_Link_h_
-
-#ifndef DIAGTYPESXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define DIAGTYPESXML_LINKAGE __declspec(dllexport)
- #else
- #define DIAGTYPESXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define DIAGTYPESXML_LINKAGE
- #endif
-#endif
-
-#include "DiagTypesXmlInc.h"
-
-#endif /* DiagTypesXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MgmtRequestXml_h_
-#define MgmtRequestXml_h_
-
-namespace Caf {
-
- /// Streams the MgmtRequest class to/from XML
- namespace MgmtRequestXml {
-
- /// Adds the MgmtRequestDoc into the XML.
- void MGMTREQUESTXML_LINKAGE add(
- const SmartPtrCMgmtRequestDoc mgmtRequestDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MgmtRequestDoc from the XML.
- SmartPtrCMgmtRequestDoc MGMTREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MgmtRequestXml_Inc_h_
-#define MgmtRequestXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-#include "../MgmtTypesXml/MgmtTypesXmlLink.h"
-#include "MgmtRequestXml.h"
-#include "MgmtRequestXmlRoots.h"
-
-#endif /* MgmtRequestXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MgmtRequestXml_Link_h_
-#define MgmtRequestXml_Link_h_
-
-#ifndef MGMTREQUESTXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define MGMTREQUESTXML_LINKAGE __declspec(dllexport)
- #else
- #define MGMTREQUESTXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define MGMTREQUESTXML_LINKAGE
- #endif
-#endif
-
-#include "MgmtRequestXmlInc.h"
-
-#endif /* MgmtRequestXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MgmtRequestXmlRoots_h_
-#define MgmtRequestXmlRoots_h_
-
-namespace Caf {
-
- namespace XmlRoots {
-
- /// Saves the MgmtRequestDoc to a string.
- std::string MGMTREQUESTXML_LINKAGE saveMgmtRequestToString(
- const SmartPtrCMgmtRequestDoc mgmtRequestDoc);
-
- /// Parses the MgmtRequestDoc from the string.
- SmartPtrCMgmtRequestDoc MGMTREQUESTXML_LINKAGE parseMgmtRequestFromString(
- const std::string xml);
-
- /// Saves the MgmtRequestDoc to a file.
- void MGMTREQUESTXML_LINKAGE saveMgmtRequestToFile(
- const SmartPtrCMgmtRequestDoc mgmtRequestDoc,
- const std::string filePath);
-
- /// Parses the MgmtRequestDoc from the file.
- SmartPtrCMgmtRequestDoc MGMTREQUESTXML_LINKAGE parseMgmtRequestFromFile(
- const std::string filePath);
- }
-}
-
-#endif /* MgmtRequestXmlRoots_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MgmtBatchXml_h_
-#define MgmtBatchXml_h_
-
-namespace Caf {
-
- /// Streams the MgmtBatch class to/from XML
- namespace MgmtBatchXml {
-
- /// Adds the MgmtBatchDoc into the XML.
- void MGMTTYPESXML_LINKAGE add(
- const SmartPtrCMgmtBatchDoc mgmtBatchDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MgmtBatchDoc from the XML.
- SmartPtrCMgmtBatchDoc MGMTTYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MgmtCollectInstancesCollectionXml_h_
-#define MgmtCollectInstancesCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the MgmtCollectInstancesCollection class to/from XML
- namespace MgmtCollectInstancesCollectionXml {
-
- /// Adds the MgmtCollectInstancesCollectionDoc into the XML.
- void MGMTTYPESXML_LINKAGE add(
- const SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MgmtCollectInstancesCollectionDoc from the XML.
- SmartPtrCMgmtCollectInstancesCollectionDoc MGMTTYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MgmtCollectInstancesXml_h_
-#define MgmtCollectInstancesXml_h_
-
-namespace Caf {
-
- /// Streams the MgmtCollectInstances class to/from XML
- namespace MgmtCollectInstancesXml {
-
- /// Adds the MgmtCollectInstancesDoc into the XML.
- void MGMTTYPESXML_LINKAGE add(
- const SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstancesDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MgmtCollectInstancesDoc from the XML.
- SmartPtrCMgmtCollectInstancesDoc MGMTTYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MgmtCollectSchemaXml_h_
-#define MgmtCollectSchemaXml_h_
-
-namespace Caf {
-
- /// Streams the MgmtCollectSchema class to/from XML
- namespace MgmtCollectSchemaXml {
-
- /// Adds the MgmtCollectSchemaDoc into the XML.
- void MGMTTYPESXML_LINKAGE add(
- const SmartPtrCMgmtCollectSchemaDoc mgmtCollectSchemaDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MgmtCollectSchemaDoc from the XML.
- SmartPtrCMgmtCollectSchemaDoc MGMTTYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MgmtInvokeOperationCollectionXml_h_
-#define MgmtInvokeOperationCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the MgmtInvokeOperationCollection class to/from XML
- namespace MgmtInvokeOperationCollectionXml {
-
- /// Adds the MgmtInvokeOperationCollectionDoc into the XML.
- void MGMTTYPESXML_LINKAGE add(
- const SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MgmtInvokeOperationCollectionDoc from the XML.
- SmartPtrCMgmtInvokeOperationCollectionDoc MGMTTYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MgmtInvokeOperationXml_h_
-#define MgmtInvokeOperationXml_h_
-
-namespace Caf {
-
- /// Streams the MgmtInvokeOperation class to/from XML
- namespace MgmtInvokeOperationXml {
-
- /// Adds the MgmtInvokeOperationDoc into the XML.
- void MGMTTYPESXML_LINKAGE add(
- const SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperationDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MgmtInvokeOperationDoc from the XML.
- SmartPtrCMgmtInvokeOperationDoc MGMTTYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MgmtTypesXml_Inc_h_
-#define MgmtTypesXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-#include "MgmtCollectSchemaXml.h"
-#include "MgmtCollectInstancesXml.h"
-#include "MgmtInvokeOperationXml.h"
-#include "MgmtCollectInstancesCollectionXml.h"
-#include "MgmtInvokeOperationCollectionXml.h"
-#include "MgmtBatchXml.h"
-
-#endif /* MgmtTypesXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MgmtTypesXml_Link_h_
-#define MgmtTypesXml_Link_h_
-
-#ifndef MGMTTYPESXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define MGMTTYPESXML_LINKAGE __declspec(dllexport)
- #else
- #define MGMTTYPESXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define MGMTTYPESXML_LINKAGE
- #endif
-#endif
-
-#include "MgmtTypesXmlInc.h"
-
-#endif /* MgmtTypesXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MultiPmeMgmtBatchCollectionXml_h_
-#define MultiPmeMgmtBatchCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the MultiPmeMgmtBatchCollection class to/from XML
- namespace MultiPmeMgmtBatchCollectionXml {
-
- /// Adds the MultiPmeMgmtBatchCollectionDoc into the XML.
- void MULTIPMEMGMTREQUESTXML_LINKAGE add(
- const SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeMgmtBatchCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MultiPmeMgmtBatchCollectionDoc from the XML.
- SmartPtrCMultiPmeMgmtBatchCollectionDoc MULTIPMEMGMTREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MultiPmeMgmtBatchXml_h_
-#define MultiPmeMgmtBatchXml_h_
-
-namespace Caf {
-
- /// Streams the MultiPmeMgmtBatch class to/from XML
- namespace MultiPmeMgmtBatchXml {
-
- /// Adds the MultiPmeMgmtBatchDoc into the XML.
- void MULTIPMEMGMTREQUESTXML_LINKAGE add(
- const SmartPtrCMultiPmeMgmtBatchDoc multiPmeMgmtBatchDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MultiPmeMgmtBatchDoc from the XML.
- SmartPtrCMultiPmeMgmtBatchDoc MULTIPMEMGMTREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MultiPmeMgmtRequestXml_h_
-#define MultiPmeMgmtRequestXml_h_
-
-namespace Caf {
-
- /// Streams the MultiPmeMgmtRequest class to/from XML
- namespace MultiPmeMgmtRequestXml {
-
- /// Adds the MultiPmeMgmtRequestDoc into the XML.
- void MULTIPMEMGMTREQUESTXML_LINKAGE add(
- const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MultiPmeMgmtRequestDoc from the XML.
- SmartPtrCMultiPmeMgmtRequestDoc MULTIPMEMGMTREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MultiPmeMgmtRequestXml_Inc_h_
-#define MultiPmeMgmtRequestXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-#include "../MgmtTypesXml/MgmtTypesXmlLink.h"
-#include "PmeIdCollectionXml.h"
-#include "MultiPmeMgmtBatchXml.h"
-#include "MultiPmeMgmtBatchCollectionXml.h"
-#include "MultiPmeMgmtRequestXml.h"
-#include "MultiPmeMgmtRequestXmlRoots.h"
-
-#endif /* MultiPmeMgmtRequestXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MultiPmeMgmtRequestXml_Link_h_
-#define MultiPmeMgmtRequestXml_Link_h_
-
-#ifndef MULTIPMEMGMTREQUESTXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define MULTIPMEMGMTREQUESTXML_LINKAGE __declspec(dllexport)
- #else
- #define MULTIPMEMGMTREQUESTXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define MULTIPMEMGMTREQUESTXML_LINKAGE
- #endif
-#endif
-
-#include "MultiPmeMgmtRequestXmlInc.h"
-
-#endif /* MultiPmeMgmtRequestXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MultiPmeMgmtRequestXmlRoots_h_
-#define MultiPmeMgmtRequestXmlRoots_h_
-
-namespace Caf {
-
- namespace XmlRoots {
-
- /// Saves the MultiPmeMgmtRequestDoc to a string.
- std::string MULTIPMEMGMTREQUESTXML_LINKAGE saveMultiPmeMgmtRequestToString(
- const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc);
-
- /// Parses the MultiPmeMgmtRequestDoc from the string.
- SmartPtrCMultiPmeMgmtRequestDoc MULTIPMEMGMTREQUESTXML_LINKAGE parseMultiPmeMgmtRequestFromString(
- const std::string xml);
-
- /// Saves the MultiPmeMgmtRequestDoc to a file.
- void MULTIPMEMGMTREQUESTXML_LINKAGE saveMultiPmeMgmtRequestToFile(
- const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc,
- const std::string filePath);
-
- /// Parses the MultiPmeMgmtRequestDoc from the file.
- SmartPtrCMultiPmeMgmtRequestDoc MULTIPMEMGMTREQUESTXML_LINKAGE parseMultiPmeMgmtRequestFromFile(
- const std::string filePath);
- }
-}
-
-#endif /* MultiPmeMgmtRequestXmlRoots_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef PmeIdCollectionXml_h_
-#define PmeIdCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the PmeIdCollection class to/from XML
- namespace PmeIdCollectionXml {
-
- /// Adds the PmeIdCollectionDoc into the XML.
- void MULTIPMEMGMTREQUESTXML_LINKAGE add(
- const SmartPtrCPmeIdCollectionDoc pmeIdCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the PmeIdCollectionDoc from the XML.
- SmartPtrCPmeIdCollectionDoc MULTIPMEMGMTREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: July 3, 2015
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef PayloadEnvelopeXml_h_
-#define PayloadEnvelopeXml_h_
-
-namespace Caf {
-
- /// Streams the PayloadEnvelope class to/from XML
- namespace PayloadEnvelopeXml {
-
- /// Adds the PayloadEnvelopeDoc into the XML.
- void PAYLOADENVELOPEXML_LINKAGE add(
- const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the PayloadEnvelopeDoc from the XML.
- SmartPtrCPayloadEnvelopeDoc PAYLOADENVELOPEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef PayloadEnvelopeXml_Inc_h_
-#define PayloadEnvelopeXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-#include "PayloadEnvelopeXml.h"
-#include "PayloadEnvelopeXmlRoots.h"
-
-#endif /* PayloadEnvelopeXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef PayloadEnvelopeXml_Link_h_
-#define PayloadEnvelopeXml_Link_h_
-
-#ifndef PAYLOADENVELOPEXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define PAYLOADENVELOPEXML_LINKAGE __declspec(dllexport)
- #else
- #define PAYLOADENVELOPEXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define PAYLOADENVELOPEXML_LINKAGE
- #endif
-#endif
-
-#include "PayloadEnvelopeXmlInc.h"
-
-#endif /* PayloadEnvelopeXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef PayloadEnvelopeXmlRoots_h_
-#define PayloadEnvelopeXmlRoots_h_
-
-namespace Caf {
-
- namespace XmlRoots {
- /// Saves the PayloadEnvelopeDoc to a string.
- std::string PAYLOADENVELOPEXML_LINKAGE savePayloadEnvelopeToString(
- const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc);
-
- /// Parses the PayloadEnvelopeDoc from the string.
- SmartPtrCPayloadEnvelopeDoc PAYLOADENVELOPEXML_LINKAGE parsePayloadEnvelopeFromString(
- const std::string xml);
-
- /// Saves the PayloadEnvelopeDoc to a file.
- void PAYLOADENVELOPEXML_LINKAGE savePayloadEnvelopeToFile(
- const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc,
- const std::string filePath);
-
- /// Parses the PayloadEnvelopeDoc from the file.
- SmartPtrCPayloadEnvelopeDoc PAYLOADENVELOPEXML_LINKAGE parsePayloadEnvelopeFromFile(
- const std::string filePath);
- }
-}
-
-#endif /* PayloadEnvelopeXmlRoots_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 16, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef CertCollectionXml_h_
-#define CertCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the CertCollection class to/from XML
- namespace CertCollectionXml {
-
- /// Adds the CertCollectionDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCCertCollectionDoc certCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the CertCollectionDoc from the XML.
- SmartPtrCCertCollectionDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 16, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef CertPathCollectionXml_h_
-#define CertPathCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the CertPathCollection class to/from XML
- namespace CertPathCollectionXml {
-
- /// Adds the CertPathCollectionDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCCertPathCollectionDoc certPathCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the CertPathCollectionDoc from the XML.
- SmartPtrCCertPathCollectionDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 16, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef LocalSecurityXml_h_
-#define LocalSecurityXml_h_
-
-namespace Caf {
-
- /// Streams the LocalSecurity class to/from XML
- namespace LocalSecurityXml {
-
- /// Adds the LocalSecurityDoc into the XML.
- void PERSISTENCEXML_LINKAGE add(
- const SmartPtrCLocalSecurityDoc localSecurityDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the LocalSecurityDoc from the XML.
- SmartPtrCLocalSecurityDoc PERSISTENCEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 16, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef PersistenceProtocolCollectionXml_h_
-#define PersistenceProtocolCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the PersistenceProtocolCollection class to/from XML
- namespace PersistenceProtocolCollectionXml {
-
- /// Adds the PersistenceProtocolCollectionDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCPersistenceProtocolCollectionDoc persistenceProtocolCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the PersistenceProtocolCollectionDoc from the XML.
- SmartPtrCPersistenceProtocolCollectionDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 16, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef PersistenceProtocolXml_h_
-#define PersistenceProtocolXml_h_
-
-namespace Caf {
-
- /// Streams the PersistenceProtocol class to/from XML
- namespace PersistenceProtocolXml {
-
- /// Adds the PersistenceProtocolDoc into the XML.
- void PERSISTENCEXML_LINKAGE add(
- const SmartPtrCPersistenceProtocolDoc persistenceProtocolDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the PersistenceProtocolDoc from the XML.
- SmartPtrCPersistenceProtocolDoc PERSISTENCEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 16, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef PersistenceXml_h_
-#define PersistenceXml_h_
-
-namespace Caf {
-
- /// Streams the Persistence class to/from XML
- namespace PersistenceXml {
-
- /// Adds the PersistenceDoc into the XML.
- void PERSISTENCEXML_LINKAGE add(
- const SmartPtrCPersistenceDoc persistenceDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the PersistenceDoc from the XML.
- SmartPtrCPersistenceDoc PERSISTENCEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 16, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef PersistenceXml_Inc_h_
-#define PersistenceXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-
-#include "CertCollectionXml.h"
-#include "CertPathCollectionXml.h"
-#include "PersistenceProtocolXml.h"
-#include "PersistenceProtocolCollectionXml.h"
-#include "RemoteSecurityXml.h"
-#include "RemoteSecurityCollectionXml.h"
-#include "LocalSecurityXml.h"
-#include "PersistenceXml.h"
-#include "PersistenceXmlRoots.h"
-
-#endif /* PersistenceXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 16, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef PersistenceXml_Link_h_
-#define PersistenceXml_Link_h_
-
-#ifndef PERSISTENCEXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define PERSISTENCEXML_LINKAGE __declspec(dllexport)
- #else
- #define PERSISTENCEXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define PERSISTENCEXML_LINKAGE
- #endif
-#endif
-
-#include "PersistenceXmlInc.h"
-
-#endif /* PersistenceXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 16, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef PersistenceXmlRoots_h_
-#define PersistenceXmlRoots_h_
-
-namespace Caf {
-
- namespace XmlRoots {
- /// Saves the PersistenceDoc to a string.
- std::string PERSISTENCEXML_LINKAGE savePersistenceToString(
- const SmartPtrCPersistenceDoc persistenceDoc);
-
- /// Parses the PersistenceDoc from the string.
- SmartPtrCPersistenceDoc PERSISTENCEXML_LINKAGE parsePersistenceFromString(
- const std::string xml);
-
- /// Saves the PersistenceDoc to a file.
- void PERSISTENCEXML_LINKAGE savePersistenceToFile(
- const SmartPtrCPersistenceDoc persistenceDoc,
- const std::string filePath);
-
- /// Parses the PersistenceDoc from the file.
- SmartPtrCPersistenceDoc PERSISTENCEXML_LINKAGE parsePersistenceFromFile(
- const std::string filePath);
- }
-}
-
-#endif /* PersistenceXmlRoots_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 16, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef RemoteSecurityCollectionXml_h_
-#define RemoteSecurityCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the RemoteSecurityCollection class to/from XML
- namespace RemoteSecurityCollectionXml {
-
- /// Adds the RemoteSecurityCollectionDoc into the XML.
- void CAFCORETYPESXML_LINKAGE add(
- const SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the RemoteSecurityCollectionDoc from the XML.
- SmartPtrCRemoteSecurityCollectionDoc CAFCORETYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 16, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef RemoteSecurityXml_h_
-#define RemoteSecurityXml_h_
-
-namespace Caf {
-
- /// Streams the RemoteSecurity class to/from XML
- namespace RemoteSecurityXml {
-
- /// Adds the RemoteSecurityDoc into the XML.
- void PERSISTENCEXML_LINKAGE add(
- const SmartPtrCRemoteSecurityDoc remoteSecurityDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the RemoteSecurityDoc from the XML.
- SmartPtrCRemoteSecurityDoc PERSISTENCEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ClassCollectionXml_h_
-#define ClassCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the ClassCollection class to/from XML
- namespace ClassCollectionXml {
-
- /// Adds the ClassCollectionDoc into the XML.
- void PROVIDERINFRAXML_LINKAGE add(
- const SmartPtrCClassCollectionDoc classCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ClassCollectionDoc from the XML.
- SmartPtrCClassCollectionDoc PROVIDERINFRAXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderInfraXml_Inc_h_
-#define ProviderInfraXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-#include "ClassCollectionXml.h"
-#include "ProviderRegXml.h"
-#include "SchemaSummaryXml.h"
-#include "ProviderInfraXmlRoots.h"
-
-#endif /* ProviderInfraXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderInfraXml_Link_h_
-#define ProviderInfraXml_Link_h_
-
-#ifndef PROVIDERINFRAXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define PROVIDERINFRAXML_LINKAGE __declspec(dllexport)
- #else
- #define PROVIDERINFRAXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define PROVIDERINFRAXML_LINKAGE
- #endif
-#endif
-
-#include "ProviderInfraXmlInc.h"
-
-#endif /* ProviderInfraXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderInfraXmlRoots_h_
-#define ProviderInfraXmlRoots_h_
-
-namespace Caf {
-
- namespace XmlRoots {
-
- /// Saves the ProviderRegDoc to a string.
- std::string PROVIDERINFRAXML_LINKAGE saveProviderRegToString(
- const SmartPtrCProviderRegDoc providerRegDoc);
-
- /// Parses the SchemaSummaryDoc from the string.
- SmartPtrCProviderRegDoc PROVIDERINFRAXML_LINKAGE parseProviderRegFromString(
- const std::string xml);
-
- /// Saves the ProviderRegDoc to a file.
- void PROVIDERINFRAXML_LINKAGE saveProviderRegToFile(
- const SmartPtrCProviderRegDoc providerRegDoc,
- const std::string filePath);
-
- /// Parses the SchemaSummaryDoc from the file.
- SmartPtrCProviderRegDoc PROVIDERINFRAXML_LINKAGE parseProviderRegFromFile(
- const std::string filePath);
-
- /// Saves the SchemaSummaryDoc to a string.
- std::string PROVIDERINFRAXML_LINKAGE saveSchemaSummaryToString(
- const SmartPtrCSchemaSummaryDoc schemaSummaryDoc);
-
- /// Parses the SchemaSummaryDoc from the string.
- SmartPtrCSchemaSummaryDoc PROVIDERINFRAXML_LINKAGE parseSchemaSummaryFromString(
- const std::string xml);
-
- /// Saves the SchemaSummaryDoc to a file.
- void PROVIDERINFRAXML_LINKAGE saveSchemaSummaryToFile(
- const SmartPtrCSchemaSummaryDoc schemaSummaryDoc,
- const std::string filePath);
-
- /// Parses the SchemaSummaryDoc from the file.
- SmartPtrCSchemaSummaryDoc PROVIDERINFRAXML_LINKAGE parseSchemaSummaryFromFile(
- const std::string filePath);
- }
-}
-
-#endif /* ProviderInfraXmlRoots_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderRegXml_h_
-#define ProviderRegXml_h_
-
-namespace Caf {
-
- /// Streams the ProviderReg class to/from XML
- namespace ProviderRegXml {
-
- /// Adds the ProviderRegDoc into the XML.
- void PROVIDERINFRAXML_LINKAGE add(
- const SmartPtrCProviderRegDoc providerRegDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProviderRegDoc from the XML.
- SmartPtrCProviderRegDoc PROVIDERINFRAXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef SchemaSummaryXml_h_
-#define SchemaSummaryXml_h_
-
-namespace Caf {
-
- /// Streams the SchemaSummary class to/from XML
- namespace SchemaSummaryXml {
-
- /// Adds the SchemaSummaryDoc into the XML.
- void PROVIDERINFRAXML_LINKAGE add(
- const SmartPtrCSchemaSummaryDoc schemaSummaryDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the SchemaSummaryDoc from the XML.
- SmartPtrCSchemaSummaryDoc PROVIDERINFRAXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderBatchXml_h_
-#define ProviderBatchXml_h_
-
-namespace Caf {
-
- /// Streams the ProviderBatch class to/from XML
- namespace ProviderBatchXml {
-
- /// Adds the ProviderBatchDoc into the XML.
- void PROVIDERREQUESTXML_LINKAGE add(
- const SmartPtrCProviderBatchDoc providerBatchDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProviderBatchDoc from the XML.
- SmartPtrCProviderBatchDoc PROVIDERREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderCollectInstancesCollectionXml_h_
-#define ProviderCollectInstancesCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the ProviderCollectInstancesCollection class to/from XML
- namespace ProviderCollectInstancesCollectionXml {
-
- /// Adds the ProviderCollectInstancesCollectionDoc into the XML.
- void PROVIDERREQUESTXML_LINKAGE add(
- const SmartPtrCProviderCollectInstancesCollectionDoc providerCollectInstancesCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProviderCollectInstancesCollectionDoc from the XML.
- SmartPtrCProviderCollectInstancesCollectionDoc PROVIDERREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderCollectInstancesXml_h_
-#define ProviderCollectInstancesXml_h_
-
-namespace Caf {
-
- /// Streams the ProviderCollectInstances class to/from XML
- namespace ProviderCollectInstancesXml {
-
- /// Adds the ProviderCollectInstancesDoc into the XML.
- void PROVIDERREQUESTXML_LINKAGE add(
- const SmartPtrCProviderCollectInstancesDoc providerCollectInstancesDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProviderCollectInstancesDoc from the XML.
- SmartPtrCProviderCollectInstancesDoc PROVIDERREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderCollectSchemaRequestXml_h_
-#define ProviderCollectSchemaRequestXml_h_
-
-namespace Caf {
-
- /// Streams the ProviderCollectSchemaRequest class to/from XML
- namespace ProviderCollectSchemaRequestXml {
-
- /// Adds the ProviderCollectSchemaRequestDoc into the XML.
- void PROVIDERREQUESTXML_LINKAGE add(
- const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProviderCollectSchemaRequestDoc from the XML.
- SmartPtrCProviderCollectSchemaRequestDoc PROVIDERREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderInvokeOperationCollectionXml_h_
-#define ProviderInvokeOperationCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the ProviderInvokeOperationCollection class to/from XML
- namespace ProviderInvokeOperationCollectionXml {
-
- /// Adds the ProviderInvokeOperationCollectionDoc into the XML.
- void PROVIDERREQUESTXML_LINKAGE add(
- const SmartPtrCProviderInvokeOperationCollectionDoc providerInvokeOperationCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProviderInvokeOperationCollectionDoc from the XML.
- SmartPtrCProviderInvokeOperationCollectionDoc PROVIDERREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderInvokeOperationXml_h_
-#define ProviderInvokeOperationXml_h_
-
-namespace Caf {
-
- /// Streams the ProviderInvokeOperation class to/from XML
- namespace ProviderInvokeOperationXml {
-
- /// Adds the ProviderInvokeOperationDoc into the XML.
- void PROVIDERREQUESTXML_LINKAGE add(
- const SmartPtrCProviderInvokeOperationDoc providerInvokeOperationDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProviderInvokeOperationDoc from the XML.
- SmartPtrCProviderInvokeOperationDoc PROVIDERREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderRequestConfigXml_h_
-#define ProviderRequestConfigXml_h_
-
-namespace Caf {
-
- /// Streams the ProviderRequestConfig class to/from XML
- namespace ProviderRequestConfigXml {
-
- /// Adds the ProviderRequestConfigDoc into the XML.
- void PROVIDERREQUESTXML_LINKAGE add(
- const SmartPtrCProviderRequestConfigDoc providerRequestConfigDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProviderRequestConfigDoc from the XML.
- SmartPtrCProviderRequestConfigDoc PROVIDERREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderRequestHeaderXml_h_
-#define ProviderRequestHeaderXml_h_
-
-namespace Caf {
-
- /// Streams the ProviderRequestHeader class to/from XML
- namespace ProviderRequestHeaderXml {
-
- /// Adds the ProviderRequestHeaderDoc into the XML.
- void PROVIDERREQUESTXML_LINKAGE add(
- const SmartPtrCProviderRequestHeaderDoc providerRequestHeaderDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProviderRequestHeaderDoc from the XML.
- SmartPtrCProviderRequestHeaderDoc PROVIDERREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderRequestXml_h_
-#define ProviderRequestXml_h_
-
-namespace Caf {
-
- /// Streams the ProviderRequest class to/from XML
- namespace ProviderRequestXml {
-
- /// Adds the ProviderRequestDoc into the XML.
- void PROVIDERREQUESTXML_LINKAGE add(
- const SmartPtrCProviderRequestDoc providerRequestDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProviderRequestDoc from the XML.
- SmartPtrCProviderRequestDoc PROVIDERREQUESTXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderRequestXml_Inc_h_
-#define ProviderRequestXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-#include "ProviderRequestConfigXml.h"
-#include "ProviderRequestHeaderXml.h"
-#include "ProviderCollectInstancesXml.h"
-#include "ProviderInvokeOperationXml.h"
-#include "ProviderCollectInstancesCollectionXml.h"
-#include "ProviderInvokeOperationCollectionXml.h"
-#include "ProviderBatchXml.h"
-#include "ProviderRequestXml.h"
-#include "ProviderCollectSchemaRequestXml.h"
-#include "ProviderRequestXmlRoots.h"
-
-#endif /* ProviderRequestXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderRequestXml_Link_h_
-#define ProviderRequestXml_Link_h_
-
-#ifndef PROVIDERREQUESTXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define PROVIDERREQUESTXML_LINKAGE __declspec(dllexport)
- #else
- #define PROVIDERREQUESTXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define PROVIDERREQUESTXML_LINKAGE
- #endif
-#endif
-
-#include "ProviderRequestXmlInc.h"
-
-#endif /* ProviderRequestXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderRequestXmlRoots_h_
-#define ProviderRequestXmlRoots_h_
-
-namespace Caf {
-
- namespace XmlRoots {
-
- /// Saves the ProviderCollectSchemaRequestDoc to a string.
- std::string PROVIDERREQUESTXML_LINKAGE saveProviderCollectSchemaRequestToString(
- const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc);
-
- /// Parses the ProviderCollectSchemaRequestDoc from the string.
- SmartPtrCProviderCollectSchemaRequestDoc PROVIDERREQUESTXML_LINKAGE parseProviderCollectSchemaRequestFromString(
- const std::string xml);
-
- /// Saves the ProviderCollectSchemaRequestDoc to a file.
- void PROVIDERREQUESTXML_LINKAGE saveProviderCollectSchemaRequestToFile(
- const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc,
- const std::string filePath);
-
- /// Parses the ProviderCollectSchemaRequestDoc from the file.
- SmartPtrCProviderCollectSchemaRequestDoc PROVIDERREQUESTXML_LINKAGE parseProviderCollectSchemaRequestFromFile(
- const std::string filePath);
-
- /// Saves the ProviderRequestDoc to a string.
- std::string PROVIDERREQUESTXML_LINKAGE saveProviderRequestToString(
- const SmartPtrCProviderRequestDoc providerRequestDoc);
-
- /// Parses the ProviderCollectSchemaRequestDoc from the string.
- SmartPtrCProviderRequestDoc PROVIDERREQUESTXML_LINKAGE parseProviderRequestFromString(
- const std::string xml);
-
- /// Saves the ProviderRequestDoc to a file.
- void PROVIDERREQUESTXML_LINKAGE saveProviderRequestToFile(
- const SmartPtrCProviderRequestDoc providerRequestDoc,
- const std::string filePath);
-
- /// Parses the ProviderCollectSchemaRequestDoc from the file.
- SmartPtrCProviderRequestDoc PROVIDERREQUESTXML_LINKAGE parseProviderRequestFromFile(
- const std::string filePath);
- }
-}
-
-#endif /* ProviderRequestXmlRoots_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef CdifXml_h_
-#define CdifXml_h_
-
-namespace Caf {
-
- /// Streams the Cdif class to/from XML
- namespace CdifXml {
-
- /// Adds the CdifDoc into the XML.
- void PROVIDERRESULTSXML_LINKAGE add(
- const SmartPtrCCdifDoc cdifDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the CdifDoc from the XML.
- SmartPtrCCdifDoc PROVIDERRESULTSXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DefinitionObjectCollectionXml_h_
-#define DefinitionObjectCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the DefinitionObjectCollection class to/from XML
- namespace DefinitionObjectCollectionXml {
-
- /// Adds the DefinitionObjectCollectionDoc into the XML.
- void PROVIDERRESULTSXML_LINKAGE add(
- const SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DefinitionObjectCollectionDoc from the XML.
- SmartPtrCDefinitionObjectCollectionDoc PROVIDERRESULTSXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderResultsXml_Inc_h_
-#define ProviderResultsXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-#include "../SchemaTypesXml/SchemaTypesXmlLink.h"
-#include "SchemaXml.h"
-#include "CdifXml.h"
-#include "RequestIdentifierXml.h"
-#include "DefinitionObjectCollectionXml.h"
-#include "ProviderResultsXmlRoots.h"
-
-#endif /* ProviderResultsXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderResultsXml_Link_h_
-#define ProviderResultsXml_Link_h_
-
-#ifndef PROVIDERRESULTSXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define PROVIDERRESULTSXML_LINKAGE __declspec(dllexport)
- #else
- #define PROVIDERRESULTSXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define PROVIDERRESULTSXML_LINKAGE
- #endif
-#endif
-
-#include "ProviderResultsXmlInc.h"
-
-#endif /* ProviderResultsXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderResultsXmlRoots_h_
-#define ProviderResultsXmlRoots_h_
-
-namespace Caf {
-
- namespace XmlRoots {
-
- /// Saves the SchemaDoc to a string.
- std::string PROVIDERRESULTSXML_LINKAGE saveSchemaToString(
- const SmartPtrCSchemaDoc schemaDoc);
-
- /// Parses the DefinitionObjectCollectionDoc from the string.
- SmartPtrCSchemaDoc PROVIDERRESULTSXML_LINKAGE parseSchemaFromString(
- const std::string xml);
-
- /// Saves the SchemaDoc to a file.
- void PROVIDERRESULTSXML_LINKAGE saveSchemaToFile(
- const SmartPtrCSchemaDoc schemaDoc,
- const std::string filePath);
-
- /// Parses the DefinitionObjectCollectionDoc from the file.
- SmartPtrCSchemaDoc PROVIDERRESULTSXML_LINKAGE parseSchemaFromFile(
- const std::string filePath);
-
- /// Saves the CdifDoc to a string.
- std::string PROVIDERRESULTSXML_LINKAGE saveCdifToString(
- const SmartPtrCCdifDoc cdifDoc);
-
- /// Parses the DefinitionObjectCollectionDoc from the string.
- SmartPtrCCdifDoc PROVIDERRESULTSXML_LINKAGE parseCdifFromString(
- const std::string xml);
-
- /// Saves the CdifDoc to a file.
- void PROVIDERRESULTSXML_LINKAGE saveCdifToFile(
- const SmartPtrCCdifDoc cdifDoc,
- const std::string filePath);
-
- /// Parses the DefinitionObjectCollectionDoc from the file.
- SmartPtrCCdifDoc PROVIDERRESULTSXML_LINKAGE parseCdifFromFile(
- const std::string filePath);
- }
-}
-
-#endif /* ProviderResultsXmlRoots_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef RequestIdentifierXml_h_
-#define RequestIdentifierXml_h_
-
-namespace Caf {
-
- /// Streams the RequestIdentifier class to/from XML
- namespace RequestIdentifierXml {
-
- /// Adds the RequestIdentifierDoc into the XML.
- void PROVIDERRESULTSXML_LINKAGE add(
- const SmartPtrCRequestIdentifierDoc requestIdentifierDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the RequestIdentifierDoc from the XML.
- SmartPtrCRequestIdentifierDoc PROVIDERRESULTSXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef SchemaXml_h_
-#define SchemaXml_h_
-
-namespace Caf {
-
- /// Streams the Schema class to/from XML
- namespace SchemaXml {
-
- /// Adds the SchemaDoc into the XML.
- void PROVIDERRESULTSXML_LINKAGE add(
- const SmartPtrCSchemaDoc schemaDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the SchemaDoc from the XML.
- SmartPtrCSchemaDoc PROVIDERRESULTSXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ErrorResponseXml_h_
-#define ErrorResponseXml_h_
-
-namespace Caf {
-
- /// Streams the ErrorResponse class to/from XML
- namespace ErrorResponseXml {
-
- /// Adds the ErrorResponseDoc into the XML.
- void RESPONSEXML_LINKAGE add(
- const SmartPtrCErrorResponseDoc errorResponseDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ErrorResponseDoc from the XML.
- SmartPtrCErrorResponseDoc RESPONSEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef EventKeyCollectionXml_h_
-#define EventKeyCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the EventKeyCollection class to/from XML
- namespace EventKeyCollectionXml {
-
- /// Adds the EventKeyCollectionDoc into the XML.
- void RESPONSEXML_LINKAGE add(
- const SmartPtrCEventKeyCollectionDoc eventKeyCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the EventKeyCollectionDoc from the XML.
- SmartPtrCEventKeyCollectionDoc RESPONSEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef EventKeyXml_h_
-#define EventKeyXml_h_
-
-namespace Caf {
-
- /// Streams the EventKey class to/from XML
- namespace EventKeyXml {
-
- /// Adds the EventKeyDoc into the XML.
- void RESPONSEXML_LINKAGE add(
- const SmartPtrCEventKeyDoc eventKeyDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the EventKeyDoc from the XML.
- SmartPtrCEventKeyDoc RESPONSEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef EventManifestXml_h_
-#define EventManifestXml_h_
-
-namespace Caf {
-
- /// Streams the EventManifest class to/from XML
- namespace EventManifestXml {
-
- /// Adds the EventManifestDoc into the XML.
- void RESPONSEXML_LINKAGE add(
- const SmartPtrCEventManifestDoc eventManifestDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the EventManifestDoc from the XML.
- SmartPtrCEventManifestDoc RESPONSEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ManifestCollectionXml_h_
-#define ManifestCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the ManifestCollection class to/from XML
- namespace ManifestCollectionXml {
-
- /// Adds the ManifestCollectionDoc into the XML.
- void RESPONSEXML_LINKAGE add(
- const SmartPtrCManifestCollectionDoc manifestCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ManifestCollectionDoc from the XML.
- SmartPtrCManifestCollectionDoc RESPONSEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ManifestXml_h_
-#define ManifestXml_h_
-
-namespace Caf {
-
- /// Streams the Manifest class to/from XML
- namespace ManifestXml {
-
- /// Adds the ManifestDoc into the XML.
- void RESPONSEXML_LINKAGE add(
- const SmartPtrCManifestDoc manifestDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ManifestDoc from the XML.
- SmartPtrCManifestDoc RESPONSEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderEventResponseXml_h_
-#define ProviderEventResponseXml_h_
-
-namespace Caf {
-
- /// Streams the ProviderEventResponse class to/from XML
- namespace ProviderEventResponseXml {
-
- /// Adds the ProviderEventResponseDoc into the XML.
- void RESPONSEXML_LINKAGE add(
- const SmartPtrCProviderEventResponseDoc providerEventResponseDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProviderEventResponseDoc from the XML.
- SmartPtrCProviderEventResponseDoc RESPONSEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ProviderResponseXml_h_
-#define ProviderResponseXml_h_
-
-namespace Caf {
-
- /// Streams the ProviderResponse class to/from XML
- namespace ProviderResponseXml {
-
- /// Adds the ProviderResponseDoc into the XML.
- void RESPONSEXML_LINKAGE add(
- const SmartPtrCProviderResponseDoc providerResponseDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ProviderResponseDoc from the XML.
- SmartPtrCProviderResponseDoc RESPONSEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ResponseHeaderXml_h_
-#define ResponseHeaderXml_h_
-
-namespace Caf {
-
- /// Streams the ResponseHeader class to/from XML
- namespace ResponseHeaderXml {
-
- /// Adds the ResponseHeaderDoc into the XML.
- void RESPONSEXML_LINKAGE add(
- const SmartPtrCResponseHeaderDoc responseHeaderDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ResponseHeaderDoc from the XML.
- SmartPtrCResponseHeaderDoc RESPONSEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ResponseXml_h_
-#define ResponseXml_h_
-
-namespace Caf {
-
- /// Streams the Response class to/from XML
- namespace ResponseXml {
-
- /// Adds the ResponseDoc into the XML.
- void RESPONSEXML_LINKAGE add(
- const SmartPtrCResponseDoc responseDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ResponseDoc from the XML.
- SmartPtrCResponseDoc RESPONSEXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ResponseXml_Inc_h_
-#define ResponseXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-#include "ManifestXml.h"
-#include "EventManifestXml.h"
-#include "ManifestCollectionXml.h"
-#include "EventKeyXml.h"
-#include "EventKeyCollectionXml.h"
-#include "ProviderResponseXml.h"
-#include "ProviderEventResponseXml.h"
-#include "ResponseXml.h"
-#include "ResponseHeaderXml.h"
-#include "ErrorResponseXml.h"
-#include "ResponseXmlRoots.h"
-
-#endif /* ResponseXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ResponseXml_Link_h_
-#define ResponseXml_Link_h_
-
-#ifndef RESPONSEXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define RESPONSEXML_LINKAGE __declspec(dllexport)
- #else
- #define RESPONSEXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define RESPONSEXML_LINKAGE
- #endif
-#endif
-
-#include "ResponseXmlInc.h"
-
-#endif /* ResponseXml_Link_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ResponseXmlRoots_h_
-#define ResponseXmlRoots_h_
-
-namespace Caf {
-
- namespace XmlRoots {
-
- /// Saves the ErrorResponseDoc to a string.
- std::string RESPONSEXML_LINKAGE saveErrorResponseToString(
- const SmartPtrCErrorResponseDoc errorResponseDoc);
-
- /// Parses the ErrorResponseDoc from the string.
- SmartPtrCErrorResponseDoc RESPONSEXML_LINKAGE parseErrorResponseFromString(
- const std::string xml);
-
- /// Saves the ErrorResponseDoc to a file.
- void RESPONSEXML_LINKAGE saveErrorResponseToFile(
- const SmartPtrCErrorResponseDoc errorResponseDoc,
- const std::string filePath);
-
- /// Parses the ErrorResponseDoc from the file.
- SmartPtrCErrorResponseDoc RESPONSEXML_LINKAGE parseErrorResponseFromFile(
- const std::string filePath);
-
- /// Saves the ProviderResponseDoc to a string.
- std::string RESPONSEXML_LINKAGE saveProviderResponseToString(
- const SmartPtrCProviderResponseDoc providerResponseDoc);
-
- /// Parses the ErrorResponseDoc from the string.
- SmartPtrCProviderResponseDoc RESPONSEXML_LINKAGE parseProviderResponseFromString(
- const std::string xml);
-
- /// Saves the ProviderResponseDoc to a file.
- void RESPONSEXML_LINKAGE saveProviderResponseToFile(
- const SmartPtrCProviderResponseDoc providerResponseDoc,
- const std::string filePath);
-
- /// Parses the ErrorResponseDoc from the file.
- SmartPtrCProviderResponseDoc RESPONSEXML_LINKAGE parseProviderResponseFromFile(
- const std::string filePath);
-
- /// Saves the ResponseDoc to a string.
- std::string RESPONSEXML_LINKAGE saveResponseToString(
- const SmartPtrCResponseDoc responseDoc);
-
- /// Parses the ErrorResponseDoc from the string.
- SmartPtrCResponseDoc RESPONSEXML_LINKAGE parseResponseFromString(
- const std::string xml);
-
- /// Saves the ResponseDoc to a file.
- void RESPONSEXML_LINKAGE saveResponseToFile(
- const SmartPtrCResponseDoc responseDoc,
- const std::string filePath);
-
- /// Parses the ErrorResponseDoc from the file.
- SmartPtrCResponseDoc RESPONSEXML_LINKAGE parseResponseFromFile(
- const std::string filePath);
-
- /// Saves the ProviderEventResponseDoc to a string.
- std::string RESPONSEXML_LINKAGE saveProviderEventResponseToString(
- const SmartPtrCProviderEventResponseDoc providerEventResponseDoc);
-
- /// Parses the ErrorResponseDoc from the string.
- SmartPtrCProviderEventResponseDoc RESPONSEXML_LINKAGE parseProviderEventResponseFromString(
- const std::string xml);
-
- /// Saves the ProviderEventResponseDoc to a file.
- void RESPONSEXML_LINKAGE saveProviderEventResponseToFile(
- const SmartPtrCProviderEventResponseDoc providerEventResponseDoc,
- const std::string filePath);
-
- /// Parses the ErrorResponseDoc from the file.
- SmartPtrCProviderEventResponseDoc RESPONSEXML_LINKAGE parseProviderEventResponseFromFile(
- const std::string filePath);
- }
-}
-
-#endif /* ResponseXmlRoots_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ActionClassInstanceCollectionXml_h_
-#define ActionClassInstanceCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the ActionClassInstanceCollection class to/from XML
- namespace ActionClassInstanceCollectionXml {
-
- /// Adds the ActionClassInstanceCollectionDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCActionClassInstanceCollectionDoc actionClassInstanceCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ActionClassInstanceCollectionDoc from the XML.
- SmartPtrCActionClassInstanceCollectionDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ActionClassInstanceXml_h_
-#define ActionClassInstanceXml_h_
-
-namespace Caf {
-
- /// Streams the ActionClassInstance class to/from XML
- namespace ActionClassInstanceXml {
-
- /// Adds the ActionClassInstanceDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCActionClassInstanceDoc actionClassInstanceDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ActionClassInstanceDoc from the XML.
- SmartPtrCActionClassInstanceDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ActionClassXml_h_
-#define ActionClassXml_h_
-
-namespace Caf {
-
- /// Streams the ActionClass class to/from XML
- namespace ActionClassXml {
-
- /// Adds the ActionClassDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCActionClassDoc actionClassDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ActionClassDoc from the XML.
- SmartPtrCActionClassDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ClassCardinalityXml_h_
-#define ClassCardinalityXml_h_
-
-namespace Caf {
-
- /// Streams the ClassCardinality class to/from XML
- namespace ClassCardinalityXml {
-
- /// Adds the ClassCardinalityDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCClassCardinalityDoc classCardinalityDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ClassCardinalityDoc from the XML.
- SmartPtrCClassCardinalityDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ClassFieldXml_h_
-#define ClassFieldXml_h_
-
-namespace Caf {
-
- /// Streams the ClassField class to/from XML
- namespace ClassFieldXml {
-
- /// Adds the ClassFieldDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCClassFieldDoc classFieldDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ClassFieldDoc from the XML.
- SmartPtrCClassFieldDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ClassIdentifierXml_h_
-#define ClassIdentifierXml_h_
-
-namespace Caf {
-
- /// Streams the ClassIdentifier class to/from XML
- namespace ClassIdentifierXml {
-
- /// Adds the ClassIdentifierDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCClassIdentifierDoc classIdentifierDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ClassIdentifierDoc from the XML.
- SmartPtrCClassIdentifierDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ClassInstancePropertyXml_h_
-#define ClassInstancePropertyXml_h_
-
-namespace Caf {
-
- /// Streams the ClassInstanceProperty class to/from XML
- namespace ClassInstancePropertyXml {
-
- /// Adds the ClassInstancePropertyDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCClassInstancePropertyDoc classInstancePropertyDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ClassInstancePropertyDoc from the XML.
- SmartPtrCClassInstancePropertyDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef ClassPropertyXml_h_
-#define ClassPropertyXml_h_
-
-namespace Caf {
-
- /// Streams the ClassProperty class to/from XML
- namespace ClassPropertyXml {
-
- /// Adds the ClassPropertyDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCClassPropertyDoc classPropertyDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the ClassPropertyDoc from the XML.
- SmartPtrCClassPropertyDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef CmdlMetadataXml_h_
-#define CmdlMetadataXml_h_
-
-namespace Caf {
-
- /// Streams the CmdlMetadata class to/from XML
- namespace CmdlMetadataXml {
-
- /// Adds the CmdlMetadataDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCCmdlMetadataDoc cmdlMetadataDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the CmdlMetadataDoc from the XML.
- SmartPtrCCmdlMetadataDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef CmdlUnionXml_h_
-#define CmdlUnionXml_h_
-
-namespace Caf {
-
- /// Streams the CmdlUnion class to/from XML
- namespace CmdlUnionXml {
-
- /// Adds the CmdlUnionDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCCmdlUnionDoc cmdlUnionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the CmdlUnionDoc from the XML.
- SmartPtrCCmdlUnionDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef CollectMethodXml_h_
-#define CollectMethodXml_h_
-
-namespace Caf {
-
- /// Streams the CollectMethod class to/from XML
- namespace CollectMethodXml {
-
- /// Adds the CollectMethodDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCCollectMethodDoc collectMethodDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the CollectMethodDoc from the XML.
- SmartPtrCCollectMethodDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DataClassInstanceCollectionXml_h_
-#define DataClassInstanceCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the DataClassInstanceCollection class to/from XML
- namespace DataClassInstanceCollectionXml {
-
- /// Adds the DataClassInstanceCollectionDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCDataClassInstanceCollectionDoc dataClassInstanceCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DataClassInstanceCollectionDoc from the XML.
- SmartPtrCDataClassInstanceCollectionDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DataClassInstanceXml_h_
-#define DataClassInstanceXml_h_
-
-namespace Caf {
-
- /// Streams the DataClassInstance class to/from XML
- namespace DataClassInstanceXml {
-
- /// Adds the DataClassInstanceDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCDataClassInstanceDoc dataClassInstanceDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DataClassInstanceDoc from the XML.
- SmartPtrCDataClassInstanceDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DataClassPropertyXml_h_
-#define DataClassPropertyXml_h_
-
-namespace Caf {
-
- /// Streams the DataClassProperty class to/from XML
- namespace DataClassPropertyXml {
-
- /// Adds the DataClassPropertyDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCDataClassPropertyDoc dataClassPropertyDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DataClassPropertyDoc from the XML.
- SmartPtrCDataClassPropertyDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DataClassSubInstanceXml_h_
-#define DataClassSubInstanceXml_h_
-
-namespace Caf {
-
- /// Streams the DataClassSubInstance class to/from XML
- namespace DataClassSubInstanceXml {
-
- /// Adds the DataClassSubInstanceDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCDataClassSubInstanceDoc dataClassSubInstanceDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DataClassSubInstanceDoc from the XML.
- SmartPtrCDataClassSubInstanceDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef DataClassXml_h_
-#define DataClassXml_h_
-
-namespace Caf {
-
- /// Streams the DataClass class to/from XML
- namespace DataClassXml {
-
- /// Adds the DataClassDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCDataClassDoc dataClassDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the DataClassDoc from the XML.
- SmartPtrCDataClassDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef InstanceOperationCollectionXml_h_
-#define InstanceOperationCollectionXml_h_
-
-namespace Caf {
-
- /// Streams the InstanceOperationCollection class to/from XML
- namespace InstanceOperationCollectionXml {
-
- /// Adds the InstanceOperationCollectionDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCInstanceOperationCollectionDoc instanceOperationCollectionDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the InstanceOperationCollectionDoc from the XML.
- SmartPtrCInstanceOperationCollectionDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef InstanceOperationXml_h_
-#define InstanceOperationXml_h_
-
-namespace Caf {
-
- /// Streams the InstanceOperation class to/from XML
- namespace InstanceOperationXml {
-
- /// Adds the InstanceOperationDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCInstanceOperationDoc instanceOperationDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the InstanceOperationDoc from the XML.
- SmartPtrCInstanceOperationDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef InstanceParameterXml_h_
-#define InstanceParameterXml_h_
-
-namespace Caf {
-
- /// Streams the InstanceParameter class to/from XML
- namespace InstanceParameterXml {
-
- /// Adds the InstanceParameterDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCInstanceParameterDoc instanceParameterDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the InstanceParameterDoc from the XML.
- SmartPtrCInstanceParameterDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef JoinTypeXml_h_
-#define JoinTypeXml_h_
-
-namespace Caf {
-
- /// Streams the JoinType class to/from XML
- namespace JoinTypeXml {
-
- /// Adds the JoinTypeDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCJoinTypeDoc joinTypeDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the JoinTypeDoc from the XML.
- SmartPtrCJoinTypeDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef LogicalRelationshipXml_h_
-#define LogicalRelationshipXml_h_
-
-namespace Caf {
-
- /// Streams the LogicalRelationship class to/from XML
- namespace LogicalRelationshipXml {
-
- /// Adds the LogicalRelationshipDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCLogicalRelationshipDoc logicalRelationshipDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the LogicalRelationshipDoc from the XML.
- SmartPtrCLogicalRelationshipDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MethodParameterXml_h_
-#define MethodParameterXml_h_
-
-namespace Caf {
-
- /// Streams the MethodParameter class to/from XML
- namespace MethodParameterXml {
-
- /// Adds the MethodParameterDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCMethodParameterDoc methodParameterDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MethodParameterDoc from the XML.
- SmartPtrCMethodParameterDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef MethodXml_h_
-#define MethodXml_h_
-
-namespace Caf {
-
- /// Streams the Method class to/from XML
- namespace MethodXml {
-
- /// Adds the MethodDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCMethodDoc methodDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the MethodDoc from the XML.
- SmartPtrCMethodDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef PhysicalRelationshipXml_h_
-#define PhysicalRelationshipXml_h_
-
-namespace Caf {
-
- /// Streams the PhysicalRelationship class to/from XML
- namespace PhysicalRelationshipXml {
-
- /// Adds the PhysicalRelationshipDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCPhysicalRelationshipDoc physicalRelationshipDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the PhysicalRelationshipDoc from the XML.
- SmartPtrCPhysicalRelationshipDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef RelationshipXml_h_
-#define RelationshipXml_h_
-
-namespace Caf {
-
- /// Streams the Relationship class to/from XML
- namespace RelationshipXml {
-
- /// Adds the RelationshipDoc into the XML.
- void SCHEMATYPESXML_LINKAGE add(
- const SmartPtrCRelationshipDoc relationshipDoc,
- const SmartPtrCXmlElement thisXml);
-
- /// Parses the RelationshipDoc from the XML.
- SmartPtrCRelationshipDoc SCHEMATYPESXML_LINKAGE parse(
- const SmartPtrCXmlElement thisXml);
- }
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef SchemaTypesXml_Inc_h_
-#define SchemaTypesXml_Inc_h_
-
-#include "../CafCoreTypesXml/CafCoreTypesXmlLink.h"
-#include "ClassPropertyXml.h"
-#include "ClassInstancePropertyXml.h"
-#include "MethodParameterXml.h"
-#include "InstanceParameterXml.h"
-#include "ClassIdentifierXml.h"
-#include "MethodXml.h"
-#include "CollectMethodXml.h"
-#include "ClassCardinalityXml.h"
-#include "ClassFieldXml.h"
-#include "RelationshipXml.h"
-#include "PhysicalRelationshipXml.h"
-#include "JoinTypeXml.h"
-#include "LogicalRelationshipXml.h"
-#include "DataClassXml.h"
-#include "CmdlMetadataXml.h"
-#include "CmdlUnionXml.h"
-#include "DataClassPropertyXml.h"
-#include "DataClassSubInstanceXml.h"
-#include "DataClassInstanceXml.h"
-#include "DataClassInstanceCollectionXml.h"
-#include "InstanceOperationXml.h"
-#include "InstanceOperationCollectionXml.h"
-#include "ActionClassInstanceXml.h"
-#include "ActionClassInstanceCollectionXml.h"
-#include "ActionClassXml.h"
-
-#endif /* SchemaTypesXml_Inc_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: April 6, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- * This code was generated by the script "build/dev/codeGen/genCppXml". Please
- * speak to Brian W. before modifying it by hand.
- *
- */
-
-#ifndef SchemaTypesXml_Link_h_
-#define SchemaTypesXml_Link_h_
-
-#ifndef SCHEMATYPESXML_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define SCHEMATYPESXML_LINKAGE __declspec(dllexport)
- #else
- #define SCHEMATYPESXML_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define SCHEMATYPESXML_LINKAGE
- #endif
-#endif
-
-#include "SchemaTypesXmlInc.h"
-
-#endif /* SchemaTypesXml_Link_h_ */
+++ /dev/null
-/*
- * Author: mdonahue
- * Created: Jan 13, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCAFEXCEPTION_H_
-#define CCAFEXCEPTION_H_
-
-namespace Caf {
-
-class EXCEPTION_LINKAGE CCafException : public ICafObject {
-public:
- CCafException();
-
- CCafException(const std::string& exceptionClassName);
-
- virtual ~CCafException();
-
- virtual void throwSelf();
-
- virtual void throwAddRefedSelf();
-
- void AddRef();
-
- void Release();
-
- void QueryInterface(const IID&, void**);
-
- void populate(
- const std::string& message,
- const HRESULT errorCode,
- const std::string& className,
- const std::string& funcName);
-
- void populateVA(const HRESULT errorCode,
- const std::string& className,
- const std::string& funcName,
- const char* format,
- ...);
-
- bool isPopulated() const;
-
- std::string getExceptionClassName() const;
-
- virtual std::string getMsg() const;
-
- std::string getClassName() const;
-
- std::string getFuncName() const;
-
- HRESULT getError() const;
-
- std::deque<std::string>* getBacktrace() const;
-
- virtual std::string getFullMsg() const;
-
-private:
- gint _refCnt;
- bool _isPopulated;
-
-protected:
- std::string _exceptionClassName;
- HRESULT _errorCode;
- std::string _message;
- std::string _className;
- std::string _funcName;
- std::deque<std::string>* _backtrace;
-
- CCafException(const CCafException&);
- CCafException& operator=(const CCafException&);
-};
-CAF_DECLARE_SMART_POINTER(CCafException);
-
-}
-
-#endif /* CCAFEXCEPTION_H_ */
+++ /dev/null
-/**********************************************************************
- *
- * StackWalker.cpp
- * http://stackwalker.codeplex.com/
- *
- *
- * History:
- * 2005-07-27 v1 - First public release on http://www.codeproject.com/
- * http://www.codeproject.com/threads/StackWalker.asp
- * 2005-07-28 v2 - Changed the params of the constructor and ShowCallstack
- * (to simplify the usage)
- * 2005-08-01 v3 - Changed to use 'CONTEXT_FULL' instead of CONTEXT_ALL
- * (should also be enough)
- * - Changed to compile correctly with the PSDK of VC7.0
- * (GetFileVersionInfoSizeA and GetFileVersionInfoA is wrongly defined:
- * it uses LPSTR instead of LPCSTR as first paremeter)
- * - Added declarations to support VC5/6 without using 'dbghelp.h'
- * - Added a 'pUserData' member to the ShowCallstack function and the
- * PReadProcessMemoryRoutine declaration (to pass some user-defined data,
- * which can be used in the readMemoryFunction-callback)
- * 2005-08-02 v4 - OnSymInit now also outputs the OS-Version by default
- * - Added example for doing an exception-callstack-walking in main.cpp
- * (thanks to owillebo: http://www.codeproject.com/script/profile/whos_who.asp?id=536268)
- * 2005-08-05 v5 - Removed most Lint (http://www.gimpel.com/) errors... thanks to Okko Willeboordse!
- * 2008-08-04 v6 - Fixed Bug: Missing LEAK-end-tag
- * http://www.codeproject.com/KB/applications/leakfinder.aspx?msg=2502890#xx2502890xx
- * Fixed Bug: Compiled with "WIN32_LEAN_AND_MEAN"
- * http://www.codeproject.com/KB/applications/leakfinder.aspx?msg=1824718#xx1824718xx
- * Fixed Bug: Compiling with "/Wall"
- * http://www.codeproject.com/KB/threads/StackWalker.aspx?msg=2638243#xx2638243xx
- * Fixed Bug: Now checking SymUseSymSrv
- * http://www.codeproject.com/KB/threads/StackWalker.aspx?msg=1388979#xx1388979xx
- * Fixed Bug: Support for recursive function calls
- * http://www.codeproject.com/KB/threads/StackWalker.aspx?msg=1434538#xx1434538xx
- * Fixed Bug: Missing FreeLibrary call in "GetModuleListTH32"
- * http://www.codeproject.com/KB/threads/StackWalker.aspx?msg=1326923#xx1326923xx
- * Fixed Bug: SymDia is number 7, not 9!
- * 2008-09-11 v7 For some (undocumented) reason, dbhelp.h is needing a packing of 8!
- * Thanks to Teajay which reported the bug...
- * http://www.codeproject.com/KB/applications/leakfinder.aspx?msg=2718933#xx2718933xx
- * 2008-11-27 v8 Debugging Tools for Windows are now stored in a different directory
- * Thanks to Luiz Salamon which reported this "bug"...
- * http://www.codeproject.com/KB/threads/StackWalker.aspx?msg=2822736#xx2822736xx
- * 2009-04-10 v9 License slihtly corrected (<ORGANIZATION> replaced)
- * 2009-11-01 v10 Moved to http://stackwalker.codeplex.com/
- * 2009-11-02 v11 Now try to use IMAGEHLP_MODULE64_V3 if available
- * 2010-04-15 v12 Added support for VS2010 RTM
- * 2010-05-25 v13 Now using secure MyStrcCpy. Thanks to luke.simon:
- * http://www.codeproject.com/KB/applications/leakfinder.aspx?msg=3477467#xx3477467xx
- * 2013-01-07 v14 Runtime Check Error VS2010 Debug Builds fixed:
- * http://stackwalker.codeplex.com/workitem/10511
- *
- *
- * LICENSE (http://www.opensource.org/licenses/bsd-license.php)
- *
- * Copyright (c) 2005-2013, Jochen Kalmbach
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of Jochen Kalmbach nor the names of its contributors may be
- * used to endorse or promote products derived from this software without
- * specific prior written permission.
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- **********************************************************************/
-#include <windows.h>
-#include <tchar.h>
-#include <stdio.h>
-#include <stdlib.h>
-#pragma comment(lib, "version.lib") // for "VerQueryValue"
-#pragma warning(disable:4826)
-
-#include "StackWalker.h"
-
-
-// If VC7 and later, then use the shipped 'dbghelp.h'-file
-#pragma pack(push,8)
-#if _MSC_VER >= 1300
-#include <dbghelp.h>
-#else
-// inline the important dbghelp.h-declarations...
-typedef enum {
- SymNone = 0,
- SymCoff,
- SymCv,
- SymPdb,
- SymExport,
- SymDeferred,
- SymSym,
- SymDia,
- SymVirtual,
- NumSymTypes
-} SYM_TYPE;
-typedef struct _IMAGEHLP_LINE64 {
- DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_LINE64)
- PVOID Key; // internal
- DWORD LineNumber; // line number in file
- PCHAR FileName; // full filename
- DWORD64 Address; // first instruction of line
-} IMAGEHLP_LINE64, *PIMAGEHLP_LINE64;
-typedef struct _IMAGEHLP_MODULE64 {
- DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
- DWORD64 BaseOfImage; // base load address of module
- DWORD ImageSize; // virtual size of the loaded module
- DWORD TimeDateStamp; // date/time stamp from pe header
- DWORD CheckSum; // checksum from the pe header
- DWORD NumSyms; // number of symbols in the symbol table
- SYM_TYPE SymType; // type of symbols loaded
- CHAR ModuleName[32]; // module name
- CHAR ImageName[256]; // image name
- CHAR LoadedImageName[256]; // symbol file name
-} IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64;
-typedef struct _IMAGEHLP_SYMBOL64 {
- DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_SYMBOL64)
- DWORD64 Address; // virtual address including dll base address
- DWORD Size; // estimated size of symbol, can be zero
- DWORD Flags; // info about the symbols, see the SYMF defines
- DWORD MaxNameLength; // maximum size of symbol name in 'Name'
- CHAR Name[1]; // symbol name (null terminated string)
-} IMAGEHLP_SYMBOL64, *PIMAGEHLP_SYMBOL64;
-typedef enum {
- AddrMode1616,
- AddrMode1632,
- AddrModeReal,
- AddrModeFlat
-} ADDRESS_MODE;
-typedef struct _tagADDRESS64 {
- DWORD64 Offset;
- WORD Segment;
- ADDRESS_MODE Mode;
-} ADDRESS64, *LPADDRESS64;
-typedef struct _KDHELP64 {
- DWORD64 Thread;
- DWORD ThCallbackStack;
- DWORD ThCallbackBStore;
- DWORD NextCallback;
- DWORD FramePointer;
- DWORD64 KiCallUserMode;
- DWORD64 KeUserCallbackDispatcher;
- DWORD64 SystemRangeStart;
- DWORD64 Reserved[8];
-} KDHELP64, *PKDHELP64;
-typedef struct _tagSTACKFRAME64 {
- ADDRESS64 AddrPC; // program counter
- ADDRESS64 AddrReturn; // return address
- ADDRESS64 AddrFrame; // frame pointer
- ADDRESS64 AddrStack; // stack pointer
- ADDRESS64 AddrBStore; // backing store pointer
- PVOID FuncTableEntry; // pointer to pdata/fpo or NULL
- DWORD64 Params[4]; // possible arguments to the function
- BOOL Far; // WOW far call
- BOOL Virtual; // is this a virtual frame?
- DWORD64 Reserved[3];
- KDHELP64 KdHelp;
-} STACKFRAME64, *LPSTACKFRAME64;
-typedef
-BOOL
-(__stdcall *PREAD_PROCESS_MEMORY_ROUTINE64)(
- HANDLE hProcess,
- DWORD64 qwBaseAddress,
- PVOID lpBuffer,
- DWORD nSize,
- LPDWORD lpNumberOfBytesRead
- );
-typedef
-PVOID
-(__stdcall *PFUNCTION_TABLE_ACCESS_ROUTINE64)(
- HANDLE hProcess,
- DWORD64 AddrBase
- );
-typedef
-DWORD64
-(__stdcall *PGET_MODULE_BASE_ROUTINE64)(
- HANDLE hProcess,
- DWORD64 Address
- );
-typedef
-DWORD64
-(__stdcall *PTRANSLATE_ADDRESS_ROUTINE64)(
- HANDLE hProcess,
- HANDLE hThread,
- LPADDRESS64 lpaddr
- );
-#define SYMOPT_CASE_INSENSITIVE 0x00000001
-#define SYMOPT_UNDNAME 0x00000002
-#define SYMOPT_DEFERRED_LOADS 0x00000004
-#define SYMOPT_NO_CPP 0x00000008
-#define SYMOPT_LOAD_LINES 0x00000010
-#define SYMOPT_OMAP_FIND_NEAREST 0x00000020
-#define SYMOPT_LOAD_ANYTHING 0x00000040
-#define SYMOPT_IGNORE_CVREC 0x00000080
-#define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100
-#define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200
-#define SYMOPT_EXACT_SYMBOLS 0x00000400
-#define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800
-#define SYMOPT_IGNORE_NT_SYMPATH 0x00001000
-#define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000
-#define SYMOPT_PUBLICS_ONLY 0x00004000
-#define SYMOPT_NO_PUBLICS 0x00008000
-#define SYMOPT_AUTO_PUBLICS 0x00010000
-#define SYMOPT_NO_IMAGE_SEARCH 0x00020000
-#define SYMOPT_SECURE 0x00040000
-#define SYMOPT_DEBUG 0x80000000
-#define UNDNAME_COMPLETE (0x0000) // Enable full undecoration
-#define UNDNAME_NAME_ONLY (0x1000) // Crack only the name for primary declaration;
-#endif // _MSC_VER < 1300
-#pragma pack(pop)
-
-// Some missing defines (for VC5/6):
-#ifndef INVALID_FILE_ATTRIBUTES
-#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
-#endif
-
-
-// secure-CRT_functions are only available starting with VC8
-#if _MSC_VER < 1400
-#define strcpy_s(dst, len, src) strcpy(dst, src)
-#define strncpy_s(dst, len, src, maxLen) strncpy(dst, len, src)
-#define strcat_s(dst, len, src) strcat(dst, src)
-#define _snprintf_s _snprintf
-#define _tcscat_s _tcscat
-#endif
-
-static void MyStrCpy(char* szDest, size_t nMaxDestSize, const char* szSrc)
-{
- if (nMaxDestSize <= 0) return;
- strncpy_s(szDest, nMaxDestSize, szSrc, _TRUNCATE);
- szDest[nMaxDestSize-1] = 0; // INFO: _TRUNCATE will ensure that it is nul-terminated; but with older compilers (<1400) it uses "strncpy" and this does not!)
-} // MyStrCpy
-
-// Normally it should be enough to use 'CONTEXT_FULL' (better would be 'CONTEXT_ALL')
-#define USED_CONTEXT_FLAGS CONTEXT_FULL
-
-
-class StackWalkerInternal
-{
-public:
- StackWalkerInternal(StackWalker *parent, HANDLE hProcess)
- {
- m_parent = parent;
- m_hDbhHelp = NULL;
- pSC = NULL;
- m_hProcess = hProcess;
- m_szSymPath = NULL;
- pSFTA = NULL;
- pSGLFA = NULL;
- pSGMB = NULL;
- pSGMI = NULL;
- pSGO = NULL;
- pSGSFA = NULL;
- pSI = NULL;
- pSLM = NULL;
- pSSO = NULL;
- pSW = NULL;
- pUDSN = NULL;
- pSGSP = NULL;
- }
- ~StackWalkerInternal()
- {
- if (pSC != NULL)
- pSC(m_hProcess); // SymCleanup
- if (m_hDbhHelp != NULL)
- FreeLibrary(m_hDbhHelp);
- m_hDbhHelp = NULL;
- m_parent = NULL;
- if(m_szSymPath != NULL)
- free(m_szSymPath);
- m_szSymPath = NULL;
- }
- BOOL Init(LPCSTR szSymPath)
- {
- if (m_parent == NULL)
- return FALSE;
- // Dynamically load the Entry-Points for dbghelp.dll:
- // First try to load the newsest one from
- TCHAR localFile[4096];
- // But before wqe do this, we first check if the ".local" file exists
- if (GetModuleFileName(NULL, localFile, 4096) > 0)
- {
- _tcscat_s(localFile, _T(".local"));
- if (GetFileAttributes(localFile) == INVALID_FILE_ATTRIBUTES)
- {
- // ".local" file does not exist, so we can try to load the dbghelp.dll from the "Debugging Tools for Windows"
- // Ok, first try the new path according to the archtitecture:
- TCHAR dbghelpFile[4096];
-#ifdef _M_IX86
- if ( (m_hDbhHelp == NULL) && (GetEnvironmentVariable(_T("ProgramFiles"), dbghelpFile, 4096) > 0) )
- {
- _tcscat_s(dbghelpFile, _T("\\Debugging Tools for Windows (x86)\\dbghelp.dll"));
- // now check if the file exists:
- if (GetFileAttributes(dbghelpFile) != INVALID_FILE_ATTRIBUTES)
- {
- m_hDbhHelp = LoadLibrary(dbghelpFile);
- }
- }
-#elif _M_X64
- if ( (m_hDbhHelp == NULL) && (GetEnvironmentVariable(_T("ProgramFiles"), dbghelpFile, 4096) > 0) )
- {
- _tcscat_s(dbghelpFile, _T("\\Debugging Tools for Windows (x64)\\dbghelp.dll"));
- // now check if the file exists:
- if (GetFileAttributes(dbghelpFile) != INVALID_FILE_ATTRIBUTES)
- {
- m_hDbhHelp = LoadLibrary(dbghelpFile);
- }
- }
-#elif _M_IA64
- if ( (m_hDbhHelp == NULL) && (GetEnvironmentVariable(_T("ProgramFiles"), dbghelpFile, 4096) > 0) )
- {
- _tcscat_s(dbghelpFile, _T("\\Debugging Tools for Windows (ia64)\\dbghelp.dll"));
- // now check if the file exists:
- if (GetFileAttributes(dbghelpFile) != INVALID_FILE_ATTRIBUTES)
- {
- m_hDbhHelp = LoadLibrary(dbghelpFile);
- }
- }
-#endif
- // If still not found, try the old directories...
- TCHAR dbghelpFile2[4096];
- if ( (m_hDbhHelp == NULL) && (GetEnvironmentVariable(_T("ProgramFiles"), dbghelpFile2, 4096) > 0) )
- {
- _tcscat_s(dbghelpFile2, _T("\\Debugging Tools for Windows\\dbghelp.dll"));
- // now check if the file exists:
- if (GetFileAttributes(dbghelpFile2) != INVALID_FILE_ATTRIBUTES)
- {
- m_hDbhHelp = LoadLibrary(dbghelpFile2);
- }
- }
-#if defined _M_X64 || defined _M_IA64
- TCHAR dbghelpFile3[4096];
- // Still not found? Then try to load the (old) 64-Bit version:
- if ( (m_hDbhHelp == NULL) && (GetEnvironmentVariable(_T("ProgramFiles"), dbghelpFile3, 4096) > 0) )
- {
- _tcscat_s(dbghelpFile3, _T("\\Debugging Tools for Windows 64-Bit\\dbghelp.dll"));
- if (GetFileAttributes(dbghelpFile3) != INVALID_FILE_ATTRIBUTES)
- {
- m_hDbhHelp = LoadLibrary(dbghelpFile3);
- }
- }
-#endif
- }
- }
- if (m_hDbhHelp == NULL) // if not already loaded, try to load a default-one
- m_hDbhHelp = LoadLibrary( _T("dbghelp.dll") );
- if (m_hDbhHelp == NULL)
- return FALSE;
- pSI = (tSI) GetProcAddress(m_hDbhHelp, "SymInitialize" );
- pSC = (tSC) GetProcAddress(m_hDbhHelp, "SymCleanup" );
-
- pSW = (tSW) GetProcAddress(m_hDbhHelp, "StackWalk64" );
- pSGO = (tSGO) GetProcAddress(m_hDbhHelp, "SymGetOptions" );
- pSSO = (tSSO) GetProcAddress(m_hDbhHelp, "SymSetOptions" );
-
- pSFTA = (tSFTA) GetProcAddress(m_hDbhHelp, "SymFunctionTableAccess64" );
- pSGLFA = (tSGLFA) GetProcAddress(m_hDbhHelp, "SymGetLineFromAddr64" );
- pSGMB = (tSGMB) GetProcAddress(m_hDbhHelp, "SymGetModuleBase64" );
- pSGMI = (tSGMI) GetProcAddress(m_hDbhHelp, "SymGetModuleInfo64" );
- pSGSFA = (tSGSFA) GetProcAddress(m_hDbhHelp, "SymGetSymFromAddr64" );
- pUDSN = (tUDSN) GetProcAddress(m_hDbhHelp, "UnDecorateSymbolName" );
- pSLM = (tSLM) GetProcAddress(m_hDbhHelp, "SymLoadModule64" );
- pSGSP =(tSGSP) GetProcAddress(m_hDbhHelp, "SymGetSearchPath" );
-
- if ( pSC == NULL || pSFTA == NULL || pSGMB == NULL || pSGMI == NULL ||
- pSGO == NULL || pSGSFA == NULL || pSI == NULL || pSSO == NULL ||
- pSW == NULL || pUDSN == NULL || pSLM == NULL )
- {
- FreeLibrary(m_hDbhHelp);
- m_hDbhHelp = NULL;
- pSC = NULL;
- return FALSE;
- }
-
- // SymInitialize
- if (szSymPath != NULL)
- m_szSymPath = _strdup(szSymPath);
- if (this->pSI(m_hProcess, m_szSymPath, FALSE) == FALSE)
- this->m_parent->OnDbgHelpErr("SymInitialize", GetLastError(), 0);
-
- DWORD symOptions = this->pSGO(); // SymGetOptions
- symOptions |= SYMOPT_LOAD_LINES;
- symOptions |= SYMOPT_FAIL_CRITICAL_ERRORS;
- //symOptions |= SYMOPT_NO_PROMPTS;
- // SymSetOptions
- symOptions = this->pSSO(symOptions);
-
- char buf[StackWalker::STACKWALK_MAX_NAMELEN] = {0};
- if (this->pSGSP != NULL)
- {
- if (this->pSGSP(m_hProcess, buf, StackWalker::STACKWALK_MAX_NAMELEN) == FALSE)
- this->m_parent->OnDbgHelpErr("SymGetSearchPath", GetLastError(), 0);
- }
- char szUserName[1024] = {0};
- DWORD dwSize = 1024;
- GetUserNameA(szUserName, &dwSize);
- this->m_parent->OnSymInit(buf, symOptions, szUserName);
-
- return TRUE;
- }
-
- StackWalker *m_parent;
-
- HMODULE m_hDbhHelp;
- HANDLE m_hProcess;
- LPSTR m_szSymPath;
-
-#pragma pack(push,8)
-typedef struct IMAGEHLP_MODULE64_V3 {
- DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
- DWORD64 BaseOfImage; // base load address of module
- DWORD ImageSize; // virtual size of the loaded module
- DWORD TimeDateStamp; // date/time stamp from pe header
- DWORD CheckSum; // checksum from the pe header
- DWORD NumSyms; // number of symbols in the symbol table
- SYM_TYPE SymType; // type of symbols loaded
- CHAR ModuleName[32]; // module name
- CHAR ImageName[256]; // image name
- CHAR LoadedImageName[256]; // symbol file name
- // new elements: 07-Jun-2002
- CHAR LoadedPdbName[256]; // pdb file name
- DWORD CVSig; // Signature of the CV record in the debug directories
- CHAR CVData[MAX_PATH * 3]; // Contents of the CV record
- DWORD PdbSig; // Signature of PDB
- GUID PdbSig70; // Signature of PDB (VC 7 and up)
- DWORD PdbAge; // DBI age of pdb
- BOOL PdbUnmatched; // loaded an unmatched pdb
- BOOL DbgUnmatched; // loaded an unmatched dbg
- BOOL LineNumbers; // we have line number information
- BOOL GlobalSymbols; // we have internal symbol information
- BOOL TypeInfo; // we have type information
- // new elements: 17-Dec-2003
- BOOL SourceIndexed; // pdb supports source server
- BOOL Publics; // contains public symbols
-};
-
-typedef struct IMAGEHLP_MODULE64_V2 {
- DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
- DWORD64 BaseOfImage; // base load address of module
- DWORD ImageSize; // virtual size of the loaded module
- DWORD TimeDateStamp; // date/time stamp from pe header
- DWORD CheckSum; // checksum from the pe header
- DWORD NumSyms; // number of symbols in the symbol table
- SYM_TYPE SymType; // type of symbols loaded
- CHAR ModuleName[32]; // module name
- CHAR ImageName[256]; // image name
- CHAR LoadedImageName[256]; // symbol file name
-};
-#pragma pack(pop)
-
-
- // SymCleanup()
- typedef BOOL (__stdcall *tSC)( IN HANDLE hProcess );
- tSC pSC;
-
- // SymFunctionTableAccess64()
- typedef PVOID (__stdcall *tSFTA)( HANDLE hProcess, DWORD64 AddrBase );
- tSFTA pSFTA;
-
- // SymGetLineFromAddr64()
- typedef BOOL (__stdcall *tSGLFA)( IN HANDLE hProcess, IN DWORD64 dwAddr,
- OUT PDWORD pdwDisplacement, OUT PIMAGEHLP_LINE64 Line );
- tSGLFA pSGLFA;
-
- // SymGetModuleBase64()
- typedef DWORD64 (__stdcall *tSGMB)( IN HANDLE hProcess, IN DWORD64 dwAddr );
- tSGMB pSGMB;
-
- // SymGetModuleInfo64()
- typedef BOOL (__stdcall *tSGMI)( IN HANDLE hProcess, IN DWORD64 dwAddr, OUT IMAGEHLP_MODULE64_V3 *ModuleInfo );
- tSGMI pSGMI;
-
- // SymGetOptions()
- typedef DWORD (__stdcall *tSGO)( VOID );
- tSGO pSGO;
-
- // SymGetSymFromAddr64()
- typedef BOOL (__stdcall *tSGSFA)( IN HANDLE hProcess, IN DWORD64 dwAddr,
- OUT PDWORD64 pdwDisplacement, OUT PIMAGEHLP_SYMBOL64 Symbol );
- tSGSFA pSGSFA;
-
- // SymInitialize()
- typedef BOOL (__stdcall *tSI)( IN HANDLE hProcess, IN PSTR UserSearchPath, IN BOOL fInvadeProcess );
- tSI pSI;
-
- // SymLoadModule64()
- typedef DWORD64 (__stdcall *tSLM)( IN HANDLE hProcess, IN HANDLE hFile,
- IN PSTR ImageName, IN PSTR ModuleName, IN DWORD64 BaseOfDll, IN DWORD SizeOfDll );
- tSLM pSLM;
-
- // SymSetOptions()
- typedef DWORD (__stdcall *tSSO)( IN DWORD SymOptions );
- tSSO pSSO;
-
- // StackWalk64()
- typedef BOOL (__stdcall *tSW)(
- DWORD MachineType,
- HANDLE hProcess,
- HANDLE hThread,
- LPSTACKFRAME64 StackFrame,
- PVOID ContextRecord,
- PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine,
- PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine,
- PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine,
- PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress );
- tSW pSW;
-
- // UnDecorateSymbolName()
- typedef DWORD (__stdcall WINAPI *tUDSN)( PCSTR DecoratedName, PSTR UnDecoratedName,
- DWORD UndecoratedLength, DWORD Flags );
- tUDSN pUDSN;
-
- typedef BOOL (__stdcall WINAPI *tSGSP)(HANDLE hProcess, PSTR SearchPath, DWORD SearchPathLength);
- tSGSP pSGSP;
-
-
-private:
- // **************************************** ToolHelp32 ************************
- #define MAX_MODULE_NAME32 255
- #define TH32CS_SNAPMODULE 0x00000008
- #pragma pack( push, 8 )
- typedef struct tagMODULEENTRY32
- {
- DWORD dwSize;
- DWORD th32ModuleID; // This module
- DWORD th32ProcessID; // owning process
- DWORD GlblcntUsage; // Global usage count on the module
- DWORD ProccntUsage; // Module usage count in th32ProcessID's context
- BYTE * modBaseAddr; // Base address of module in th32ProcessID's context
- DWORD modBaseSize; // Size in bytes of module starting at modBaseAddr
- HMODULE hModule; // The hModule of this module in th32ProcessID's context
- char szModule[MAX_MODULE_NAME32 + 1];
- char szExePath[MAX_PATH];
- } MODULEENTRY32;
- typedef MODULEENTRY32 * PMODULEENTRY32;
- typedef MODULEENTRY32 * LPMODULEENTRY32;
- #pragma pack( pop )
-
- BOOL GetModuleListTH32(HANDLE hProcess, DWORD pid)
- {
- // CreateToolhelp32Snapshot()
- typedef HANDLE (__stdcall *tCT32S)(DWORD dwFlags, DWORD th32ProcessID);
- // Module32First()
- typedef BOOL (__stdcall *tM32F)(HANDLE hSnapshot, LPMODULEENTRY32 lpme);
- // Module32Next()
- typedef BOOL (__stdcall *tM32N)(HANDLE hSnapshot, LPMODULEENTRY32 lpme);
-
- // try both dlls...
- const TCHAR *dllname[] = { _T("kernel32.dll"), _T("tlhelp32.dll") };
- HINSTANCE hToolhelp = NULL;
- tCT32S pCT32S = NULL;
- tM32F pM32F = NULL;
- tM32N pM32N = NULL;
-
- HANDLE hSnap;
- MODULEENTRY32 me;
- me.dwSize = sizeof(me);
- BOOL keepGoing;
- size_t i;
-
- for (i = 0; i<(sizeof(dllname) / sizeof(dllname[0])); i++ )
- {
- hToolhelp = LoadLibrary( dllname[i] );
- if (hToolhelp == NULL)
- continue;
- pCT32S = (tCT32S) GetProcAddress(hToolhelp, "CreateToolhelp32Snapshot");
- pM32F = (tM32F) GetProcAddress(hToolhelp, "Module32First");
- pM32N = (tM32N) GetProcAddress(hToolhelp, "Module32Next");
- if ( (pCT32S != NULL) && (pM32F != NULL) && (pM32N != NULL) )
- break; // found the functions!
- FreeLibrary(hToolhelp);
- hToolhelp = NULL;
- }
-
- if (hToolhelp == NULL)
- return FALSE;
-
- hSnap = pCT32S( TH32CS_SNAPMODULE, pid );
- if (hSnap == (HANDLE) -1)
- {
- FreeLibrary(hToolhelp);
- return FALSE;
- }
-
- keepGoing = !!pM32F( hSnap, &me );
- int cnt = 0;
- while (keepGoing)
- {
- this->LoadModule(hProcess, me.szExePath, me.szModule, (DWORD64) me.modBaseAddr, me.modBaseSize);
- cnt++;
- keepGoing = !!pM32N( hSnap, &me );
- }
- CloseHandle(hSnap);
- FreeLibrary(hToolhelp);
- if (cnt <= 0)
- return FALSE;
- return TRUE;
- } // GetModuleListTH32
-
- // **************************************** PSAPI ************************
- typedef struct _MODULEINFO {
- LPVOID lpBaseOfDll;
- DWORD SizeOfImage;
- LPVOID EntryPoint;
- } MODULEINFO, *LPMODULEINFO;
-
- BOOL GetModuleListPSAPI(HANDLE hProcess)
- {
- // EnumProcessModules()
- typedef BOOL (__stdcall *tEPM)(HANDLE hProcess, HMODULE *lphModule, DWORD cb, LPDWORD lpcbNeeded );
- // GetModuleFileNameEx()
- typedef DWORD (__stdcall *tGMFNE)(HANDLE hProcess, HMODULE hModule, LPSTR lpFilename, DWORD nSize );
- // GetModuleBaseName()
- typedef DWORD (__stdcall *tGMBN)(HANDLE hProcess, HMODULE hModule, LPSTR lpFilename, DWORD nSize );
- // GetModuleInformation()
- typedef BOOL (__stdcall *tGMI)(HANDLE hProcess, HMODULE hModule, LPMODULEINFO pmi, DWORD nSize );
-
- HINSTANCE hPsapi;
- tEPM pEPM;
- tGMFNE pGMFNE;
- tGMBN pGMBN;
- tGMI pGMI;
-
- DWORD i;
- //ModuleEntry e;
- DWORD cbNeeded;
- MODULEINFO mi;
- HMODULE *hMods = 0;
- char *tt = NULL;
- char *tt2 = NULL;
- const SIZE_T TTBUFLEN = 8096;
- int cnt = 0;
-
- hPsapi = LoadLibrary( _T("psapi.dll") );
- if (hPsapi == NULL)
- return FALSE;
-
- pEPM = (tEPM) GetProcAddress( hPsapi, "EnumProcessModules" );
- pGMFNE = (tGMFNE) GetProcAddress( hPsapi, "GetModuleFileNameExA" );
- pGMBN = (tGMFNE) GetProcAddress( hPsapi, "GetModuleBaseNameA" );
- pGMI = (tGMI) GetProcAddress( hPsapi, "GetModuleInformation" );
- if ( (pEPM == NULL) || (pGMFNE == NULL) || (pGMBN == NULL) || (pGMI == NULL) )
- {
- // we couldn�t find all functions
- FreeLibrary(hPsapi);
- return FALSE;
- }
-
- hMods = (HMODULE*) malloc(sizeof(HMODULE) * (TTBUFLEN / sizeof(HMODULE)));
- tt = (char*) malloc(sizeof(char) * TTBUFLEN);
- tt2 = (char*) malloc(sizeof(char) * TTBUFLEN);
- if ( (hMods == NULL) || (tt == NULL) || (tt2 == NULL) )
- goto cleanup;
-
- if ( ! pEPM( hProcess, hMods, TTBUFLEN, &cbNeeded ) )
- {
- //_ftprintf(fLogFile, _T("%lu: EPM failed, GetLastError = %lu\n"), g_dwShowCount, gle );
- goto cleanup;
- }
-
- if ( cbNeeded > TTBUFLEN )
- {
- //_ftprintf(fLogFile, _T("%lu: More than %lu module handles. Huh?\n"), g_dwShowCount, lenof( hMods ) );
- goto cleanup;
- }
-
- for ( i = 0; i < cbNeeded / sizeof(hMods[0]); i++ )
- {
- // base address, size
- pGMI(hProcess, hMods[i], &mi, sizeof(mi));
- // image file name
- tt[0] = 0;
- pGMFNE(hProcess, hMods[i], tt, TTBUFLEN );
- // module name
- tt2[0] = 0;
- pGMBN(hProcess, hMods[i], tt2, TTBUFLEN );
-
- DWORD dwRes = this->LoadModule(hProcess, tt, tt2, (DWORD64) mi.lpBaseOfDll, mi.SizeOfImage);
- if (dwRes != ERROR_SUCCESS)
- this->m_parent->OnDbgHelpErr("LoadModule", dwRes, 0);
- cnt++;
- }
-
- cleanup:
- if (hPsapi != NULL) FreeLibrary(hPsapi);
- if (tt2 != NULL) free(tt2);
- if (tt != NULL) free(tt);
- if (hMods != NULL) free(hMods);
-
- return cnt != 0;
- } // GetModuleListPSAPI
-
- DWORD LoadModule(HANDLE hProcess, LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size)
- {
- CHAR *szImg = _strdup(img);
- CHAR *szMod = _strdup(mod);
- DWORD result = ERROR_SUCCESS;
- if ( (szImg == NULL) || (szMod == NULL) )
- result = ERROR_NOT_ENOUGH_MEMORY;
- else
- {
- if (pSLM(hProcess, 0, szImg, szMod, baseAddr, size) == 0)
- result = GetLastError();
- }
- ULONGLONG fileVersion = 0;
- if ( (m_parent != NULL) && (szImg != NULL) )
- {
- // try to retrive the file-version:
- if ( (this->m_parent->m_options & StackWalker::RetrieveFileVersion) != 0)
- {
- VS_FIXEDFILEINFO *fInfo = NULL;
- DWORD dwHandle;
- DWORD dwSize = GetFileVersionInfoSizeA(szImg, &dwHandle);
- if (dwSize > 0)
- {
- LPVOID vData = malloc(dwSize);
- if (vData != NULL)
- {
- if (GetFileVersionInfoA(szImg, dwHandle, dwSize, vData) != 0)
- {
- UINT len;
- TCHAR szSubBlock[] = _T("\\");
- if (VerQueryValue(vData, szSubBlock, (LPVOID*) &fInfo, &len) == 0)
- fInfo = NULL;
- else
- {
- fileVersion = ((ULONGLONG)fInfo->dwFileVersionLS) + ((ULONGLONG)fInfo->dwFileVersionMS << 32);
- }
- }
- free(vData);
- }
- }
- }
-
- // Retrive some additional-infos about the module
- IMAGEHLP_MODULE64_V3 Module;
- const char *szSymType = "-unknown-";
- if (this->GetModuleInfo(hProcess, baseAddr, &Module) != FALSE)
- {
- switch(Module.SymType)
- {
- case SymNone:
- szSymType = "-nosymbols-";
- break;
- case SymCoff: // 1
- szSymType = "COFF";
- break;
- case SymCv: // 2
- szSymType = "CV";
- break;
- case SymPdb: // 3
- szSymType = "PDB";
- break;
- case SymExport: // 4
- szSymType = "-exported-";
- break;
- case SymDeferred: // 5
- szSymType = "-deferred-";
- break;
- case SymSym: // 6
- szSymType = "SYM";
- break;
- case 7: // SymDia:
- szSymType = "DIA";
- break;
- case 8: //SymVirtual:
- szSymType = "Virtual";
- break;
- }
- }
- LPCSTR pdbName = Module.LoadedImageName;
- if (Module.LoadedPdbName[0] != 0)
- pdbName = Module.LoadedPdbName;
- this->m_parent->OnLoadModule(img, mod, baseAddr, size, result, szSymType, pdbName, fileVersion);
- }
- if (szImg != NULL) free(szImg);
- if (szMod != NULL) free(szMod);
- return result;
- }
-public:
- BOOL LoadModules(HANDLE hProcess, DWORD dwProcessId)
- {
- // first try toolhelp32
- if (GetModuleListTH32(hProcess, dwProcessId))
- return true;
- // then try psapi
- return GetModuleListPSAPI(hProcess);
- }
-
-
- BOOL GetModuleInfo(HANDLE hProcess, DWORD64 baseAddr, IMAGEHLP_MODULE64_V3 *pModuleInfo)
- {
- memset(pModuleInfo, 0, sizeof(IMAGEHLP_MODULE64_V3));
- if(this->pSGMI == NULL)
- {
- SetLastError(ERROR_DLL_INIT_FAILED);
- return FALSE;
- }
- // First try to use the larger ModuleInfo-Structure
- pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULE64_V3);
- void *pData = malloc(4096); // reserve enough memory, so the bug in v6.3.5.1 does not lead to memory-overwrites...
- if (pData == NULL)
- {
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return FALSE;
- }
- memcpy(pData, pModuleInfo, sizeof(IMAGEHLP_MODULE64_V3));
- static bool s_useV3Version = true;
- if (s_useV3Version)
- {
- if (this->pSGMI(hProcess, baseAddr, (IMAGEHLP_MODULE64_V3*) pData) != FALSE)
- {
- // only copy as much memory as is reserved...
- memcpy(pModuleInfo, pData, sizeof(IMAGEHLP_MODULE64_V3));
- pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULE64_V3);
- free(pData);
- return TRUE;
- }
- s_useV3Version = false; // to prevent unneccessarry calls with the larger struct...
- }
-
- // could not retrive the bigger structure, try with the smaller one (as defined in VC7.1)...
- pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULE64_V2);
- memcpy(pData, pModuleInfo, sizeof(IMAGEHLP_MODULE64_V2));
- if (this->pSGMI(hProcess, baseAddr, (IMAGEHLP_MODULE64_V3*) pData) != FALSE)
- {
- // only copy as much memory as is reserved...
- memcpy(pModuleInfo, pData, sizeof(IMAGEHLP_MODULE64_V2));
- pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULE64_V2);
- free(pData);
- return TRUE;
- }
- free(pData);
- SetLastError(ERROR_DLL_INIT_FAILED);
- return FALSE;
- }
-};
-
-// #############################################################
-StackWalker::StackWalker(DWORD dwProcessId, HANDLE hProcess)
-{
- this->m_options = OptionsAll;
- this->m_modulesLoaded = FALSE;
- this->m_hProcess = hProcess;
- this->m_sw = new StackWalkerInternal(this, this->m_hProcess);
- this->m_dwProcessId = dwProcessId;
- this->m_szSymPath = NULL;
- this->m_MaxRecursionCount = 1000;
-}
-StackWalker::StackWalker(int options, LPCSTR szSymPath, DWORD dwProcessId, HANDLE hProcess)
-{
- this->m_options = options;
- this->m_modulesLoaded = FALSE;
- this->m_hProcess = hProcess;
- this->m_sw = new StackWalkerInternal(this, this->m_hProcess);
- this->m_dwProcessId = dwProcessId;
- if (szSymPath != NULL)
- {
- this->m_szSymPath = _strdup(szSymPath);
- this->m_options |= SymBuildPath;
- }
- else
- this->m_szSymPath = NULL;
- this->m_MaxRecursionCount = 1000;
-}
-
-StackWalker::~StackWalker()
-{
- if (m_szSymPath != NULL)
- free(m_szSymPath);
- m_szSymPath = NULL;
- if (this->m_sw != NULL)
- delete this->m_sw;
- this->m_sw = NULL;
-}
-
-BOOL StackWalker::LoadModules()
-{
- if (this->m_sw == NULL)
- {
- SetLastError(ERROR_DLL_INIT_FAILED);
- return FALSE;
- }
- if (m_modulesLoaded != FALSE)
- return TRUE;
-
- // Build the sym-path:
- char *szSymPath = NULL;
- if ( (this->m_options & SymBuildPath) != 0)
- {
- const size_t nSymPathLen = 4096;
- szSymPath = (char*) malloc(nSymPathLen);
- if (szSymPath == NULL)
- {
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return FALSE;
- }
- szSymPath[0] = 0;
- // Now first add the (optional) provided sympath:
- if (this->m_szSymPath != NULL)
- {
- strcat_s(szSymPath, nSymPathLen, this->m_szSymPath);
- strcat_s(szSymPath, nSymPathLen, ";");
- }
-
- strcat_s(szSymPath, nSymPathLen, ".;");
-
- const size_t nTempLen = 1024;
- char szTemp[nTempLen];
- // Now add the current directory:
- if (GetCurrentDirectoryA(nTempLen, szTemp) > 0)
- {
- szTemp[nTempLen-1] = 0;
- strcat_s(szSymPath, nSymPathLen, szTemp);
- strcat_s(szSymPath, nSymPathLen, ";");
- }
-
- // Now add the path for the main-module:
- if (GetModuleFileNameA(NULL, szTemp, nTempLen) > 0)
- {
- szTemp[nTempLen-1] = 0;
- for (char *p = (szTemp+strlen(szTemp)-1); p >= szTemp; --p)
- {
- // locate the rightmost path separator
- if ( (*p == '\\') || (*p == '/') || (*p == ':') )
- {
- *p = 0;
- break;
- }
- } // for (search for path separator...)
- if (strlen(szTemp) > 0)
- {
- strcat_s(szSymPath, nSymPathLen, szTemp);
- strcat_s(szSymPath, nSymPathLen, ";");
- }
- }
- if (GetEnvironmentVariableA("_NT_SYMBOL_PATH", szTemp, nTempLen) > 0)
- {
- szTemp[nTempLen-1] = 0;
- strcat_s(szSymPath, nSymPathLen, szTemp);
- strcat_s(szSymPath, nSymPathLen, ";");
- }
- if (GetEnvironmentVariableA("_NT_ALTERNATE_SYMBOL_PATH", szTemp, nTempLen) > 0)
- {
- szTemp[nTempLen-1] = 0;
- strcat_s(szSymPath, nSymPathLen, szTemp);
- strcat_s(szSymPath, nSymPathLen, ";");
- }
- if (GetEnvironmentVariableA("SYSTEMROOT", szTemp, nTempLen) > 0)
- {
- szTemp[nTempLen-1] = 0;
- strcat_s(szSymPath, nSymPathLen, szTemp);
- strcat_s(szSymPath, nSymPathLen, ";");
- // also add the "system32"-directory:
- strcat_s(szTemp, nTempLen, "\\system32");
- strcat_s(szSymPath, nSymPathLen, szTemp);
- strcat_s(szSymPath, nSymPathLen, ";");
- }
-
- if ( (this->m_options & SymUseSymSrv) != 0)
- {
- if (GetEnvironmentVariableA("SYSTEMDRIVE", szTemp, nTempLen) > 0)
- {
- szTemp[nTempLen-1] = 0;
- strcat_s(szSymPath, nSymPathLen, "SRV*");
- strcat_s(szSymPath, nSymPathLen, szTemp);
- strcat_s(szSymPath, nSymPathLen, "\\websymbols");
- strcat_s(szSymPath, nSymPathLen, "*http://msdl.microsoft.com/download/symbols;");
- }
- else
- strcat_s(szSymPath, nSymPathLen, "SRV*c:\\websymbols*http://msdl.microsoft.com/download/symbols;");
- }
- } // if SymBuildPath
-
- // First Init the whole stuff...
- BOOL bRet = this->m_sw->Init(szSymPath);
- if (szSymPath != NULL) free(szSymPath); szSymPath = NULL;
- if (bRet == FALSE)
- {
- this->OnDbgHelpErr("Error while initializing dbghelp.dll", 0, 0);
- SetLastError(ERROR_DLL_INIT_FAILED);
- return FALSE;
- }
-
- bRet = this->m_sw->LoadModules(this->m_hProcess, this->m_dwProcessId);
- if (bRet != FALSE)
- m_modulesLoaded = TRUE;
- return bRet;
-}
-
-
-// The following is used to pass the "userData"-Pointer to the user-provided readMemoryFunction
-// This has to be done due to a problem with the "hProcess"-parameter in x64...
-// Because this class is in no case multi-threading-enabled (because of the limitations
-// of dbghelp.dll) it is "safe" to use a static-variable
-static StackWalker::PReadProcessMemoryRoutine s_readMemoryFunction = NULL;
-static LPVOID s_readMemoryFunction_UserData = NULL;
-
-BOOL StackWalker::ShowCallstack(HANDLE hThread, const CONTEXT *context, PReadProcessMemoryRoutine readMemoryFunction, LPVOID pUserData)
-{
- CONTEXT c;
- CallstackEntry csEntry;
- IMAGEHLP_SYMBOL64 *pSym = NULL;
- StackWalkerInternal::IMAGEHLP_MODULE64_V3 Module;
- IMAGEHLP_LINE64 Line;
- int frameNum;
- bool bLastEntryCalled = true;
- int curRecursionCount = 0;
-
- if (m_modulesLoaded == FALSE)
- this->LoadModules(); // ignore the result...
-
- if (this->m_sw->m_hDbhHelp == NULL)
- {
- SetLastError(ERROR_DLL_INIT_FAILED);
- return FALSE;
- }
-
- s_readMemoryFunction = readMemoryFunction;
- s_readMemoryFunction_UserData = pUserData;
-
- if (context == NULL)
- {
- // If no context is provided, capture the context
- // See: https://stackwalker.codeplex.com/discussions/446958
-#if _WIN32_WINNT <= 0x0501
- // If we need to support XP, we need to use the "old way", because "GetThreadId" is not available!
- if (hThread == GetCurrentThread())
-#else
- if (GetThreadId(hThread) == GetCurrentThreadId())
-#endif
- {
- GET_CURRENT_CONTEXT_STACKWALKER_CODEPLEX(c, USED_CONTEXT_FLAGS);
- }
- else
- {
- SuspendThread(hThread);
- memset(&c, 0, sizeof(CONTEXT));
- c.ContextFlags = USED_CONTEXT_FLAGS;
- if (GetThreadContext(hThread, &c) == FALSE)
- {
- ResumeThread(hThread);
- return FALSE;
- }
- }
- }
- else
- c = *context;
-
- // init STACKFRAME for first call
- STACKFRAME64 s; // in/out stackframe
- memset(&s, 0, sizeof(s));
- DWORD imageType;
-#ifdef _M_IX86
- // normally, call ImageNtHeader() and use machine info from PE header
- imageType = IMAGE_FILE_MACHINE_I386;
- s.AddrPC.Offset = c.Eip;
- s.AddrPC.Mode = AddrModeFlat;
- s.AddrFrame.Offset = c.Ebp;
- s.AddrFrame.Mode = AddrModeFlat;
- s.AddrStack.Offset = c.Esp;
- s.AddrStack.Mode = AddrModeFlat;
-#elif _M_X64
- imageType = IMAGE_FILE_MACHINE_AMD64;
- s.AddrPC.Offset = c.Rip;
- s.AddrPC.Mode = AddrModeFlat;
- s.AddrFrame.Offset = c.Rsp;
- s.AddrFrame.Mode = AddrModeFlat;
- s.AddrStack.Offset = c.Rsp;
- s.AddrStack.Mode = AddrModeFlat;
-#elif _M_IA64
- imageType = IMAGE_FILE_MACHINE_IA64;
- s.AddrPC.Offset = c.StIIP;
- s.AddrPC.Mode = AddrModeFlat;
- s.AddrFrame.Offset = c.IntSp;
- s.AddrFrame.Mode = AddrModeFlat;
- s.AddrBStore.Offset = c.RsBSP;
- s.AddrBStore.Mode = AddrModeFlat;
- s.AddrStack.Offset = c.IntSp;
- s.AddrStack.Mode = AddrModeFlat;
-#else
-#error "Platform not supported!"
-#endif
-
- pSym = (IMAGEHLP_SYMBOL64 *) malloc(sizeof(IMAGEHLP_SYMBOL64) + STACKWALK_MAX_NAMELEN);
- if (!pSym) goto cleanup; // not enough memory...
- memset(pSym, 0, sizeof(IMAGEHLP_SYMBOL64) + STACKWALK_MAX_NAMELEN);
- pSym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64);
- pSym->MaxNameLength = STACKWALK_MAX_NAMELEN;
-
- memset(&Line, 0, sizeof(Line));
- Line.SizeOfStruct = sizeof(Line);
-
- memset(&Module, 0, sizeof(Module));
- Module.SizeOfStruct = sizeof(Module);
-
- for (frameNum = 0; ; ++frameNum )
- {
- // get next stack frame (StackWalk64(), SymFunctionTableAccess64(), SymGetModuleBase64())
- // if this returns ERROR_INVALID_ADDRESS (487) or ERROR_NOACCESS (998), you can
- // assume that either you are done, or that the stack is so hosed that the next
- // deeper frame could not be found.
- // CONTEXT need not to be suplied if imageTyp is IMAGE_FILE_MACHINE_I386!
- if ( ! this->m_sw->pSW(imageType, this->m_hProcess, hThread, &s, &c, myReadProcMem, this->m_sw->pSFTA, this->m_sw->pSGMB, NULL) )
- {
- // INFO: "StackWalk64" does not set "GetLastError"...
- this->OnDbgHelpErr("StackWalk64", 0, s.AddrPC.Offset);
- break;
- }
-
- csEntry.offset = s.AddrPC.Offset;
- csEntry.name[0] = 0;
- csEntry.undName[0] = 0;
- csEntry.undFullName[0] = 0;
- csEntry.offsetFromSmybol = 0;
- csEntry.offsetFromLine = 0;
- csEntry.lineFileName[0] = 0;
- csEntry.lineNumber = 0;
- csEntry.loadedImageName[0] = 0;
- csEntry.moduleName[0] = 0;
- if (s.AddrPC.Offset == s.AddrReturn.Offset)
- {
- if ( (this->m_MaxRecursionCount > 0) && (curRecursionCount > m_MaxRecursionCount) )
- {
- this->OnDbgHelpErr("StackWalk64-Endless-Callstack!", 0, s.AddrPC.Offset);
- break;
- }
- curRecursionCount++;
- }
- else
- curRecursionCount = 0;
- if (s.AddrPC.Offset != 0)
- {
- // we seem to have a valid PC
- // show procedure info (SymGetSymFromAddr64())
- if (this->m_sw->pSGSFA(this->m_hProcess, s.AddrPC.Offset, &(csEntry.offsetFromSmybol), pSym) != FALSE)
- {
- MyStrCpy(csEntry.name, STACKWALK_MAX_NAMELEN, pSym->Name);
- // UnDecorateSymbolName()
- this->m_sw->pUDSN( pSym->Name, csEntry.undName, STACKWALK_MAX_NAMELEN, UNDNAME_NAME_ONLY );
- this->m_sw->pUDSN( pSym->Name, csEntry.undFullName, STACKWALK_MAX_NAMELEN, UNDNAME_COMPLETE );
- }
- else
- {
- this->OnDbgHelpErr("SymGetSymFromAddr64", GetLastError(), s.AddrPC.Offset);
- }
-
- // show line number info, NT5.0-method (SymGetLineFromAddr64())
- if (this->m_sw->pSGLFA != NULL )
- { // yes, we have SymGetLineFromAddr64()
- if (this->m_sw->pSGLFA(this->m_hProcess, s.AddrPC.Offset, &(csEntry.offsetFromLine), &Line) != FALSE)
- {
- csEntry.lineNumber = Line.LineNumber;
- MyStrCpy(csEntry.lineFileName, STACKWALK_MAX_NAMELEN, Line.FileName);
- }
- else
- {
- this->OnDbgHelpErr("SymGetLineFromAddr64", GetLastError(), s.AddrPC.Offset);
- }
- } // yes, we have SymGetLineFromAddr64()
-
- // show module info (SymGetModuleInfo64())
- if (this->m_sw->GetModuleInfo(this->m_hProcess, s.AddrPC.Offset, &Module ) != FALSE)
- { // got module info OK
- switch ( Module.SymType )
- {
- case SymNone:
- csEntry.symTypeString = "-nosymbols-";
- break;
- case SymCoff:
- csEntry.symTypeString = "COFF";
- break;
- case SymCv:
- csEntry.symTypeString = "CV";
- break;
- case SymPdb:
- csEntry.symTypeString = "PDB";
- break;
- case SymExport:
- csEntry.symTypeString = "-exported-";
- break;
- case SymDeferred:
- csEntry.symTypeString = "-deferred-";
- break;
- case SymSym:
- csEntry.symTypeString = "SYM";
- break;
-#if API_VERSION_NUMBER >= 9
- case SymDia:
- csEntry.symTypeString = "DIA";
- break;
-#endif
- case 8: //SymVirtual:
- csEntry.symTypeString = "Virtual";
- break;
- default:
- //_snprintf( ty, sizeof(ty), "symtype=%ld", (long) Module.SymType );
- csEntry.symTypeString = NULL;
- break;
- }
-
- MyStrCpy(csEntry.moduleName, STACKWALK_MAX_NAMELEN, Module.ModuleName);
- csEntry.baseOfImage = Module.BaseOfImage;
- MyStrCpy(csEntry.loadedImageName, STACKWALK_MAX_NAMELEN, Module.LoadedImageName);
- } // got module info OK
- else
- {
- this->OnDbgHelpErr("SymGetModuleInfo64", GetLastError(), s.AddrPC.Offset);
- }
- } // we seem to have a valid PC
-
- CallstackEntryType et = nextEntry;
- if (frameNum == 0)
- et = firstEntry;
- bLastEntryCalled = false;
- this->OnCallstackEntry(et, csEntry);
-
- if (s.AddrReturn.Offset == 0)
- {
- bLastEntryCalled = true;
- this->OnCallstackEntry(lastEntry, csEntry);
- SetLastError(ERROR_SUCCESS);
- break;
- }
- } // for ( frameNum )
-
- cleanup:
- if (pSym) free( pSym );
-
- if (bLastEntryCalled == false)
- this->OnCallstackEntry(lastEntry, csEntry);
-
- if (context == NULL)
- ResumeThread(hThread);
-
- return TRUE;
-}
-
-BOOL __stdcall StackWalker::myReadProcMem(
- HANDLE hProcess,
- DWORD64 qwBaseAddress,
- PVOID lpBuffer,
- DWORD nSize,
- LPDWORD lpNumberOfBytesRead
- )
-{
- if (s_readMemoryFunction == NULL)
- {
- SIZE_T st;
- BOOL bRet = ReadProcessMemory(hProcess, (LPVOID) qwBaseAddress, lpBuffer, nSize, &st);
- *lpNumberOfBytesRead = (DWORD) st;
- //printf("ReadMemory: hProcess: %p, baseAddr: %p, buffer: %p, size: %d, read: %d, result: %d\n", hProcess, (LPVOID) qwBaseAddress, lpBuffer, nSize, (DWORD) st, (DWORD) bRet);
- return bRet;
- }
- else
- {
- return s_readMemoryFunction(hProcess, qwBaseAddress, lpBuffer, nSize, lpNumberOfBytesRead, s_readMemoryFunction_UserData);
- }
-}
-
-void StackWalker::OnLoadModule(LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size, DWORD result, LPCSTR symType, LPCSTR pdbName, ULONGLONG fileVersion)
-{
- CHAR buffer[STACKWALK_MAX_NAMELEN];
- if (fileVersion == 0)
- _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "%s:%s (%p), size: %d (result: %d), SymType: '%s', PDB: '%s'\n", img, mod, (LPVOID) baseAddr, size, result, symType, pdbName);
- else
- {
- DWORD v4 = (DWORD) (fileVersion & 0xFFFF);
- DWORD v3 = (DWORD) ((fileVersion>>16) & 0xFFFF);
- DWORD v2 = (DWORD) ((fileVersion>>32) & 0xFFFF);
- DWORD v1 = (DWORD) ((fileVersion>>48) & 0xFFFF);
- _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "%s:%s (%p), size: %d (result: %d), SymType: '%s', PDB: '%s', fileVersion: %d.%d.%d.%d\n", img, mod, (LPVOID) baseAddr, size, result, symType, pdbName, v1, v2, v3, v4);
- }
- OnOutput(buffer);
-}
-
-void StackWalker::OnCallstackEntry(CallstackEntryType eType, CallstackEntry &entry)
-{
- CHAR buffer[STACKWALK_MAX_NAMELEN];
- if ( (eType != lastEntry) && (entry.offset != 0) )
- {
- if (entry.name[0] == 0)
- MyStrCpy(entry.name, STACKWALK_MAX_NAMELEN, "(function-name not available)");
- if (entry.undName[0] != 0)
- MyStrCpy(entry.name, STACKWALK_MAX_NAMELEN, entry.undName);
- if (entry.undFullName[0] != 0)
- MyStrCpy(entry.name, STACKWALK_MAX_NAMELEN, entry.undFullName);
- if (entry.lineFileName[0] == 0)
- {
- MyStrCpy(entry.lineFileName, STACKWALK_MAX_NAMELEN, "(filename not available)");
- if (entry.moduleName[0] == 0)
- MyStrCpy(entry.moduleName, STACKWALK_MAX_NAMELEN, "(module-name not available)");
- _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "%p (%s): %s: %s\n", (LPVOID) entry.offset, entry.moduleName, entry.lineFileName, entry.name);
- }
- else
- _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "%s (%d): %s\n", entry.lineFileName, entry.lineNumber, entry.name);
- buffer[STACKWALK_MAX_NAMELEN-1] = 0;
- OnOutput(buffer);
- }
-}
-
-void StackWalker::OnDbgHelpErr(LPCSTR szFuncName, DWORD gle, DWORD64 addr)
-{
- CHAR buffer[STACKWALK_MAX_NAMELEN];
- _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "ERROR: %s, GetLastError: %d (Address: %p)\n", szFuncName, gle, (LPVOID) addr);
- OnOutput(buffer);
-}
-
-void StackWalker::OnSymInit(LPCSTR szSearchPath, DWORD symOptions, LPCSTR szUserName)
-{
- CHAR buffer[STACKWALK_MAX_NAMELEN];
- _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "SymInit: Symbol-SearchPath: '%s', symOptions: %d, UserName: '%s'\n", szSearchPath, symOptions, szUserName);
- OnOutput(buffer);
- // Also display the OS-version
-#if _MSC_VER <= 1200
- OSVERSIONINFOA ver;
- ZeroMemory(&ver, sizeof(OSVERSIONINFOA));
- ver.dwOSVersionInfoSize = sizeof(ver);
- if (GetVersionExA(&ver) != FALSE)
- {
- _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "OS-Version: %d.%d.%d (%s)\n",
- ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber,
- ver.szCSDVersion);
- OnOutput(buffer);
- }
-#else
- OSVERSIONINFOEXA ver;
- ZeroMemory(&ver, sizeof(OSVERSIONINFOEXA));
- ver.dwOSVersionInfoSize = sizeof(ver);
- if (GetVersionExA( (OSVERSIONINFOA*) &ver) != FALSE)
- {
- _snprintf_s(buffer, STACKWALK_MAX_NAMELEN, "OS-Version: %d.%d.%d (%s) 0x%x-0x%x\n",
- ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber,
- ver.szCSDVersion, ver.wSuiteMask, ver.wProductType);
- OnOutput(buffer);
- }
-#endif
-}
-
-void StackWalker::OnOutput(LPCSTR buffer)
-{
- OutputDebugStringA(buffer);
-}
+++ /dev/null
-/**********************************************************************
- *
- * StackWalker.h
- *
- *
- *
- * LICENSE (http://www.opensource.org/licenses/bsd-license.php)
- *
- * Copyright (c) 2005-2009, Jochen Kalmbach
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of Jochen Kalmbach nor the names of its contributors may be
- * used to endorse or promote products derived from this software without
- * specific prior written permission.
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * **********************************************************************/
-// #pragma once is supported starting with _MCS_VER 1000,
-// so we need not to check the version (because we only support _MSC_VER >= 1100)!
-#pragma once
-
-#include <windows.h>
-
-// special defines for VC5/6 (if no actual PSDK is installed):
-#if _MSC_VER < 1300
-typedef unsigned __int64 DWORD64, *PDWORD64;
-#if defined(_WIN64)
-typedef unsigned __int64 SIZE_T, *PSIZE_T;
-#else
-typedef unsigned long SIZE_T, *PSIZE_T;
-#endif
-#endif // _MSC_VER < 1300
-
-class StackWalkerInternal; // forward
-class StackWalker
-{
-public:
- typedef enum StackWalkOptions
- {
- // No addition info will be retrived
- // (only the address is available)
- RetrieveNone = 0,
-
- // Try to get the symbol-name
- RetrieveSymbol = 1,
-
- // Try to get the line for this symbol
- RetrieveLine = 2,
-
- // Try to retrieve the module-infos
- RetrieveModuleInfo = 4,
-
- // Also retrieve the version for the DLL/EXE
- RetrieveFileVersion = 8,
-
- // Contains all the abouve
- RetrieveVerbose = 0xF,
-
- // Generate a "good" symbol-search-path
- SymBuildPath = 0x10,
-
- // Also use the public Microsoft-Symbol-Server
- SymUseSymSrv = 0x20,
-
- // Contains all the abouve "Sym"-options
- SymAll = 0x30,
-
- // Contains all options (default)
- OptionsAll = 0x3F
- } StackWalkOptions;
-
- StackWalker(
- int options = OptionsAll, // 'int' is by design, to combine the enum-flags
- LPCSTR szSymPath = NULL,
- DWORD dwProcessId = GetCurrentProcessId(),
- HANDLE hProcess = GetCurrentProcess()
- );
- StackWalker(DWORD dwProcessId, HANDLE hProcess);
- virtual ~StackWalker();
-
- typedef BOOL (__stdcall *PReadProcessMemoryRoutine)(
- HANDLE hProcess,
- DWORD64 qwBaseAddress,
- PVOID lpBuffer,
- DWORD nSize,
- LPDWORD lpNumberOfBytesRead,
- LPVOID pUserData // optional data, which was passed in "ShowCallstack"
- );
-
- BOOL LoadModules();
-
- BOOL ShowCallstack(
- HANDLE hThread = GetCurrentThread(),
- const CONTEXT *context = NULL,
- PReadProcessMemoryRoutine readMemoryFunction = NULL,
- LPVOID pUserData = NULL // optional to identify some data in the 'readMemoryFunction'-callback
- );
-
-#if _MSC_VER >= 1300
-// due to some reasons, the "STACKWALK_MAX_NAMELEN" must be declared as "public"
-// in older compilers in order to use it... starting with VC7 we can declare it as "protected"
-protected:
-#endif
- enum { STACKWALK_MAX_NAMELEN = 1024 }; // max name length for found symbols
-
-protected:
- // Entry for each Callstack-Entry
- typedef struct CallstackEntry
- {
- DWORD64 offset; // if 0, we have no valid entry
- CHAR name[STACKWALK_MAX_NAMELEN];
- CHAR undName[STACKWALK_MAX_NAMELEN];
- CHAR undFullName[STACKWALK_MAX_NAMELEN];
- DWORD64 offsetFromSmybol;
- DWORD offsetFromLine;
- DWORD lineNumber;
- CHAR lineFileName[STACKWALK_MAX_NAMELEN];
- DWORD symType;
- LPCSTR symTypeString;
- CHAR moduleName[STACKWALK_MAX_NAMELEN];
- DWORD64 baseOfImage;
- CHAR loadedImageName[STACKWALK_MAX_NAMELEN];
- } CallstackEntry;
-
- typedef enum CallstackEntryType {firstEntry, nextEntry, lastEntry};
-
- virtual void OnSymInit(LPCSTR szSearchPath, DWORD symOptions, LPCSTR szUserName);
- virtual void OnLoadModule(LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size, DWORD result, LPCSTR symType, LPCSTR pdbName, ULONGLONG fileVersion);
- virtual void OnCallstackEntry(CallstackEntryType eType, CallstackEntry &entry);
- virtual void OnDbgHelpErr(LPCSTR szFuncName, DWORD gle, DWORD64 addr);
- virtual void OnOutput(LPCSTR szText);
-
- StackWalkerInternal *m_sw;
- HANDLE m_hProcess;
- DWORD m_dwProcessId;
- BOOL m_modulesLoaded;
- LPSTR m_szSymPath;
-
- int m_options;
- int m_MaxRecursionCount;
-
- static BOOL __stdcall myReadProcMem(HANDLE hProcess, DWORD64 qwBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead);
-
- friend StackWalkerInternal;
-}; // class StackWalker
-
-
-// The "ugly" assembler-implementation is needed for systems before XP
-// If you have a new PSDK and you only compile for XP and later, then you can use
-// the "RtlCaptureContext"
-// Currently there is no define which determines the PSDK-Version...
-// So we just use the compiler-version (and assumes that the PSDK is
-// the one which was installed by the VS-IDE)
-
-// INFO: If you want, you can use the RtlCaptureContext if you only target XP and later...
-// But I currently use it in x64/IA64 environments...
-//#if defined(_M_IX86) && (_WIN32_WINNT <= 0x0500) && (_MSC_VER < 1400)
-
-#if defined(_M_IX86)
-#ifdef CURRENT_THREAD_VIA_EXCEPTION
-// TODO: The following is not a "good" implementation,
-// because the callstack is only valid in the "__except" block...
-#define GET_CURRENT_CONTEXT_STACKWALKER_CODEPLEX(c, contextFlags) \
- do { \
- memset(&c, 0, sizeof(CONTEXT)); \
- EXCEPTION_POINTERS *pExp = NULL; \
- __try { \
- throw 0; \
- } __except( ( (pExp = GetExceptionInformation()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_EXECUTE_HANDLER)) {} \
- if (pExp != NULL) \
- memcpy(&c, pExp->ContextRecord, sizeof(CONTEXT)); \
- c.ContextFlags = contextFlags; \
- } while(0);
-#else
-// The following should be enough for walking the callstack...
-#define GET_CURRENT_CONTEXT_STACKWALKER_CODEPLEX(c, contextFlags) \
- do { \
- memset(&c, 0, sizeof(CONTEXT)); \
- c.ContextFlags = contextFlags; \
- __asm call x \
- __asm x: pop eax \
- __asm mov c.Eip, eax \
- __asm mov c.Ebp, ebp \
- __asm mov c.Esp, esp \
- } while(0);
-#endif
-
-#else
-
-// The following is defined for x86 (XP and higher), x64 and IA64:
-#define GET_CURRENT_CONTEXT_STACKWALKER_CODEPLEX(c, contextFlags) \
- do { \
- memset(&c, 0, sizeof(CONTEXT)); \
- c.ContextFlags = contextFlags; \
- RtlCaptureContext(&c); \
-} while(0);
-#endif
+++ /dev/null
-/*
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef _ICafObject_H_
-#define _ICafObject_H_
-
-/**
- * @brief
- * The base interface all classes must support in order to support lifetime management
- * and interface retrieval.
- * <p>
- * Object lifetime is managed through the AddRef() and Release() methods. Pointers
- * to supported interfaces on the object - in the form of TCafSmartPtr - are
- * retrieved using the QueryInterface() method.
- * <p>
- * Interfaces and classes are candidates for QueryInterface() if they declare
- * a unique identifier for the interface or class. The identifier is a
- * UUID and is declared using the CAF_DECL_UUID macro.
- * <p>
- * Example interface declaration:
- * <pre>
- * <code>
- * struct __declspcec(novtable) IMyInterface {
- *
- * CAF_DECL_UUID("6AECA0A4-C6B1-4A43-9769-C5A8F56F0B52")
- *
- * virtual void Foo() = 0;
- * };
- * </code>
- * </pre>
- */
-struct __declspec(novtable) ICafObject {
- CAF_DECL_UUID("d285ff70-2314-11e0-ac64-0800200c9a66")
-
- /** @brief Increment the object's reference count */
- virtual void AddRef() = 0;
-
- /**
- * @brief Decrement the object's reference count
- * <p>
- * The object will be destroyed when the count reaches zero.
- */
- virtual void Release() = 0;
-
- /**
- * @brief Retrieve an interface on the object
- * @param IID the interface's UUID
- * @param ppv the address into which the retrieve interface's pointer
- * will be stored
- */
- virtual void QueryInterface(const IID&, void** ppv) = 0;
-};
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Jul 2009
- *
- * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CBeanPropertiesHelper_h_
-#define CBeanPropertiesHelper_h_
-
-namespace Caf {
-
-CAF_DECLARE_CLASS_AND_SMART_POINTER(CBeanPropertiesHelper);
-
-class INTEGRATIONCAF_LINKAGE CBeanPropertiesHelper {
-public:
- static SmartPtrCBeanPropertiesHelper create(
- const IBean::Cprops& properties);
-
-public:
- CBeanPropertiesHelper();
- virtual ~CBeanPropertiesHelper();
-
-public:
- void initialize(
- const IBean::Cprops& properties);
-
-public:
- std::string getRequiredString(
- const std::string& key) const;
-
- std::string getOptionalString(
- const std::string& key,
- const std::string& defaultVal = std::string()) const;
-
- bool getRequiredBool(
- const std::string& key) const;
-
- bool getOptionalBool(
- const std::string& key,
- const bool defaultVal = false) const;
-
-private:
- bool m_isInitialized;
- IBean::Cprops _properties;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CBeanPropertiesHelper);
-};
-
-}
-
-#endif // #ifndef CBeanPropertiesHelper_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Jul 2009
- *
- * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCafMessageCreator_h_
-#define CCafMessageCreator_h_
-
-namespace Caf {
-
-CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessageCreator);
-
-class INTEGRATIONCAF_LINKAGE CCafMessageCreator {
-public:
- static SmartPtrIIntMessage createPayloadEnvelope(
- const SmartPtrCResponseDoc& response,
- const std::string& relFilename,
- const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders());
-
- static SmartPtrIIntMessage createPayloadEnvelope(
- const SmartPtrCErrorResponseDoc& errorResponse,
- const std::string& relFilename,
- const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders());
-
- static SmartPtrIIntMessage createPayloadEnvelope(
- const SmartPtrCMgmtRequestDoc& mgmtRequest,
- const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders());
-
- static SmartPtrIIntMessage createPayloadEnvelope(
- const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope,
- const std::deque<SmartPtrCAttachmentDoc>& attachmentCollection,
- const IIntMessage::SmartPtrCHeaders& newHeaders = IIntMessage::SmartPtrCHeaders(),
- const IIntMessage::SmartPtrCHeaders& origHeaders = IIntMessage::SmartPtrCHeaders());
-
-public:
- static SmartPtrIIntMessage createFromProviderResponse(
- const SmartPtrCDynamicByteArray& providerResponse,
- const std::string& relFilename,
- const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders());
-
-public:
- static SmartPtrIIntMessage create(
- const SmartPtrCDynamicByteArray payload,
- const std::deque<SmartPtrCAttachmentDoc>& attachmentCollection,
- const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders());
-
-public:
- static SmartPtrIIntMessage create(
- const SmartPtrCMgmtRequestDoc& mgmtRequest,
- const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders());
-
- static SmartPtrIIntMessage create(
- const SmartPtrCDiagRequestDoc& diagRequest,
- const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders());
-
- static SmartPtrIIntMessage create(
- const SmartPtrCInstallRequestDoc& installRequest,
- const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders());
-
- static SmartPtrIIntMessage create(
- const SmartPtrCProviderRegDoc& providerReg,
- const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders());
-
- static SmartPtrIIntMessage create(
- const SmartPtrCProviderCollectSchemaRequestDoc& providerCollectSchemaRequest,
- const std::string& relFilename,
- const std::string& relDirectory,
- const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders());
-
- static SmartPtrIIntMessage create(
- const SmartPtrCProviderRequestDoc& providerRequest,
- const std::string& relFilename,
- const std::string& relDirectory,
- const std::string& providerUri,
- const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders());
-
-private:
- static SmartPtrIIntMessage createPayloadEnvelope(
- const std::string& payloadType,
- const std::string& payloadStr,
- const UUID& clientId,
- const UUID& requestId,
- const std::string& pmeId,
- const std::string& payloadVersion,
- const IIntMessage::SmartPtrCHeaders& newHeaders = IIntMessage::SmartPtrCHeaders(),
- const IIntMessage::SmartPtrCHeaders& origHeaders = IIntMessage::SmartPtrCHeaders(),
- const SmartPtrCAttachmentCollectionDoc& attachmentCollection = SmartPtrCAttachmentCollectionDoc(),
- const SmartPtrCProtocolCollectionDoc& protocolCollection = SmartPtrCProtocolCollectionDoc());
-
-private:
- CAF_CM_DECLARE_NOCREATE(CCafMessageCreator);
-};
-
-}
-
-#endif // #ifndef CCafMessageCreator_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Jul 2009
- *
- * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCafMessageHeaders_h_
-#define CCafMessageHeaders_h_
-
-namespace Caf {
-
-CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessageHeaders);
-
-class INTEGRATIONCAF_LINKAGE CCafMessageHeaders {
-public:
- static SmartPtrCCafMessageHeaders create(
- const IIntMessage::SmartPtrCHeaders& headers);
-
-public:
- CCafMessageHeaders();
- virtual ~CCafMessageHeaders();
-
-public:
- IIntMessage::SmartPtrCHeaders getHeaders() const;
-
-public:
- std::string getPayloadType() const;
-
- std::string getPayloadTypeOpt(
- const std::string& defaultVal = std::string()) const;
-
-public:
- std::string getVersion() const;
-
- std::string getVersionOpt(
- const std::string& defaultVal = "1.0") const;
-
-public:
- UUID getClientId() const;
- std::string getClientIdStr() const;
-
- UUID getClientIdOpt(
- const UUID defaultVal = CAFCOMMON_GUID_NULL) const;
- std::string getClientIdStrOpt(
- const std::string& defaultVal = std::string()) const;
-
-public:
- UUID getRequestId() const;
- std::string getRequestIdStr() const;
-
- UUID getRequestIdOpt(
- const UUID defaultVal = CAFCOMMON_GUID_NULL) const;
- std::string getRequestIdStrOpt(
- const std::string& defaultVal = std::string()) const;
-
-public:
- std::string getPmeId() const;
-
- std::string getPmeIdOpt(
- const std::string& defaultVal = std::string()) const;
-
-public:
- UUID getSessionId() const;
- std::string getSessionIdStr() const;
-
- UUID getSessionIdOpt(
- const UUID defaultVal = CAFCOMMON_GUID_NULL) const;
- std::string getSessionIdStrOpt(
- const std::string& defaultVal = std::string()) const;
-
-public:
- std::string getRelDirectory() const;
-
- std::string getRelDirectoryOpt(
- const std::string& defaultVal = std::string()) const;
-
-public:
- std::string getRelFilename() const;
-
- std::string getRelFilenameOpt(
- const std::string& defaultVal) const;
-
-public:
- std::string getProviderUri() const;
-
- std::string getProviderUriOpt(
- const std::string& defaultVal) const;
-
-public:
- std::string getFlowDirection() const;
-
- std::string getFlowDirectionOpt(
- const std::string& defaultVal) const;
-
-public:
- std::string getRequiredStr(
- const std::string& key) const;
-
- std::string getOptionalStr(
- const std::string& key,
- const std::string& defaultVal = std::string()) const;
-
- bool getRequiredBool(
- const std::string& key) const;
-
- bool getOptionalBool(
- const std::string& key,
- const bool defaultVal = false) const;
-
-private:
- void initialize(
- const IIntMessage::SmartPtrCHeaders& headers);
-
-private:
- SmartPtrIVariant findOptionalHeader(
- const std::string& key) const;
-
- SmartPtrIVariant findRequiredHeader(
- const std::string& key) const;
-
-private:
- bool _isInitialized;
- IIntMessage::SmartPtrCHeaders _headers;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CCafMessageHeaders);
-};
-
-}
-
-#endif // #ifndef CCafMessageHeaders_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Jul 2009
- *
- * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCafMessageHeadersWriter_h_
-#define CCafMessageHeadersWriter_h_
-
-namespace Caf {
-
-CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessageHeadersWriter);
-
-class INTEGRATIONCAF_LINKAGE CCafMessageHeadersWriter {
-public:
- static SmartPtrCCafMessageHeadersWriter create();
-
-public:
- CCafMessageHeadersWriter();
- virtual ~CCafMessageHeadersWriter();
-
-public:
- IIntMessage::SmartPtrCHeaders getHeaders() const;
-
-public:
- void setPayloadType(const std::string& payloadType);
-
- void setVersion(const std::string& version);
-
- void setPayloadVersion(const std::string& payloadVersion);
-
- void setClientId(const UUID& clientId);
-
- void setClientId(const std::string& clientIdStr);
-
- void setRequestId(const UUID& requestId);
-
- void setRequestId(const std::string& requestIdStr);
-
- void setPmeId(const std::string& pmeId);
-
- void setSessionId(const UUID& sessionId);
-
- void setSessionId(const std::string& sessionId);
-
- void setRelDirectory(const std::string& relDirectory);
-
- void setRelFilename(const std::string& relFilename);
-
- void setProviderUri(const std::string& providerUri);
-
- void setIsThrowable(const bool& isThrowable);
-
- void setIsMultiPart(const bool& isMultiPart);
-
- void setProtocol(const std::string& protocol);
-
- void setProtocolAddress(const std::string& protocolAddress);
-
- void setFlowDirection(const std::string& flowDirection);
-
-public:
- void insertString(
- const std::string& key,
- const std::string& value);
-
- void insertBool(
- const std::string& key,
- const bool& value);
-
-private:
- void initialize();
-
-private:
- bool _isInitialized;
- IIntMessage::SmartPtrCHeaders _headers;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CCafMessageHeadersWriter);
-};
-
-}
-
-#endif // #ifndef CCafMessageHeadersWriter_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Jul 2009
- *
- * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCafMessagePayload_h_
-#define CCafMessagePayload_h_
-
-#include <DocContracts.h>
-
-namespace Caf {
-
-CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessagePayload);
-
-class INTEGRATIONCAF_LINKAGE CCafMessagePayload {
-public:
- static SmartPtrCCafMessagePayload create(
- const SmartPtrCDynamicByteArray& payload,
- const std::string& payloadType = std::string());
-
- static SmartPtrCCafMessagePayload createFromFile(
- const std::string& payloadFile,
- const std::string& payloadType = std::string());
-
- static SmartPtrCCafMessagePayload createFromStr(
- const std::string& payloadStr,
- const std::string& payloadType = std::string());
-
-public:
- static SmartPtrCDynamicByteArray createBufferFromStr(
- const std::string& payloadStr);
-
- static SmartPtrCDynamicByteArray createBufferFromFile(
- const std::string& payloadFile);
-
-public:
- static void saveToFile(
- const SmartPtrCDynamicByteArray& payload,
- const std::string& payloadPath);
-
- static std::string saveToStr(
- const SmartPtrCDynamicByteArray& payload);
-
-public:
- CCafMessagePayload();
- virtual ~CCafMessagePayload();
-
-public:
- std::string getPayloadStr() const;
-
- SmartPtrCDynamicByteArray getPayload() const;
-
-public:
- std::string getVersion() const;
-
-public:
- SmartPtrCRequestHeaderDoc getRequestHeader() const;
-
- SmartPtrCManifestDoc getManifest() const;
-
- std::deque<SmartPtrCEventKeyDoc> getEventKeyCollection() const;
-
-private:
- void initialize(
- const SmartPtrCDynamicByteArray& payload,
- const std::string& payloadType = std::string(),
- const std::string& encoding = "xml");
-
-private:
- bool _isInitialized;
-
- std::string _encoding;
- SmartPtrCDynamicByteArray _payload;
- std::string _payloadStr;
- SmartPtrCXmlElement _payloadXml;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CCafMessagePayload);
-};
-
-}
-
-#endif // #ifndef CCafMessagePayload_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Jul 2009
- *
- * Copyright (c) 2009-2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCafMessagePayloadParser_h_
-#define CCafMessagePayloadParser_h_
-
-namespace Caf {
-
-CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessagePayloadParser);
-
-class INTEGRATIONCAF_LINKAGE CCafMessagePayloadParser {
-public:
- static SmartPtrCPayloadEnvelopeDoc getPayloadEnvelope(
- const SmartPtrCDynamicByteArray& payload);
-
- static SmartPtrCInstallProviderJobDoc getInstallProviderJob(
- const SmartPtrCDynamicByteArray& payload);
-
- static SmartPtrCUninstallProviderJobDoc getUninstallProviderJob(
- const SmartPtrCDynamicByteArray& payload);
-
- static SmartPtrCProviderRequestDoc getProviderRequest(
- const SmartPtrCDynamicByteArray& payload);
-
- static SmartPtrCProviderRegDoc getProviderReg(
- const SmartPtrCDynamicByteArray& payload);
-
- static SmartPtrCInstallRequestDoc getInstallRequest(
- const SmartPtrCDynamicByteArray& payload);
-
- static SmartPtrCMgmtRequestDoc getMgmtRequest(
- const SmartPtrCDynamicByteArray& payload);
-
-private:
- static SmartPtrCXmlElement bufferToXml(
- const SmartPtrCDynamicByteArray& payload,
- const std::string& payloadType = std::string());
-
- static std::string bufferToStr(
- const SmartPtrCDynamicByteArray& payload);
-
-private:
- CAF_CM_DECLARE_NOCREATE(CCafMessagePayloadParser);
-};
-
-}
-
-#endif // #ifndef CCafMessagePayloadParser_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef INTEGRATIONCAFLINK_H_
-#define INTEGRATIONCAFLINK_H_
-
-#ifndef INTEGRATIONCAF_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define INTEGRATIONCAF_LINKAGE __declspec(dllexport)
- #else
- #define INTEGRATIONCAF_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define INTEGRATIONCAF_LINKAGE
- #endif
-#endif
-
-#include "CCafMessagePayload.h"
-#include "CBeanPropertiesHelper.h"
-#include "CCafMessageHeadersWriter.h"
-#include "CCafMessageCreator.h"
-#include "CCafMessageHeaders.h"
-#include "CCafMessagePayloadParser.h"
-
-#endif /* INTEGRATIONCAFLINK_H_ */
+++ /dev/null
-/*
- * Created on: Jan 26, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CABSTRACTMESSAGECHANNEL_H_
-#define CABSTRACTMESSAGECHANNEL_H_
-
-namespace Caf {
-/**
- * Base class for {@link IMessageChannel} implementations providing common
- * properties and method implementations including {@link IChannelInterceptor interceptors}.
- */
-class INTEGRATIONCORE_LINKAGE CAbstractMessageChannel :
- public IMessageChannel,
- public IChannelInterceptorSupport {
-public:
- CAbstractMessageChannel();
- virtual ~CAbstractMessageChannel();
-
-public: // IMessageChannel
- bool send(
- const SmartPtrIIntMessage& message);
-
- bool send(
- const SmartPtrIIntMessage& message,
- const int32 timeout);
-
-public: // IChannelInterceptorSupport
- void setInterceptors(
- const IChannelInterceptorSupport::InterceptorCollection& interceptors);
-
-protected:
- /**
- * Subclasses must implement this method. A non-negative timeout indicates
- * how int32 to wait if the channel is at capacity. If the value is 0 it must
- * return immediately with or without success. A negative timeout value
- * indicates that the method should block until either the message is accepted
- * or the blocking thread is interrupted.
- */
- virtual bool doSend(
- const SmartPtrIIntMessage& message,
- int32 timeout) = 0;
-
-protected:
- std::list<SmartPtrIChannelInterceptor> getInterceptors() const;
-
-private:
- std::list<SmartPtrIChannelInterceptor> _interceptors;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CAbstractMessageChannel);
-};
-}
-
-#endif /* CABSTRACTMESSAGECHANNEL_H_ */
+++ /dev/null
-/*
- * Created on: Aug 9, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CAbstractMessageRouter_h
-#define CAbstractMessageRouter_h
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CAbstractMessageRouter : public IMessageRouter {
-public:
- CAbstractMessageRouter();
- virtual ~CAbstractMessageRouter();
-
- void init();
-
- void init(
- const SmartPtrIMessageChannel& defaultOutputChannel,
- const bool ignoreSendFailures,
- const int32 sendTimeout);
-
- virtual void routeMessage(
- const SmartPtrIIntMessage& message);
-
-protected:
- typedef std::deque<SmartPtrIMessageChannel> ChannelCollection;
- virtual ChannelCollection getTargetChannels(
- const SmartPtrIIntMessage& message) = 0;
-
-private:
- SmartPtrIMessageChannel _defaultOutputChannel;
- bool _ignoreSendFailures;
- int32 _sendTimeout;
-
-private:
- bool _isInitialized;
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CAbstractMessageRouter);
-};
-
-}
-
-#endif /* CAbstractMessageRouter_h */
+++ /dev/null
-/*
- * Created on: Jan 26, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CABSTRACTPOLLABLECHANNEL_H_
-#define CABSTRACTPOLLABLECHANNEL_H_
-
-#include "CAbstractMessageChannel.h"
-
-namespace Caf {
-
-/**
- * Base class for pollable channels
- */
-class INTEGRATIONCORE_LINKAGE CAbstractPollableChannel :
- public CAbstractMessageChannel,
- public IPollableChannel {
-public:
- CAbstractPollableChannel();
- virtual ~CAbstractPollableChannel();
-
-public:
- SmartPtrIIntMessage receive();
- SmartPtrIIntMessage receive(const int32 timeout);
- SmartPtrCPollerMetadata getPollerMetadata() const;
-
-protected:
- /**
- * Subclasses must implement this method. A non-negative timeout indicates
- * how int32 to wait if the channel is empty (if the value is 0, it must
- * return immediately with or without success). A negative timeout value
- * indicates that the method should block until either a message is
- * available or the blocking thread is interrupted.
- */
- virtual SmartPtrIIntMessage doReceive(const int32 timeout) = 0;
-
- void setPollerMetadata(const SmartPtrCPollerMetadata& pollerMetadata);
-
- void setPollerMetadata(const SmartPtrIDocument& pollerDoc);
-
-private:
- SmartPtrCPollerMetadata _pollerMetadata;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CAbstractPollableChannel);
-};
-}
-
-#endif /* CABSTRACTPOLLABLECHANNEL_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CBroadcastingDispatcher_h_
-#define CBroadcastingDispatcher_h_
-
-namespace Caf {
-
-/// Sends responses/errors back to the client.
-class INTEGRATIONCORE_LINKAGE CBroadcastingDispatcher :
- public IMessageDispatcher {
-public:
- CBroadcastingDispatcher();
- virtual ~CBroadcastingDispatcher();
-
-public:
- void initialize(
- const SmartPtrIErrorHandler& errorHandler);
-
-public: // IMessageDispatcher
- void addHandler(
- const SmartPtrIMessageHandler& messageHandler);
-
- void removeHandler(
- const SmartPtrIMessageHandler& messageHandler);
-
- bool dispatch(
- const SmartPtrIIntMessage& message);
-
-private:
- typedef std::map<const void*, SmartPtrIMessageHandler> CIntMessageHandlerCollection;
- CAF_DECLARE_SMART_POINTER(CIntMessageHandlerCollection);
-
-private:
- bool _isInitialized;
- SmartPtrIErrorHandler _errorHandler;
- SmartPtrCIntMessageHandlerCollection _messageHandlerCollection;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CBroadcastingDispatcher);
-};
-
-CAF_DECLARE_SMART_POINTER(CBroadcastingDispatcher);
-
-}
-
-#endif // #ifndef CBroadcastingDispatcher_h_
+++ /dev/null
-/*
- * Created on: Jan 25, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CCHANNELINTERCEPTORADAPTER_H_
-#define CCHANNELINTERCEPTORADAPTER_H_
-
-namespace Caf {
-
-/**
- * A {@link IChannelInterceptor} with no-op method implementations so that
- * subclasses do not have to implement all of th einterface's methods.
- */
-class INTEGRATIONCORE_LINKAGE CChannelInterceptorAdapter : public IChannelInterceptor {
-public:
- CChannelInterceptorAdapter();
- virtual ~CChannelInterceptorAdapter();
-
-public: // IChannelInterceptor
- virtual SmartPtrIIntMessage& preSend(
- SmartPtrIIntMessage& message,
- SmartPtrIMessageChannel& channel);
-
- virtual void postSend(
- SmartPtrIIntMessage& message,
- SmartPtrIMessageChannel& channel,
- bool sent);
-
- virtual bool preReceive(
- SmartPtrIMessageChannel& channel);
-
- virtual SmartPtrIIntMessage& postReceive(
- SmartPtrIIntMessage& message,
- SmartPtrIMessageChannel& channel);
-
-private:
- CAF_CM_DECLARE_NOCOPY(CChannelInterceptorAdapter);
-};
-
-}
-
-#endif /* CCHANNELINTERCEPTORADAPTER_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CChannelResolver_h_
-#define CChannelResolver_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CChannelResolver :
- public IChannelResolver {
-public:
- CChannelResolver();
- virtual ~CChannelResolver();
-
-public:
- void initialize(
- const SmartPtrCIntegrationObjectCollection& integrationObjectCollection);
-
-public: // IChannelResolver
- SmartPtrIMessageChannel resolveChannelName(
- const std::string& channelName) const;
-
- SmartPtrIIntegrationObject resolveChannelNameToObject(
- const std::string& channelName) const;
-
-private:
- bool _isInitialized;
- SmartPtrCIntegrationObjectCollection _integrationObjectCollection;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CChannelResolver);
-};
-
-CAF_DECLARE_SMART_POINTER(CChannelResolver);
-
-}
-
-#endif // #ifndef CChannelResolver_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CDocument_h_
-#define CDocument_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CDocument :
- public IDocument {
-public:
- CDocument();
- virtual ~CDocument();
-
-public:
- void initialize(const SmartPtrCXmlElement& xmlElement);
- SmartPtrCXmlElement getXmlElement() const;
-
-public: // IDocument
- std::string findRequiredAttribute(const std::string& name) const;
- std::string findOptionalAttribute(const std::string& name) const;
- SmartPtrIDocument findRequiredChild(const std::string& name) const;
- SmartPtrIDocument findOptionalChild(const std::string& name) const;
- SmartPtrCAttributeCollection getAllAttributes() const;
- SmartPtrCChildCollection getAllChildren() const;
- SmartPtrCOrderedChildCollection getAllChildrenInOrder() const;
- std::string getName() const;
- std::string getValue() const;
- std::string getPath() const;
-
-public: // IDocument Save operations
- void saveToFile(const std::string& filename) const;
- std::string saveToString() const;
- std::string saveToStringRaw() const;
-
-private:
- bool _isInitialized;
- SmartPtrCXmlElement _xmlElement;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CDocument);
-};
-
-CAF_DECLARE_SMART_POINTER(CDocument);
-}
-
-#endif // #ifndef CDocument_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CErrorHandler_h_
-#define CErrorHandler_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CErrorHandler :
- public IErrorHandler {
-public:
- CErrorHandler();
- virtual ~CErrorHandler();
-
-public:
- void initialize(
- const SmartPtrIChannelResolver& channelResolver,
- const SmartPtrIMessageChannel& errorMessageChannel);
-
-public: // IErrorHandler
- void handleError(
- const SmartPtrIThrowable& throwable,
- const SmartPtrIIntMessage& message) const;
-
-private:
- bool _isInitialized;
- SmartPtrIChannelResolver _channelResolver;
- SmartPtrIMessageChannel _errorMessageChannel;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CErrorHandler);
-};
-
-CAF_DECLARE_SMART_POINTER(CErrorHandler);
-}
-
-#endif // #ifndef CErrorHandler_h_
+++ /dev/null
-/*
- * Created on: Jul 23, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CEXPRESSIONHANDLER_H_
-#define CEXPRESSIONHANDLER_H_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CExpressionHandler {
-public:
- CExpressionHandler();
- virtual ~CExpressionHandler();
-
- void init(
- const SmartPtrIAppConfig& appConfig,
- const SmartPtrIAppContext& appContext,
- const std::string& expression);
-
- SmartPtrIVariant evaluate(const SmartPtrIIntMessage& message);
-
- std::string getBeanName() const;
-
- std::string getMethodName() const;
-
- Cdeqstr getMethodParameters() const;
-
- std::string toString() const;
-
-private:
- bool _isInitialized;
- SmartPtrIExpressionInvoker _invoker;
- std::string _beanName;
- std::string _methodName;
- Cdeqstr _methodParams;
-
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CExpressionHandler);
-};
-CAF_DECLARE_SMART_POINTER(CExpressionHandler);
-
-}
-
-#endif /* CEXPRESSIONHANDLER_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CIntException_h_
-#define CIntException_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CIntException :
- public IThrowable {
-public:
- CIntException();
- virtual ~CIntException();
-
-public:
- void initialize(const CCafException* cafException);
-
-public: // IThrowable
- std::string getExceptionClassName() const;
- std::string getMsg() const;
- std::string getClassName() const;
- std::string getFuncName() const;
- HRESULT getError() const;
- std::deque<std::string>* getBacktrace() const;
- std::string getFullMsg() const;
-
-private:
- bool _isInitialized;
- std::string _exceptionClassName;
- HRESULT _errorCode;
- std::string _message;
- std::string _className;
- std::string _funcName;
- std::deque<std::string>* _backtrace;
- std::string _fullMsg;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CIntException);
-};
-
-CAF_DECLARE_SMART_POINTER(CIntException);
-
-#define CAF_CM_DECLARE_INTEGRATION_EXCEPTION_CLASS(_exclass_) \
-class INTEGRATIONCORE_LINKAGE _exclass_ : public Caf::CCafException { \
-public: \
- _exclass_(); \
- virtual ~_exclass_(); \
- void throwSelf(); \
-private: \
- _exclass_(const _exclass_ &); \
- _exclass_ & operator=(const _exclass_ &); \
-};
-
-// Exceptions specific to integration
-CAF_CM_DECLARE_INTEGRATION_EXCEPTION_CLASS(FatalListenerStartupException)
-
-CAF_CM_DECLARE_INTEGRATION_EXCEPTION_CLASS(ListenerExecutionFailedException)
-
-CAF_CM_DECLARE_INTEGRATION_EXCEPTION_CLASS(MessageDeliveryException)
-
-}
-
-#endif // #ifndef CIntException_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CIntMessage_h_
-#define CIntMessage_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CIntMessage :
- public IIntMessage {
-public:
- static SmartPtrCHeaders mergeHeaders(
- const SmartPtrCHeaders& newHeaders,
- const SmartPtrCHeaders& origHeaders);
-
-public:
- CIntMessage();
- virtual ~CIntMessage();
-
-public:
- void initializeStr(
- const std::string& payloadStr,
- const SmartPtrCHeaders& newHeaders,
- const SmartPtrCHeaders& origHeaders);
-
- void initialize(
- const SmartPtrCDynamicByteArray& payload,
- const SmartPtrCHeaders& newHeaders,
- const SmartPtrCHeaders& origHeaders);
-
-public: // IIntMessage
- SmartPtrCDynamicByteArray getPayload() const;
-
- std::string getPayloadStr() const;
-
- UUID getMessageId() const;
-
- std::string getMessageIdStr() const;
-
- SmartPtrCHeaders getHeaders() const;
-
- SmartPtrIVariant findOptionalHeader(
- const std::string& key) const;
-
- SmartPtrIVariant findRequiredHeader(
- const std::string& key) const;
-
- std::string findOptionalHeaderAsString(
- const std::string& key) const;
-
- std::string findRequiredHeaderAsString(
- const std::string& key) const;
-
- SmartPtrICafObject findOptionalObjectHeader(
- const std::string& key) const;
-
- SmartPtrICafObject findRequiredObjectHeader(
- const std::string& key) const;
-
-private:
- bool _isInitialized;
- UUID _messageId;
- SmartPtrCDynamicByteArray _payload;
- SmartPtrCHeaders _headers;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CIntMessage);
-};
-
-CAF_DECLARE_SMART_POINTER(CIntMessage);
-
-}
-
-#endif // #ifndef _IntegrationContracts_CIntMessage_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CIntMessageHeaders_h_
-#define CIntMessageHeaders_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CIntMessageHeaders {
-public:
- CIntMessageHeaders();
- virtual ~CIntMessageHeaders();
-
-public:
- IIntMessage::SmartPtrCHeaders getHeaders() const;
-
- void clear();
-
- void insertString(
- const std::string& key,
- const std::string& value);
-
- void insertStringOpt(
- const std::string& key,
- const std::string& value);
-
- void insertInt64(
- const std::string& key,
- const int64& value);
-
- void insertUint64(
- const std::string& key,
- const uint64& value);
-
- void insertInt32(
- const std::string& key,
- const int32& value);
-
- void insertUint32(
- const std::string& key,
- const uint32& value);
-
- void insertInt16(
- const std::string& key,
- const int16& value);
-
- void insertUint16(
- const std::string& key,
- const uint16& value);
-
- void insertUint8(
- const std::string& key,
- const uint8& value);
-
- void insertBool(
- const std::string& key,
- const bool& value);
-
- void insertVariant(
- const std::string& key,
- const SmartPtrIVariant& variant);
-
- void insertObject(
- const std::string& key,
- const SmartPtrICafObject& cafObject);
-
-private:
- IIntMessage::SmartPtrCHeaders _headers;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CIntMessageHeaders);
-};
-
-CAF_DECLARE_SMART_POINTER(CIntMessageHeaders);
-
-}
-
-#endif // #ifndef _IntegrationContracts_CIntMessageHeaders_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CIntegrationAppContext_h_
-#define CIntegrationAppContext_h_
-
-#include "../../Common/CApplicationContext.h"
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CIntegrationAppContext :
- public IIntegrationAppContext,
- public IAppContext,
- public IChannelResolver {
-public:
- CIntegrationAppContext();
- virtual ~CIntegrationAppContext();
-
-public:
- void initialize(const uint32 timeoutMs);
- void initialize(const uint32 timeoutMs, const std::string& beanConfigPath);
- void initializeTwoPhase(const uint32 timeoutMs, const std::string& beanConfigPath);
- void terminate(const uint32 timeoutMs);
-
-public: // IIntegrationAppContext
- void startLifecycleBeans();
- SmartPtrIIntegrationObject getIntegrationObject(const std::string& id) const;
- void getIntegrationObject(const IID& iid, void **ppv) const;
- SmartPtrCObjectCollection getIntegrationObjects(const IID& iid) const;
-
-public: // IAppContext
- SmartPtrIBean getBean(const std::string& name) const;
-
-public: // IChannelResolver
- SmartPtrIMessageChannel resolveChannelName(
- const std::string& channelName) const;
-
- SmartPtrIIntegrationObject resolveChannelNameToObject(
- const std::string& channelName) const;
-
-private:
- typedef std::multimap<int32, SmartPtrILifecycle> LifecycleBeans;
-
-private:
- void initializeRaw(
- const uint32 timeoutMs,
- const std::string& beanConfigPath,
- const bool startLifecycleBeans);
-
- SmartPtrCIntegrationObjectCollection assign(
- const IAppContext::SmartPtrCBeans& contextBeans,
- const Cdeqstr& beanConfigPathCollection) const;
-
- void injectChannelInterceptors(
- const SmartPtrCIntegrationObjectCollection& integrationObjectCollection) const;
-
- void wire(
- const SmartPtrIAppContext& appContext,
- const SmartPtrCIntegrationObjectCollection& integrationObjectCollection,
- const SmartPtrCChannelResolver& channelResolver) const;
-
- void startStop(
- const LifecycleBeans& lifecycleBeans,
- const uint32 timeoutMs,
- const bool isStart) const;
-
- SmartPtrCXmlElement getBeanConfigRoot() const;
-
- void addBuiltIn(
- const std::string& beanId,
- const IAppContext::SmartPtrCBeans& beans,
- SmartPtrCIntegrationObjectCollection& integrationObjectCollection) const;
-
- std::string getDefaultBeanConfigPath() const;
-
- Cdeqstr getBeanConfigFiles(
- const std::string& beanConfigPath) const;
-
-private:
- class CIntegrationAppContextWeakReference : public IIntegrationAppContext {
- public:
- CIntegrationAppContextWeakReference();
-
- void set(CIntegrationAppContext *context);
-
- SmartPtrIIntegrationObject getIntegrationObject(
- const std::string& id) const;
-
- void getIntegrationObject(
- const IID& iid,
- void **ppv) const;
-
- IIntegrationAppContext::SmartPtrCObjectCollection getIntegrationObjects(
- const IID& iid) const;
-
- private:
- CIntegrationAppContext *_context;
- CAF_CM_CREATE;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(CIntegrationAppContextWeakReference);
- };
- CAF_DECLARE_SMART_POINTER(CIntegrationAppContextWeakReference);
-
-private:
- bool _isInitialized;
- bool _isIntegrationObjectCollectionReady;
- bool _lifecycleBeansStarted;
- uint32 _timeoutMs;
- SmartPtrCApplicationContext _applicationContext;
- SmartPtrCChannelResolver _channelResolver;
- SmartPtrCIntegrationObjectCollection _integrationObjectCollection;
- SmartPtrCIntegrationAppContextWeakReference _weakSelfReference;
- LifecycleBeans _lifecycleBeans;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CIntegrationAppContext);
-};
-
-CAF_DECLARE_SMART_POINTER(CIntegrationAppContext);
-
-}
-
-#endif // #ifndef CIntegrationAppContext_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CMessageHandler_h_
-#define CMessageHandler_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CMessageHandler : public IMessageHandler {
-public:
- CMessageHandler();
- virtual ~CMessageHandler();
-
-public:
- void initialize(
- const std::string& inputId,
- const SmartPtrIMessageChannel& outputMessageChannel,
- const SmartPtrICafObject& messageHandlerObj);
-
-public:
- std::string getInputId() const;
-
-public: // IMessageHandler
- void handleMessage(
- const SmartPtrIIntMessage& message);
- SmartPtrIIntMessage getSavedMessage() const;
- void clearSavedMessage();
-
-private:
- bool _isInitialized;
- std::string _inputId;
- SmartPtrIIntMessage _savedMessage;
-
- SmartPtrIMessageChannel _outputMessageChannel;
- SmartPtrITransformer _transformer;
- SmartPtrIMessageProcessor _messageProcessor;
- SmartPtrIErrorProcessor _errorProcessor;
- SmartPtrIMessageSplitter _messageSplitter;
- SmartPtrIMessageRouter _messageRouter;
- SmartPtrIMessageHandler _messageHandler;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CMessageHandler);
-};
-
-CAF_DECLARE_SMART_POINTER(CMessageHandler);
-
-}
-
-#endif // #ifndef CMessageHandler_h_
+++ /dev/null
-/*
- * Created on: Nov 19, 2014
- * Author: bwilliams
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- *
- */
-
-#ifndef CMessageHeaderUtils_h_
-#define CMessageHeaderUtils_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CMessageHeaderUtils {
-public:
- static std::string getStringReq(
- const IIntMessage::SmartPtrCHeaders& headers,
- const std::string& tag);
-
- static std::string getStringOpt(
- const IIntMessage::SmartPtrCHeaders& headers,
- const std::string& tag);
-
- static uint8 getUint8Req(
- const IIntMessage::SmartPtrCHeaders& headers,
- const std::string& tag);
-
- static uint8 getUint8Opt(
- const IIntMessage::SmartPtrCHeaders& headers,
- const std::string& tag);
-
- static uint16 getUint16Req(
- const IIntMessage::SmartPtrCHeaders& headers,
- const std::string& tag);
-
- static uint16 getUint16Opt(
- const IIntMessage::SmartPtrCHeaders& headers,
- const std::string& tag);
-
- static uint32 getUint32Req(
- const IIntMessage::SmartPtrCHeaders& headers,
- const std::string& tag);
-
- static uint32 getUint32Opt(
- const IIntMessage::SmartPtrCHeaders& headers,
- const std::string& tag);
-
- static uint64 getUint64Req(
- const IIntMessage::SmartPtrCHeaders& headers,
- const std::string& tag);
-
- static uint64 getUint64Opt(
- const IIntMessage::SmartPtrCHeaders& headers,
- const std::string& tag);
-
- static bool getBoolReq(
- const IIntMessage::SmartPtrCHeaders& headers,
- const std::string& tag);
-
- static bool getBoolOpt(
- const IIntMessage::SmartPtrCHeaders& headers,
- const std::string& tag);
-
- static void log(
- const IIntMessage::SmartPtrCHeaders& headers,
- const log4cpp::Priority::PriorityLevel priorityLevel = log4cpp::Priority::DEBUG);
-
-private:
- CAF_CM_DECLARE_NOCREATE(CMessageHeaderUtils);
-};
-
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CMessagingTemplate_h_
-#define CMessagingTemplate_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CMessagingTemplate :
- public ILifecycle {
-public:
- CMessagingTemplate();
- virtual ~CMessagingTemplate();
-
-public:
- void initialize(
- const SmartPtrIChannelResolver& channelResolver,
- const SmartPtrIIntegrationObject& inputIntegrationObject,
- const SmartPtrIMessageChannel& errorMessageChannel,
- const SmartPtrIMessageChannel& outputMessageChannel,
- const SmartPtrICafObject& messageHandlerObj);
-
-public: // ILifecycle
- void start(const uint32 timeoutMs);
- void stop(const uint32 timeoutMs);
- bool isRunning() const;
-
-private:
- bool _isInitialized;
- bool _isRunning;
- std::string _inputId;
-
- SmartPtrISubscribableChannel _inputSubscribableChannel;
- SmartPtrCMessagingTemplateHandler _messagingTemplateHandler;
- SmartPtrITaskExecutor _taskExecutor;
-
-private:
- SmartPtrITaskExecutor createTaskExecutor(
- const SmartPtrIChannelResolver& channelResolver,
- const SmartPtrCMessageHandler& messageHandler,
- const SmartPtrIPollableChannel& inputPollableChannel,
- const SmartPtrIMessageChannel& errorMessageChannel) const;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CMessagingTemplate);
-};
-
-CAF_DECLARE_SMART_POINTER(CMessagingTemplate);
-
-}
-
-#endif // #ifndef CMessagingTemplate_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CMessagingTemplateHandler_h_
-#define CMessagingTemplateHandler_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CMessagingTemplateHandler :
- public IMessageHandler {
-public:
- CMessagingTemplateHandler();
- virtual ~CMessagingTemplateHandler();
-
-public:
- void initialize(
- const SmartPtrIMessageHandler& messageHandler);
-
-public: // IMessageHandler
- void handleMessage(
- const SmartPtrIIntMessage& message);
- SmartPtrIIntMessage getSavedMessage() const;
- void clearSavedMessage();
-
-private:
- bool _isInitialized;
-
- SmartPtrIMessageHandler _messageHandler;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CMessagingTemplateHandler);
-};
-
-CAF_DECLARE_SMART_POINTER(CMessagingTemplateHandler);
-
-}
-
-#endif // #ifndef CMessagingTemplateHandler_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CSimpleAsyncTaskExecutor_h_
-#define CSimpleAsyncTaskExecutor_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CSimpleAsyncTaskExecutor :
- public ITaskExecutor {
-public:
- CSimpleAsyncTaskExecutor();
- virtual ~CSimpleAsyncTaskExecutor();
-
-public:
- void initialize(
- const SmartPtrIRunnable& runnable,
- const SmartPtrIErrorHandler& errorHandler);
-
-public: // ITaskExecutor
- void execute(const uint32 timeoutMs);
- void cancel(const uint32 timeoutMs);
- ETaskState getState() const;
-
-private:
- static void* threadFunc(void* data);
-
-private:
- bool _isInitialized;
- GThread* _thread;
- SmartPtrCSimpleAsyncTaskExecutorState _state;
- typedef std::pair<SmartPtrCAutoMutex, CSimpleAsyncTaskExecutorState*> CThreadData;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_THREADSIGNAL_CREATE;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(CSimpleAsyncTaskExecutor);
-};
-
-CAF_DECLARE_SMART_POINTER(CSimpleAsyncTaskExecutor);
-
-}
-
-#endif // #ifndef CSimpleAsyncTaskExecutor_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CSimpleAsyncTaskExecutorState_h_
-#define CSimpleAsyncTaskExecutorState_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CSimpleAsyncTaskExecutorState {
-public:
- CSimpleAsyncTaskExecutorState();
- virtual ~CSimpleAsyncTaskExecutorState();
-
-public:
- void initialize(
- const SmartPtrIRunnable& runnable,
- const SmartPtrIErrorHandler& errorHandler);
-
- SmartPtrIRunnable getRunnable() const;
- SmartPtrIErrorHandler getErrorHandler() const;
-
- ITaskExecutor::ETaskState getState() const;
- std::string getStateStr() const;
- void setState(const ITaskExecutor::ETaskState runnableState);
-
- bool getHasThreadExited();
- void setThreadExited();
-
- void signalStart();
- void waitForStart(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs);
-
- void signalStop();
- void waitForStop(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs);
-
-private:
- bool _isInitialized;
- bool _hasThreadExited;
- ITaskExecutor::ETaskState _runnableState;
- SmartPtrIRunnable _runnable;
- SmartPtrIErrorHandler _errorHandler;
- std::string _exceptionMessage;
-
- CThreadSignal _threadSignalStart;
- CThreadSignal _threadSignalStop;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(CSimpleAsyncTaskExecutorState);
-};
-
-CAF_DECLARE_SMART_POINTER(CSimpleAsyncTaskExecutorState);
-
-}
-
-#endif // #ifndef CSimpleAsyncTaskExecutorState_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CSourcePollingChannelAdapter_h_
-#define CSourcePollingChannelAdapter_h_
-
-namespace Caf {
-
-class INTEGRATIONCORE_LINKAGE CSourcePollingChannelAdapter :
- public IRunnable {
-public:
- CSourcePollingChannelAdapter();
- virtual ~CSourcePollingChannelAdapter();
-
-public:
- void initialize(
- const SmartPtrIMessageHandler& messageHandler,
- const SmartPtrIPollableChannel& inputPollableChannel,
- const SmartPtrIErrorHandler& errorHandler);
-
- void initialize(
- const SmartPtrIMessageHandler& messageHandler,
- const SmartPtrIPollableChannel& inputPollableChannel,
- const SmartPtrIErrorHandler& errorHandler,
- const int32 timeout);
-
-public: // IRunnable
- void run();
- void cancel();
-
-private:
- bool getIsCancelled() const;
-
-private:
- bool _isInitialized;
- bool _isCancelled;
- bool _isTimeoutSet;
- int32 _timeout;
- SmartPtrIMessageHandler _messageHandler;
- SmartPtrIPollableChannel _inputPollableChannel;
- SmartPtrIErrorHandler _errorHandler;
- SmartPtrCPollerMetadata _pollerMetadata;
- CThreadSignal _threadSignalCancel;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_CREATE_THREADSAFE;
- CAF_THREADSIGNAL_CREATE;
- CAF_CM_DECLARE_NOCOPY(CSourcePollingChannelAdapter);
-};
-
-CAF_DECLARE_SMART_POINTER(CSourcePollingChannelAdapter);
-
-}
-
-#endif // #ifndef CSourcePollingChannelAdapter_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CUnicastingDispatcher_h_
-#define CUnicastingDispatcher_h_
-
-namespace Caf {
-
-/// Sends responses/errors back to the client.
-class INTEGRATIONCORE_LINKAGE CUnicastingDispatcher :
- public IMessageDispatcher {
-public:
- CUnicastingDispatcher();
- virtual ~CUnicastingDispatcher();
-
-public:
- void initialize(
- const SmartPtrIErrorHandler& errorHandler);
-
-public: // IMessageDispatcher
- void addHandler(
- const SmartPtrIMessageHandler& messageHandler);
-
- void removeHandler(
- const SmartPtrIMessageHandler& messageHandler);
-
- bool dispatch(
- const SmartPtrIIntMessage& message);
-
-private:
- typedef std::map<const void*, SmartPtrIMessageHandler> CIntMessageHandlerCollection;
- CAF_DECLARE_SMART_POINTER(CIntMessageHandlerCollection);
-
-private:
- bool _isInitialized;
- SmartPtrIErrorHandler _errorHandler;
- SmartPtrCIntMessageHandlerCollection _messageHandlerCollection;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CUnicastingDispatcher);
-};
-
-CAF_DECLARE_SMART_POINTER(CUnicastingDispatcher);
-
-}
-
-#endif // #ifndef CUnicastingDispatcher_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef FileHeadersInc_h_
-#define FileHeadersInc_h_
-
-namespace Caf {
- namespace FileHeaders {
- extern INTEGRATIONCORE_LINKAGE const char* _sFILENAME;
- extern INTEGRATIONCORE_LINKAGE const char* _sORIGINAL_FILE;
- }
-}
-
-#endif // #ifndef FileHeadersInc_h_
-
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef INTEGRATIONCORELINK_H_
-#define INTEGRATIONCORELINK_H_
-
-#ifndef INTEGRATIONCORE_LINKAGE
- #ifdef WIN32
- #ifdef FRAMEWORK_BUILD
- #define INTEGRATIONCORE_LINKAGE __declspec(dllexport)
- #else
- #define INTEGRATIONCORE_LINKAGE __declspec(dllimport)
- #endif
- #else
- #define INTEGRATIONCORE_LINKAGE
- #endif
-#endif
-
-#include "FileHeaders.h"
-#include "MessageHeaders.h"
-#include "CIntMessageHeaders.h"
-#include "CIntMessage.h"
-#include "CDocument.h"
-#include "CMessageHandler.h"
-#include "CErrorHandler.h"
-#include "CIntException.h"
-#include "CChannelResolver.h"
-#include "CIntegrationAppContext.h"
-#include "CSimpleAsyncTaskExecutorState.h"
-#include "CSimpleAsyncTaskExecutor.h"
-#include "CSourcePollingChannelAdapter.h"
-#include "CBroadcastingDispatcher.h"
-#include "CUnicastingDispatcher.h"
-#include "CChannelInterceptorAdapter.h"
-#include "CAbstractMessageChannel.h"
-#include "CAbstractPollableChannel.h"
-#include "CMessagingTemplateHandler.h"
-#include "CMessagingTemplate.h"
-#include "CExpressionHandler.h"
-#include "CAbstractMessageRouter.h"
-#include "CMessageHeaderUtils.h"
-
-#endif /* INTEGRATIONCORELINK_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef MessageHeadersInc_h_
-#define MessageHeadersInc_h_
-
-namespace Caf {
- namespace MessageHeaders {
- // UUID stored as a string
- extern INTEGRATIONCORE_LINKAGE const char* _sID;
-
- // int64
- extern INTEGRATIONCORE_LINKAGE const char* _sTIMESTAMP;
-
- // string
- extern INTEGRATIONCORE_LINKAGE const char* _sCORRELATION_ID;
-
- // string
- extern INTEGRATIONCORE_LINKAGE const char* _sREPLY_CHANNEL;
-
- // string
- extern INTEGRATIONCORE_LINKAGE const char* _sERROR_CHANNEL;
-
- // int64
- extern INTEGRATIONCORE_LINKAGE const char* _sEXPIRATION_DATE;
-
- // int32
- extern INTEGRATIONCORE_LINKAGE const char* _sPRIORITY;
-
- // int32
- extern INTEGRATIONCORE_LINKAGE const char* _sSEQUENCE_NUMBER;
-
- // int32
- extern INTEGRATIONCORE_LINKAGE const char* _sSEQUENCE_SIZE;
-
- extern INTEGRATIONCORE_LINKAGE const char* _sIS_THROWABLE;
-
- // string
- extern INTEGRATIONCORE_LINKAGE const char* _sREQUEST_ID;
-
- // boolean
- extern INTEGRATIONCORE_LINKAGE const char* _sMULTIPART;
-
- // string
- extern INTEGRATIONCORE_LINKAGE const char* _sMULTIPART_WORKING_DIR;
-
- // string
- extern INTEGRATIONCORE_LINKAGE const char* _sMESSAGE_TYPE;
-
- // string
- extern INTEGRATIONCORE_LINKAGE const char* _sPROTOCOL_TYPE;
-
- // string
- extern INTEGRATIONCORE_LINKAGE const char* _sPROTOCOL_CONNSTR;
- }
-};
-
-#endif // #ifndef MessageHeadersInc_h_
-
+++ /dev/null
-log4j.rootCategory=DEBUG, myfile
-log4j.category.CTest1=NOTSET
-
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.layout=org.apache.log4j.BasicLayout
-
-log4j.appender.myfile=org.apache.log4j.FileAppender
-log4j.appender.myfile.fileName=log4cpp_file.log
-#log4j.appender.myfile.layout=org.apache.log4j.BasicLayout
-#log4j.appender.myfile.layout=org.apache.log4j.SimpleLayout
-log4j.appender.myfile.layout=org.apache.log4j.PatternLayout
-log4j.appender.myfile.layout.ConversionPattern=%p|%d{ISO8601}|%t|%c|%m%n
-#log4j.appender.myfile.layout.ConversionPattern=c=%c|d=%d|m=%m|p=%p|r=%r|t=%t|x=%x|%n
-#log4j.appender.myfile.layout.ConversionPattern=%-6r [%15.15t] %-5p %30.30c %x - %m%n
-
-log4j.appender.rolling=org.apache.log4j.RollingFileAppender
-log4j.appender.rolling.fileName=log4cpp_rolling.log
-
-log4j.appender.rolling.MaxFileSize=100KB
-# Keep one backup file
-log4j.appender.rolling.MaxBackupIndex=1
-
-log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
-log4j.appender.rolling.layout.ConversionPattern=%-6r [%15.15t] %-5p %30.30c %x - %m%n
+++ /dev/null
-///////////////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Michael Donahue
-//
-// Created: 05/03/2004
-//
-// Copyright (c) 2011 Vmware, Inc. All rights reserved.
-// -- VMware Confidential
-//
-///////////////////////////////////////////////////////////////////////////////////////////
-
-#ifndef DynamicArrayInc_h_
-#define DynamicArrayInc_h_
-
-#include "SDynamicArrayMallocAllocator.h"
-
-namespace Caf {
-
-template<typename T, typename Allocator = SDynamicArrayMallocAllocator>
-class TDynamicArray;
-
-template<typename T>
-class TCharAdapter;
-
-template<typename T>
-class TWCharAdapter;
-
-template<typename T>
-class TByteAdapter;
-
-typedef TDynamicArray<byte> CDynamicByteArray;
-typedef TCharAdapter<TByteAdapter<TDynamicArray<char> > > CDynamicCharArray;
-typedef TWCharAdapter<TByteAdapter<TDynamicArray<wchar_t> > > CDynamicWCharArray;
-
-}
-
-#include "TDynamicArray.h"
-#include "TByteAdapter.h"
-#include "TCharAdapter.h"
-#include "TWCharAdapter.h"
-
-namespace Caf {
-
-CAF_DECLARE_SMART_POINTER(CDynamicByteArray);
-CAF_DECLARE_SMART_POINTER(CDynamicCharArray);
-CAF_DECLARE_SMART_POINTER(CDynamicWCharArray);
-
-}
-
-#endif // #ifdef DynamicArrayInc_h_
+++ /dev/null
-/*
- * Author: mdonahue
- * Created: Feb 15, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef SDYNAMICARRAYMALLOCALLOCATOR_H_
-#define SDYNAMICARRAYMALLOCALLOCATOR_H_
-
-namespace Caf {
-
-struct SDynamicArrayMallocAllocator {
- static void* allocMemory( const uint32 cdwAllocSize )
- {
- return ::malloc( cdwAllocSize );
- }
-
- static void freeMemory( void* pvFree )
- {
- if ( NULL != pvFree )
- {
- ::free( pvFree );
- }
- }
-};
-}
-
-#endif /* SDYNAMICARRAYMALLOCALLOCATOR_H_ */
+++ /dev/null
-//////////////////////////////////////////////////////////////////////////////
-//
-// $Workfile: TByteAdapter.h $
-//
-// Author: Phil Smith
-//
-// Purpose: This template provides the ability to use a ${TDynamicArray}
-// or a TStaticArray where a byte pointer is required. It
-// provides a const byte* pointer conversion operator for use
-// when read only access is required and a function to get the
-// pointer for write access. Use the byte adapter as follows:
-// TByteAdapter<TDynamicArray<typename T> >
-//
-// Predefined character array objects CEcmCharArray and
-// CEcmWCharArray which use the byte adapter have been provided
-// in EcmCommonStaticMinDepInc.h.
-//
-// Created: Tuesday, August 20, 2002 10:00:00 AM
-//
-// Copyright (c) 2011 Vmware, Inc. All rights reserved.
-// -- VMware Confidential
-//
-// Modification History:
-//
-// $Log: //wpbuild01/PvcsData/ECM_40/archives/ECM_41/WinNT/Source/CommonAgtCol/Cpp/EcmCommonStaticMinDep/TByteAdapter.h-arc $
-//
-// Rev 1.4 17 Sep 2003 09:43:12 Michael.Donahue
-// Implemented hooks for new library model
-//
-// Rev 1.3 31 Oct 2002 13:58:02 Greg.Burk
-// Modified as per code review recomendations.
-//
-// Rev 1.2 15 Oct 2002 17:22:58 Phillip.Smith
-// Documentation updates.
-//
-// Rev 1.0 09 Oct 2002 13:42:12 brian.williams
-// Initial revision.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef _TByteAdapter_H_
-#define _TByteAdapter_H_
-
-namespace Caf {
-
-template<typename T>
-class TByteAdapter : public T
-{
-public:
- //////////////////////////////////////////////////////////////////////////
- // Default Constructor
- //////////////////////////////////////////////////////////////////////////
- TByteAdapter(const wchar_t * pwszDesc = NULL) {}
-
- //////////////////////////////////////////////////////////////////////////
- // Destructor
- //////////////////////////////////////////////////////////////////////////
- ~TByteAdapter() {}
-
- //////////////////////////////////////////////////////////////////////////
- // GetNonConstBytePtr
- //
- // Get non-const pointer to internal data converted to btye *.
- // This function should be used only when you must get a pointer that is
- // to be written to, and you should always call the ${TDynamicArray::Verify()}
- // function after modifying the data pointed to by this pointer or passing
- // the pointer to a function that modifies the data pointed to by this
- // pointer.
- //////////////////////////////////////////////////////////////////////////
- byte * getNonConstBytePtr()
- {
- this->verify();
- return reinterpret_cast<byte*>(this->getNonConstPtr());
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetBytePtr
- //
- // Get const pointer to internal data converted to btye *.
- //////////////////////////////////////////////////////////////////////////
- const byte * getBytePtr() const
- {
- this->verify();
- return reinterpret_cast<const byte*>(this->getPtr());
- }
-
- //////////////////////////////////////////////////////////////////////////
- // const byte Conversion Operator
- //
- // Get const pointer to internal data converted to btye *.
- //////////////////////////////////////////////////////////////////////////
- operator const byte * () const
- {
- this->verify();
- return reinterpret_cast<const byte*>(this->getPtr());
- }
-
-private:
- TByteAdapter(const TByteAdapter & crRhs);
- TByteAdapter & operator=(const TByteAdapter & crRhs);
-};
-
-}
-
-#endif // _TByteAdapter_H_
+++ /dev/null
-//////////////////////////////////////////////////////////////////////////////
-//
-// $Workfile: TCharAdapter.h $
-//
-// Author: Greg Burk
-//
-// Purpose: This template provides an adapter for TDynamicArray (or
-// other types of "safe" array classes) that exposes functions
-// that are useful when working with an array of type char.
-//
-// A typedef of this class is already defined and should be
-// used instead of explicitly using this class. The typedef
-// is CEcmCharArray.
-//
-// Created: Friday, October 18, 2002 1:50:32 PM
-//
-// Copyright (c) 2011 Vmware, Inc. All rights reserved.
-// -- VMware Confidential
-//
-// Modification History:
-//
-// $Log: //wpbuild01/PvcsData/ECM_40/archives/ECM_41/WinNT/Source/CommonAgtCol/Cpp/EcmCommonStaticMinDep/TCharAdapter.h-arc $
-//
-// Rev 1.3 10 Oct 2003 08:49:24 Michael.Donahue
-// Fixed bug in StrCpy
-//
-// Rev 1.2 17 Sep 2003 09:43:12 Michael.Donahue
-// Implemented hooks for new library model
-//
-// Rev 1.1 16 Jan 2003 11:17:52 Greg.Burk
-// Made changes necessary to accomodate new CEcmBasicString class and changes to CEcmString.
-//
-// Rev 1.0 31 Oct 2002 10:43:06 Greg.Burk
-// Initial Revision
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef _TCharAdapter_H_
-#define _TCharAdapter_H_
-
-#include <string.h>
-
-namespace Caf {
-
-template<typename T>
-class TCharAdapter : public T
-{
-public:
- //////////////////////////////////////////////////////////////////////////
- // Default Constructor
- //////////////////////////////////////////////////////////////////////////
- TCharAdapter() {}
-
- //////////////////////////////////////////////////////////////////////////
- // Conversion Constructor
- //////////////////////////////////////////////////////////////////////////
- TCharAdapter(const wchar_t * rhs)
- {
- wideToMultiByte(rhs);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // Conversion Constructor
- //////////////////////////////////////////////////////////////////////////
- TCharAdapter(const char * rhs)
- {
- (*this) = rhs;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // Destructor
- //////////////////////////////////////////////////////////////////////////
- ~TCharAdapter() {}
-
- //////////////////////////////////////////////////////////////////////////
- // Assignment operator
- //////////////////////////////////////////////////////////////////////////
- TCharAdapter& operator=(const wchar_t * rhs)
- {
- wideToMultiByte(rhs);
- return *this;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // Assignment operator
- //////////////////////////////////////////////////////////////////////////
- TCharAdapter& operator=(const char * rhs)
- {
- const uint32 culLength = ::strlen(rhs);
-
- if(culLength > 0)
- {
- this->allocateELements(culLength);
- strnCpy(rhs, culLength);
- }
-
- return *this;
- }
-
- //////////////////////////////////////////////////////////////////////////////
- // MakeLower()
- //
- // Converts all of the upper-case characters in this string to lower-case.
- //////////////////////////////////////////////////////////////////////////////
- void makeLower()
- {
- // Pre-validation.
- this->verifySentinal();
-
- if(!this->IsNull())
- {
- strlwr(this->m_ptData);
- }
-
- // Post-validation.
- this->verifySentinal();
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MakeUpper
- //
- // Converts all of the lower-case characters in this array to upper-case.
- //////////////////////////////////////////////////////////////////////////
- void makeUpper()
- {
- // Pre-validation.
- this->verifySentinal();
-
- if(!this->isNull())
- {
- strupr(this->m_ptData);
- }
-
- // Post-validation.
- this->verifySentinal();
- }
-
- //////////////////////////////////////////////////////////////////////////
- // Reverse
- //
- // Reverses the characters in the array.
- //////////////////////////////////////////////////////////////////////////
- void reverse()
- {
- // Pre-validation.
- this->verifySentinal();
-
- if(!this->isNull())
- {
- strrev( this->m_ptData );
- }
-
- // Post-validation.
- this->verifySentinal();
- }
-
- //////////////////////////////////////////////////////////////////////////
- // StrLen
- //
- // Return the length of the string.
- //////////////////////////////////////////////////////////////////////////
- size_t strLen() const
- {
- size_t stRetVal = 0;
-
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Delegate to CEcmCtr.
- stRetVal = ::strlen(this->m_ptData);
-
- // Post-validation.
- this->verifyLength(static_cast<uint32>(stRetVal));
-
- return stRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // StrCpy
- //
- // Make a copy of the string into the buffer.
- //////////////////////////////////////////////////////////////////////////
- TCharAdapter & strCpy(const char * cpszSource)
- {
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Get the length of the source string.
- uint32 dwSourceLength = ::strlen(cpszSource);
-
- // Make sure the string will fit if we copy it.
- this->verifyLength(dwSourceLength);
-
- // Copy the string into the buffer.
- ::strcpy(this->m_ptData, cpszSource);
-
- // Post-validation.
- this->verifySentinal();
-
- return (*this);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // StrnCpy
- //
- // Make a copy of the string into the buffer upto culCount characters.
- //////////////////////////////////////////////////////////////////////////
- TCharAdapter & strnCpy(const char * cpszSource, const uint32 culCount)
- {
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Make sure the string will fit if we copy it.
- this->verifyLength(culCount);
-
- // Copy the string into the buffer.
- ::strncpy(this->m_ptData, cpszSource, culCount);
-
- // Post-validation.
- this->verifySentinal();
-
- return (*this);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // StrStr
- //
- // Find the substring cpszSubString in the array. Returns the pointer to
- // the first occurance of the substring in the array or NULL if the
- // substring is not found.
- //////////////////////////////////////////////////////////////////////////
- const char * strStr(const char * cpszSubString) const
- {
- const char * cpszRetVal = NULL;
-
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Find the substring.
- cpszRetVal = ::strstr(this->m_ptData, cpszSubString);
-
- // Post-validation.
- this->verifySentinal();
-
- return cpszRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // StrCmp
- //
- // Compare the cpszString to this array.
- //////////////////////////////////////////////////////////////////////////
- int32 strCmp(const char * cpszString) const
- {
- int32 iRetVal = 0;
-
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Compare the strings.
- iRetVal = ::strcmp(this->m_ptData, cpszString);
-
- return iRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // StriCmp
- //
- // Compare the cpszString to this array (case insensitive).
- //////////////////////////////////////////////////////////////////////////
- int32 striCmp(const char * cpszString) const
- {
- int32 iRetVal = 0;
-
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Compare the strings.
- iRetVal = stricmp(this->m_ptData, cpszString);
-
- return iRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // StrnCmp
- //
- // Compare the cpszString to this array up to culCount characters.
- //////////////////////////////////////////////////////////////////////////
- int32 strnCmp(const char * cpszString, const uint32 culCount) const
- {
- int32 iRetVal = 0;
-
- // Pre-validation.
- this->erifySentinal();
- this->verifyNotNull();
-
- // Make sure the comparison can take place with in our array bounds.
- this->verifyLength(culCount);
-
- // Compare the strings.
- iRetVal = strncmp(this->m_ptData, cpszString, culCount);
-
- return iRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // StrChr
- //
- // Find the first occurrence of the specified character in the string.
- //////////////////////////////////////////////////////////////////////////
- const char * strChr(char cCharacter) const
- {
- const char * cpszRetVal = 0;
-
- // Pre-validation.
- this->erifySentinal();
- this->verifyNotNull();
-
- // Compare the strings.
- cpszRetVal = ::strchr(this->m_ptData, cCharacter);
-
- return cpszRetVal;
- }
-
-private:
- void wideToMultiByte(const wchar_t* cpwszSource)
- {
- // Calculate the length of the source.
- const uint32 cdwSourceLen = cpwszSource ? ::wcslen( cpwszSource ) : 0;
-
- // Convert the wide strings to multibyte.
- if( cdwSourceLen > 0 )
- {
- // This appears to be allocating twice as much memory as is needed, but
- // this is the way W2A is implemented and W2A seems to convert some
- // strings that will not convert where the destination is the same
- // length (in characters) as the source.
- this->allocateElements( cdwSourceLen * sizeof( wchar_t ) );
-
- int32 iRet;
-#ifdef WIN32
- iRet = ::WideCharToMultiByte(
- CP_ACP,
- 0,
- cpwszSource,
- -1,
- GetNonConstPtr(),
- GetLength(),
- NULL,
- NULL );
-#else
- iRet = ::wcstombs( this->getNonConstPtr(),
- cpwszSource,
- this->getByteCount() );
- // wcstombs returns -1 for error or the length
- // not including the NULL, so we must increment
- // to match the windows version
- iRet++;
-#endif
-
- if( 0 == iRet )
- {
- this->freeArray();
- }
- else
- {
- //
- // Must ReAllocate in order to have the proper char length
- // The char array was allocated based on wchar_t
- //
- // no need to include the NULL terminator
- // returned by WideCharToMultiByte()
- //
- this->rellocateElements( iRet - 1 );
- }
- }
- else if( cpwszSource != NULL )
- {
- // This chunk of code is important. If the source
- // string is empty, return an empty string, not
- // a NULL pointer!
- this->allocateElements(0);
- }
-
- // Verify array.
- this->verifySentinal();
- }
-
-private:
- TCharAdapter(const TCharAdapter & crRhs);
- TCharAdapter & operator=(const TCharAdapter & crRhs);
-};
-
-}
-
-#endif // _TCharAdapter_H_
+++ /dev/null
-//////////////////////////////////////////////////////////////////////////////
-//
-// Author: Greg Burk
-//
-// Purpose: This template provides a way to create an array that has
-// certain safety features that help solve some of the problems
-// often created by arrays in C++. You can create an array of
-// any type. The safety features of this class include array
-// bounds checking (indexes out of range), automatic
-// initialization, and automatic destruction. It also provides
-// some features to check the integrity of the array. This is
-// especially useful when you get and pass the raw pointer to
-// the array into a third party function (i.e. Windows API).
-//
-// The ${TDynamicArray::verify()} function is used for this
-// purpose. It does two primary things:
-//
-// 1) When the array is allocated, some extra space is allocated
-// for some sentinel bytes. These bytes are checked to make
-// sure they are still intact when verify() is called.
-//
-// 2) When the array is allocated, the address of the memory
-// that was allocated is stored and is XORed with a known
-// bit pattern and the result is also stored. When verify()
-// is called, this pattern is XORed again with the address
-// and the result should be the original pattern.
-//
-// If either of the above checks fails, an exception is thrown.
-// The primary weakness of this strategy is that the call to
-// verify() is left up to the user. If the raw pointer is passed
-// and something gets messed up, if verify() was not called, the
-// problem won't be discovered until the next time a function
-// that calls verify() (most do) is called. This will cause us
-// to loose the context in which the problem occurred.
-//
-// Created: Wednesday, August 07, 2002 2:27:39 PM
-//
-// Copyright (c) 2011 Vmware, Inc. All rights reserved.
-// -- VMware Confidential
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef _TDynamicArray_H_
-#define _TDynamicArray_H_
-
-#include <string.h>
-
-namespace Caf {
-
-//////////////////////////////////////////////////////////////////////////////
-// Define sentinel bit pattern.
-//////////////////////////////////////////////////////////////////////////////
-#ifdef __x86_64__
-static const uint64 gs_ulDynamicArraySentinelBitPattern = (0xAAAAAAAAAAAAAAAA);
-#else
-static const uint32 gs_ulDynamicArraySentinelBitPattern = (0xAAAAAAAA);
-#endif
-static const uint32 gs_ulDynamicArraySentinelElementCount = (3);
-
-template<typename T, typename Allocator>
-class TDynamicArray {
-public:
- typedef T Type;
-
- //////////////////////////////////////////////////////////////////////////
- // Default Constructor
- //////////////////////////////////////////////////////////////////////////
- TDynamicArray() :
- CAF_CM_INIT("TDynamicArray"),
- _sentinelBits(gs_ulDynamicArraySentinelBitPattern),
- _isSentinelSet(false),
- _elementCount(0),
- _elementIndex(0),
- _byteCount(0),
- _data(NULL) {
- // Initialize the sentinel buffers.
- ::memset(_sentinelBytes, 0, sizeof(_sentinelBytes));
- }
-
- //////////////////////////////////////////////////////////////////////////
- // Destructor
- //////////////////////////////////////////////////////////////////////////
- virtual ~TDynamicArray() {
- CAF_CM_FUNCNAME("~TDynamicArray");
- try {
- freeArray();
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_CLEAREXCEPTION;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // PutDescription
- //
- // Assign description to object instance.
- //////////////////////////////////////////////////////////////////////////
- void putDescription(const char * pszDesc) {
- CAF_CM_FUNCNAME_VALIDATE("putDescription");
- CAF_CM_VALIDATE_STRINGPTRA(pszDesc);
- _description = pszDesc;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetPtr
- //
- // Get const pointer to internal data
- //////////////////////////////////////////////////////////////////////////
- const T * getPtr() const {
- // Pre-validation.
- verifySentinel();
-
- // Get pointer.
- const T * rc = _data;
-
- return rc;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetNonConstPtr
- //
- // Get non-const pointer to internal data. This function should be used
- // only when you must get a pointer that is to be written to, and you
- // should always call the ${TDynamicArray::verify()} function after modifying the data
- // pointed to by this pointer or passing the pointer to a function that
- // modifies the data pointed to by this pointer.
- //////////////////////////////////////////////////////////////////////////
- T * getNonConstPtr() {
- // Pre-validation.
- verifySentinel();
-
- // Get pointer.
- T * rc = _data;
-
- return rc;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // const Conversion Operator
- //////////////////////////////////////////////////////////////////////////
- operator const T *() const {
- // Pre-validation.
- verifySentinel();
-
- // Get pointer.
- const T * rc = _data;
-
- return rc;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetPtrAt
- //
- // Returns a const pointer to the internal array at a given index
- //////////////////////////////////////////////////////////////////////////
- const T * getPtrAt(const uint32 elementIndex) const {
- // Pre-validation.
- verifyNotNull();
- verifySentinel();
- verifyElementCount(elementIndex);
-
- // Get the pointer at the index specified.
- const T * rc = &_data[elementIndex];
-
- return rc;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetNonConstPtrAt
- //
- // Returns a non-const pointer to the internal array at a given index.
- // This function should be used only when you must get a pointer that is
- // to be written to, and you should always call the ${TDynamicArray::verify()}
- // function after modifying the data pointed to by this pointer or passing
- // the pointer to a function that modifies the data pointed to by this
- // pointer.
- //////////////////////////////////////////////////////////////////////////
- T * getNonConstPtrAt(const uint32 elementIndex) {
- // Pre-validation.
- verifyNotNull();
- verifySentinel();
- verifyElementCount(elementIndex);
-
- // Get the pointer at the index specified.
- T * rc = &_data[elementIndex];
-
- return rc;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetAt
- //
- // Returns the array element at a given index
- //////////////////////////////////////////////////////////////////////////
- T getAt(const uint32 elementIndex) const {
- // Pre-validation.
- verifyNotNull();
- verifySentinel();
- verifyElementCount(elementIndex);
-
- // Get the pointer at the index specified.
- T tRetVal = _data[elementIndex];
-
- return tRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // getPtrAtCurrentPos
- //
- // Returns a const pointer to the internal array at the current position.
- //////////////////////////////////////////////////////////////////////////
- const T * getPtrAtCurrentPos() const {
- return getPtrAt(_elementIndex);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // getNonConstPtrAtCurrentPos
- //
- // Returns a non-const pointer to the internal array at the current position.
- // This function should be used only when you must get a pointer that is
- // to be written to, and you should always call the ${TDynamicArray::verify()}
- // function after modifying the data pointed to by this pointer or passing
- // the pointer to a function that modifies the data pointed to by this
- // pointer.
- //////////////////////////////////////////////////////////////////////////
- T * getNonConstPtrAtCurrentPos() {
- return getNonConstPtrAt(_elementIndex);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetAtCurrentPos
- //
- // Returns the array element at the current position
- //////////////////////////////////////////////////////////////////////////
- T getAtCurrentPos() const {
- return getAt(_elementIndex);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // SetAt
- //
- // Sets the array element at a given index
- //////////////////////////////////////////////////////////////////////////
- void setAt(
- const uint32 elementIndex,
- const T value) {
- // Pre-validation.
- verifyNotNull();
- verifySentinel();
- verifyElementCount(elementIndex);
-
- // Set the pointer at the index specified.
- _data[elementIndex] = value;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // getElementCount
- //
- // Returns the number of array elements.
- //////////////////////////////////////////////////////////////////////////
- uint32 getElementCount() const {
- return _elementCount;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // getByteCount
- //
- // Returns the size of the array in bytes.
- //////////////////////////////////////////////////////////////////////////
- uint32 getByteCount() const {
- return _byteCount;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // getByteCountSize
- //
- // Returns the size of the array in bytes.
- //////////////////////////////////////////////////////////////////////////
- size_t getByteCountSize() const {
- return static_cast<size_t>(_byteCount);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // IsNull
- //
- // Returns true if the pointer to the internal array is null or false if
- // the array is not null
- //////////////////////////////////////////////////////////////////////////
- bool isNull() const {
- return ((NULL == _data) ? true : false);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // verify
- //
- // Verifies that the array is still properly bound and in good shape.
- //////////////////////////////////////////////////////////////////////////
- void verify() const {
- // verify.
- verifySentinel();
- }
-
- //////////////////////////////////////////////////////////////////////////
- // Allocate
- //
- // Allocates a new array on the heap (elementCount = number of elements)
- //////////////////////////////////////////////////////////////////////////
- TDynamicArray & allocateElements(const uint32 elementCount) {
- // Free the previous array if it exists.
- freeArray();
-
- // Call internal allocation function to actually allocate the
- // array buffer.
- internalAllocate(elementCount);
-
- return (*this);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // AllocateBytes
- //
- // Allocates a new array on the heap.
- //////////////////////////////////////////////////////////////////////////
- TDynamicArray & allocateBytes(const size_t byteCount) {
- return allocateBytes(static_cast<const uint32>(byteCount));
- }
-
- //////////////////////////////////////////////////////////////////////////
- // AllocateBytes
- //
- // Allocates a new array on the heap.
- //////////////////////////////////////////////////////////////////////////
- TDynamicArray & allocateBytes(const uint32 byteCount) {
- // Calculate actual number of array elements to allocate based on
- // the byte length.
- const uint32 elementCount = byteCountToElementCount(byteCount);
-
- // Delegate to Allocate().
- allocateElements(elementCount);
-
- return (*this);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // ReAllocate
- //
- // Reallocates a array on the heap, keeping original contents.
- // culLength = number of elements
- //////////////////////////////////////////////////////////////////////////
- TDynamicArray & reallocateElements(const uint32 elementCount) {
- CAF_CM_FUNCNAME("reallocateElements");
-
- // Declare variables to hold copy of original information.
- uint32 origElementIndex = 0;
- uint32 origByteCount = 0;
- T * origData = NULL;
-
- try {
- // Pre-validation.
- verifySentinel();
-
- // Create a temporary copy of the original buffer and length.
- origElementIndex = _elementIndex;
- origByteCount = _byteCount;
- origData = _data;
-
- // Reset the data pointer, length, and byte length.
- _data = NULL;
- _elementCount = 0;
- _elementIndex = 0;
- _byteCount = 0;
-
- // Reset the sentinel set flag.
- _isSentinelSet = false;
-
- // Call internal allocation function to actually allocate the
- // array buffer.
- internalAllocate(elementCount);
-
- // Copy the original into the new if it exists.
- if((origData != NULL) && (origByteCount > 0)) {
- // Calculate the number of bytes to copy.
- const uint32 bytesToCopy =
- (_byteCount < origByteCount) ? _byteCount : origByteCount;
-
- // Copy the bytes.
- ::memcpy(_data, origData, bytesToCopy);
-
- const uint32 elementsToCopy = byteCountToElementCount(bytesToCopy);
- _elementIndex =
- (elementsToCopy < origElementIndex) ? elementsToCopy : origElementIndex;
- }
-
- // verify the sentinel bytes.
- verifySentinel();
- }
- CAF_CM_CATCH_ALL;
-
- // Delete the original buffer if non-null.
- if (origData) {
- Allocator::freeMemory(origData);
- }
-
- CAF_CM_THROWEXCEPTION;
-
- return (*this);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // Grow
- //
- // Increases the size of the array by the length
- // (number of elements) supplied
- //////////////////////////////////////////////////////////////////////////
- TDynamicArray & grow(const uint32 elementCount) {
- reallocateElements(_elementCount + elementCount);
-
- return (*this);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // ReAllocateBytes
- //
- // Reallocates a array on the heap, keeping original contents.
- //////////////////////////////////////////////////////////////////////////
- TDynamicArray & reallocateBytes(const size_t byteCount) {
- return reallocateBytes(static_cast<const uint32>(byteCount));
- }
-
- //////////////////////////////////////////////////////////////////////////
- // ReAllocateBytes
- //
- // Reallocates a array on the heap, keeping original contents.
- //////////////////////////////////////////////////////////////////////////
- TDynamicArray & reallocateBytes(const uint32 byteCount) {
- // Calculate actual number of array elements to allocate based
- // on the byte length.
- const uint32 elementCount = byteCountToElementCount(byteCount);
-
- // Delegate to ReAllocate() function.
- reallocateElements(elementCount);
-
- return (*this);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // Free
- //
- // Frees the memory for the array.
- //////////////////////////////////////////////////////////////////////////
- void freeArray() {
- // Free the buffer if it exists.
- if (_data) {
- verifySentinel();
-
- // Zeroize the buffer for cryptographic purposes
- ::memset(_data, 0, _byteCount);
-
- Allocator::freeMemory(_data);
- _data = NULL;
-
- // Reset to initial value.
- _sentinelBits = gs_ulDynamicArraySentinelBitPattern;
- }
-
- // Reset the length and byte length.
- _elementCount = 0;
- _elementIndex = 0;
- _byteCount = 0;
-
- // Reset the sentinel set flag.
- _isSentinelSet = false;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // ArrayCpy
- //
- // Copies the array entries from crArray into this array.
- //////////////////////////////////////////////////////////////////////////
- void arrayCpy(const TDynamicArray & crArray) {
- // Make sure reference is not to this.
- if (this != &crArray) {
- // Pre-validation.
- verifyNotNull();
- verifyByteCount(crArray.getByteCount());
- verifySentinel();
- crArray.verifySentinel();
-
- // Reinitialize this array.
- memSet();
-
- // Copy the array.
- memcpy(_data, crArray.getPtr(), crArray.getByteCount());
-
- // Post-validation.
- verifySentinel();
- }
- }
-
- //////////////////////////////////////////////////////////////////////////
- // ArrayCmp
- //
- // Compare this array with crArray. Compares the entire array, so arrays
- // must be equal size to evaluate to equal.
- //////////////////////////////////////////////////////////////////////////
- int32 arrayCmp(const TDynamicArray & crArray) const {
- int32 iRetVal = 0;
-
- // Make sure reference is not to this.
- if (this != &crArray) {
- // Pre-validation.
- verifySentinel();
- crArray.verifySentinel();
-
- // Make sure the arrays are the same length.
- if ((_data == NULL) && (crArray._data == NULL)) {
- iRetVal = 0;
- } else if (getByteCount() == crArray.getByteCount()) {
- // Compare the array.
- iRetVal = ::memcmp(_data, crArray.getPtr(), getByteCount());
- } else {
- iRetVal = (getByteCount() > crArray.getByteCount()) ? 1 : -1;
- }
-
- // Post-validation.
- verifySentinel();
- }
-
- return iRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // ArrayPrepend
- //
- // Prepend this array with the provided array. This call will grow the
- // array by the size of the provided array.
- //////////////////////////////////////////////////////////////////////////
- void arrayPrepend(const TDynamicArray & crArray) {
- CAF_CM_FUNCNAME("arrayPrepend");
-
- // Declare variables to hold copy of original information.
- uint32 origByteCount = 0;
- uint32 origElementCount = 0;
- T * origData = NULL;
-
- try {
- // Pre-validation.
- verifySentinel();
-
- // Create a temporary copy of the original buffer and length.
- origData = _data;
- origByteCount = _byteCount;
- origElementCount = _elementCount;
-
- // Reset the data pointer, length, and byte length.
- _data = NULL;
- _elementCount = 0;
- _elementIndex = 0;
- _byteCount = 0;
-
- // Reset the sentinel set flag.
- _isSentinelSet = false;
-
- // Call internal allocation function to actually allocate the
- // array buffer.
- internalAllocate(origElementCount + crArray.getElementCount());
-
- // Get an intermediate pointer to the internal buffer.
- T * tempData = _data;
-
- // Copy the provided data into the new buffer if it exists.
- if((crArray.getPtr() != NULL) && (crArray.getByteCount() > 0)) {
- // Copy the bytes.
- ::memcpy(tempData, crArray.getPtr(), crArray.getByteCount());
-
- // Advance the pointer to the end of the data just copied.
- tempData += crArray.getElementCount();
- }
-
- // Copy the original into the new if it exists.
- if((origData != NULL) && (origByteCount > 0)) {
- // Copy the bytes.
- ::memcpy(tempData, origData, origByteCount);
- }
-
- // verify the sentinel bytes.
- verifySentinel();
- }
- CAF_CM_CATCH_ALL;
-
- // Delete the original buffer if non-null.
- if (origData) {
- Allocator::freeMemory(origData);
- }
-
- CAF_CM_THROWEXCEPTION;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // ArrayAppend
- //
- // Append this array with the provided array. This call will grow the
- // array by the size of the provided array.
- //////////////////////////////////////////////////////////////////////////
- void arrayAppend(const TDynamicArray & crArray) {
- CAF_CM_FUNCNAME("arrayAppend");
-
- // Declare variables to hold copy of original information.
- uint32 origByteCount = 0;
- uint32 origElementCount = 0;
- uint32 origElementIndex = 0;
- T * origData = NULL;
-
- try {
- // Pre-validation.
- verifySentinel();
-
- // Create a temporary copy of the original buffer and length.
- origData = _data;
- origByteCount = _byteCount;
- origElementCount = _elementCount;
- origElementIndex = _elementIndex;
-
- // Reset the data pointer, length, and byte length.
- _data = NULL;
- _elementCount = 0;
- _elementIndex = 0;
- _byteCount = 0;
-
- // Reset the sentinel set flag.
- _isSentinelSet = false;
-
- // Call internal allocation function to actually allocate the
- // array buffer.
- internalAllocate(origElementCount + crArray.getElementCount());
-
- // Get an intermediate pointer to the internal buffer.
- T * tempData = _data;
-
- // Copy the original into the new if it exists.
- if((origData != NULL) && (origByteCount > 0))
- {
- // Copy the bytes.
- ::memcpy(tempData, origData, origByteCount);
-
- // Advance the pointer to the end of the data just copied.
- tempData += origElementCount;
- }
-
- // Copy the provided data into the new buffer if it exists.
- if((crArray.getPtr() != NULL) && (crArray.getByteCount() > 0)) {
- // Copy the bytes.
- ::memcpy(tempData, crArray.getPtr(), crArray.getByteCount());
- }
-
- _elementIndex = origElementIndex;
-
- // verify the sentinel bytes.
- verifySentinel();
- }
- CAF_CM_CATCH_ALL;
-
- // Delete the original buffer if non-null.
- if (origData) {
- Allocator::freeMemory(origData);
- }
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MemSet
- //
- // Initializes the array by filling it with the fillValue.
- //////////////////////////////////////////////////////////////////////////
- void memSet(const byte fillValue = 0) {
- // Pre-validation.
- verifyNotNull();
- verifySentinel();
-
- // Initialize the buffer.
- ::memset(_data, fillValue, _byteCount);
- _elementIndex = 0;
-
- // Post-validation.
- verifySentinel();
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MemCpy
- //
- // Copy the memory from sourceData into this array up to byteCount bytes.
- //////////////////////////////////////////////////////////////////////////
- void memCpy(
- const void * sourceData,
- const size_t byteCount) {
- memCpy(sourceData, static_cast<const uint32>(byteCount));
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MemCpy
- //
- // Copy the memory from sourceData into this array up to byteCount bytes.
- //////////////////////////////////////////////////////////////////////////
- void memCpy(
- const void * sourceData,
- const uint32 byteCount) {
- // Pre-validation.
- verifyNotNull();
- verifySentinel();
-
- // Make sure the data will fit if we copy it.
- verifyByteCount(byteCount);
-
- // Copy the data.
- ::memcpy(_data, sourceData, byteCount);
- _elementIndex = 0;
-
- // Post-validation.
- verifySentinel();
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MemAppend
- //
- // Append the memory from sourceData into this array up to byteCount bytes.
- //////////////////////////////////////////////////////////////////////////
- void memAppend(
- const void * sourceData,
- const size_t byteCount) {
- memAppend(sourceData, static_cast<const uint32>(byteCount));
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MemAppend
- //
- // Append the memory from sourceData into this array up to byteCount bytes.
- //////////////////////////////////////////////////////////////////////////
- void memAppend(
- const void * sourceData,
- const uint32 byteCount) {
- // Pre-validation.
- verifyNotNull();
- verifySentinel();
-
- // Make sure the data will fit if we copy it.
- const uint32 startingByteCount = elementCountToByteCount(_elementIndex);
- verifyByteCount(startingByteCount + byteCount);
-
- // Copy the data.
- ::memcpy(_data + _elementIndex, sourceData, byteCount);
- _elementIndex += byteCountToElementCount(byteCount);
-
- // Post-validation.
- verifySentinel();
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MemCmp
- //
- // Compare the memory from sourceData with this array up to byteCount bytes.
- //////////////////////////////////////////////////////////////////////////
- int32 memCmp(
- const void * sourceData,
- const size_t byteCount) {
- return memCmp(sourceData, static_cast<const uint32>(byteCount));
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MemCmp
- //
- // Compare the memory from sourceData with this array up to byteCount bytes.
- //////////////////////////////////////////////////////////////////////////
- int32 memCmp(
- const void * sourceData,
- const uint32 byteCount) const {
- CAF_CM_FUNCNAME_VALIDATE("memCmp");
- CAF_CM_VALIDATE_PTR(sourceData);
- CAF_CM_VALIDATE_POSITIVE(byteCount);
-
- // Pre-validation.
- verifySentinel();
-
- // Make sure the comparison can take place within our array bounds.
- verifyByteCount(byteCount);
-
- // Do comparison.
- int32 iRetVal = 0;
- if ((_data == NULL) && (sourceData == NULL)) {
- iRetVal = 0;
- } else {
- iRetVal = ::memcmp(_data, sourceData, byteCount);
- }
-
- // Post-validation.
- verifySentinel();
-
- return iRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MemiCmp
- //
- // Compare the memory from sourceData with this array up to byteCount bytes
- // (case insensitive).
- //////////////////////////////////////////////////////////////////////////
- int32 memiCmp(
- const void * sourceData,
- const size_t byteCount) {
- return memiCmp(sourceData, static_cast<const uint32>(byteCount));
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MemiCmp
- //
- // Compare the memory from sourceData with this array up to byteCount bytes
- // (case insensitive).
- //////////////////////////////////////////////////////////////////////////
- int32 memiCmp(
- const void * sourceData,
- const uint32 byteCount) const {
- CAF_CM_FUNCNAME_VALIDATE("memiCmp");
- CAF_CM_VALIDATE_PTR(sourceData);
- CAF_CM_VALIDATE_POSITIVE(byteCount);
-
- // Pre-validation.
- verifySentinel();
-
- // Make sure the comparison can take place within our array bounds.
- verifyByteCount(byteCount);
-
- // Do comparison.
- int32 iRetVal = 0;
- if ((_data == NULL) && (sourceData == NULL)) {
- iRetVal = 0;
- } else {
- iRetVal = memicmp(_data, sourceData, byteCount);
- }
-
- // Post-validation.
- verifySentinel();
-
- return iRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // incrementElementIndex
- //
- // Increments the current position of the index into the buffer.
- //////////////////////////////////////////////////////////////////////////
- void incrementCurrentPos(const uint32 elementCount) {
- CAF_CM_FUNCNAME("incrementCurrentPos");
-
- if ((_elementIndex + elementCount) > _elementCount) {
- CAF_CM_EXCEPTION_VA3(ERROR_INSUFFICIENT_BUFFER,
- "Current position is longer than the total size for '%s' - currentPos: %d, totalLen: %d",
- _description.c_str(), _elementIndex + elementCount, _elementCount);
- }
-
- _elementIndex += elementCount;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // resetElementIndex
- //
- // Resets the current position of the index into the buffer.
- //////////////////////////////////////////////////////////////////////////
- void resetCurrentPos() {
- _elementIndex = 0;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // getByteCountFromCurrentPos
- //
- // Returns the size of the array in bytes from the current position.
- //////////////////////////////////////////////////////////////////////////
- uint32 getByteCountFromCurrentPos() const {
- const uint32 byteIndex = elementCountToByteCount(_elementIndex);
- return (_byteCount - byteIndex);
- }
-
-private:
- //////////////////////////////////////////////////////////////////////////
- // internalAllocate (Private)
- //
- // Set the sentinel bytes at the end of the array.
- //////////////////////////////////////////////////////////////////////////
- void internalAllocate(const uint32 elementCount) {
- CAF_CM_FUNCNAME("internalAllocate");
-
- // This function assumes the calling function has freed any pre-
- // existing array.
- CAF_CM_VALIDATE_NULLPTR(_data);
- CAF_CM_VALIDATE_ZERO(_elementCount);
- CAF_CM_VALIDATE_ZERO(_byteCount);
-
- // Allocate the new buffer. This buffer is
- _data = static_cast<T*>(Allocator::allocMemory(
- sizeof(T) * (elementCount + gs_ulDynamicArraySentinelElementCount)));
-
- // verify that the allocation succeeded.
- if (!_data) {
- CAF_CM_EXCEPTION_VA1(ERROR_OUTOFMEMORY, "Array allocation failed for '%s'",
- _description.c_str());
- }
-
- // Set sentinel bits
-#ifdef __x86_64__
- _sentinelBits = reinterpret_cast<const uint64>(_data)
- ^ gs_ulDynamicArraySentinelBitPattern;
-#else
- _sentinelBits = reinterpret_cast<const uint32>(_data) ^ gs_ulDynamicArraySentinelBitPattern;
-#endif
-
- // Initialize the new buffer.
- ::memset(_data, 0,
- ((elementCount + gs_ulDynamicArraySentinelElementCount) * sizeof(T)));
-
- // Set the length and byte length.
- _elementCount = elementCount;
- _elementIndex = 0;
- _byteCount = elementCountToByteCount(elementCount);
-
- // Set the sentinel bytes.
- setSentinel();
-
- // verify the sentinel bytes.
- verifySentinel();
- }
-
- //////////////////////////////////////////////////////////////////////////
- // SetSentinel (Private)
- //
- // Set the sentinel bytes at the end of the array.
- //////////////////////////////////////////////////////////////////////////
- void setSentinel() {
- // Set the sentinel characters.
- for (uint32 ulIndex = 0; ulIndex < (2 * sizeof(T)); ++ulIndex) {
- // Set the sentinel bytes at the end of the array.
- reinterpret_cast<byte*>(_data)[(_byteCount + ulIndex + sizeof(T))] =
- ((ulIndex % 2) == 0) ? 0xFF : 0xDD;
-
- // Make a copy of the sentinel bytes for later comparison.
- _sentinelBytes[ulIndex + sizeof(T)] = ((ulIndex % 2) == 0) ? 0xFF : 0xDD;
- }
-
- // Set the flag indicating the sentinel is set.
- _isSentinelSet = true;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // verifyByteCount (Private)
- //
- // Verifies that the byte length supplied is not longer than the array
- // byte length.
- //////////////////////////////////////////////////////////////////////////
- void verifyByteCount(const uint32 byteCount) const {
- CAF_CM_FUNCNAME("verifyByteCount");
-
- if (byteCount > _byteCount) {
- CAF_CM_EXCEPTION_VA3(ERROR_INVALID_INDEX, "The byte length specified [%d] "
- "exceeds the array length [%d] for '%s'", byteCount, _byteCount,
- _description.c_str());
- }
- }
-
- //////////////////////////////////////////////////////////////////////////
- // verifyElementCount (Private)
- //
- // Verifies that the index supplied does not go past end of the array.
- //////////////////////////////////////////////////////////////////////////
- void verifyElementCount(const uint32 elementCount) const {
- CAF_CM_FUNCNAME("verifyElementCount");
-
- if (elementCount >= _elementCount) {
- CAF_CM_EXCEPTION_VA3(ERROR_INVALID_INDEX, "The index specified [%d] is "
- "beyond the array bounds [%d] for '%s'", elementCount, (_elementCount - 1),
- _description.c_str());
- }
- }
-
- uint32 byteCountToElementCount(const uint32 byteCount) const {
- uint32 rc = 0;
- if (byteCount > 0) {
- rc = (byteCount / sizeof(T)) + (byteCount % sizeof(T));
- }
-
- return rc;
- }
-
- uint32 elementCountToByteCount(const uint32 elementCount) const {
- return (elementCount * sizeof(T));
- }
-
-protected:
- //////////////////////////////////////////////////////////////////////////
- // verifySentinel (Private)
- //
- // Verifies that the sentinel bytes are still intact.
- //////////////////////////////////////////////////////////////////////////
- void verifySentinel() const {
- CAF_CM_FUNCNAME("verifySentinel");
-
- if (_isSentinelSet) {
-#ifdef __x86_64__
- if ((_sentinelBits ^ reinterpret_cast<const uint64>(_data))
- != gs_ulDynamicArraySentinelBitPattern)
-#else
- if ((_sentinelBits ^ reinterpret_cast<const uint32>(_data)) !=
- gs_ulDynamicArraySentinelBitPattern)
-#endif
- {
- CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA,
- "The sentinel BITS for array '%s' are no longer valid.",
- _description.c_str());
- } else if (::memcmp(_sentinelBytes,
- (reinterpret_cast<const byte *>(_data) + _byteCount),
- sizeof(_sentinelBytes)) != 0) {
- CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA,
- "The sential BYTES for array '%s' are no longer valid.",
- _description.c_str());
- }
- } else if (_sentinelBits != gs_ulDynamicArraySentinelBitPattern) {
- CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA,
- "The sential BITS for array '%s' are no longer valid.", _description.c_str());
- }
- }
-
- //////////////////////////////////////////////////////////////////////////
- // verifyNotNull (Private)
- //
- // Verifies that the data pointer is not null.
- //////////////////////////////////////////////////////////////////////////
- void verifyNotNull() const {
- CAF_CM_FUNCNAME("verifyNotNull");
-
- if (NULL == _data) {
- CAF_CM_EXCEPTION_VA1(E_POINTER, "The pointer to the array is null for '%s'",
- _description.c_str());
- }
- }
-
-private:
- TDynamicArray(const TDynamicArray & crRhs);
- TDynamicArray & operator=(const TDynamicArray & crRhs);
-
-#ifdef WIN32
- //////////////////////////////////////////////////////////////////////////
- // Operator[] (Private)
- //
- // We need to provide an implementation to satisfy the VC8 compiler
- // even though we never intend this method to be called.
- //////////////////////////////////////////////////////////////////////////
- T operator[](size_t)
- {
- // Yes, this code looks very wrong, however, DO NOT REMOVE it!
- // It is here to supply an implementation that doesn't generate
- // compiler warnings. This method will never be called.
- T* tpRetVal = NULL;
- return *tpRetVal;
- }
-#endif
-
-private:
- CAF_CM_CREATE;
- byte _sentinelBytes[gs_ulDynamicArraySentinelElementCount * sizeof(T)];
-#ifdef __x86_64__
- uint64 _sentinelBits;
-#else
- uint32 _sentinelBits;
-#endif
- bool _isSentinelSet;
-
- // NOTE: ...Count are not zero-relative, ...Index are zero-relative.
-
- // An element is the template type (e.g. wchar_t), so the element count
- // is the number of these template types in the array.
- uint32 _elementCount;
- uint32 _elementIndex;
-
- // The number of bytes consumed by the array of template types.
- uint32 _byteCount;
-
-protected:
- std::string _description;
- T * _data;
-};
-
-}
-
-#endif // _TDynamicArray_H_
+++ /dev/null
-//////////////////////////////////////////////////////////////////////////////
-//
-// $Workfile: TWCharAdapter.h $
-//
-// Author: Greg Burk
-//
-// Purpose: This template provides an adapter for TDynamicArray (or
-// other types of "safe" array classes) that exposes functions
-// that are useful when working with an array of type wchar_t.
-//
-// A typedef of this class is already defined and should be
-// used instead of explicitly using this class. The typedef
-// is CEcmWCharArray.
-//
-// Created: Friday, October 18, 2002 1:59:49 PM
-//
-// Copyright (c) 2011 Vmware, Inc. All rights reserved.
-// -- VMware Confidential
-//
-// Modification History:
-//
-// $Log: //wpbuild01/PvcsData/ECM_40/archives/ECM_41/WinNT/Source/CommonAgtCol/Cpp/EcmCommonStaticMinDep/TWCharAdapter.h-arc $
-//
-// Rev 1.2 17 Sep 2003 09:43:16 Michael.Donahue
-// Implemented hooks for new library model
-//
-// Rev 1.1 16 Jan 2003 11:17:54 Greg.Burk
-// Made changes necessary to accomodate new CEcmBasicString class and changes to CEcmString.
-//
-// Rev 1.0 31 Oct 2002 10:43:08 Greg.Burk
-// Initial Revision
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef _TWCharAdapter_H_
-#define _TWCharAdapter_H_
-
-namespace Caf {
-
-template<typename T>
-class TWCharAdapter : public T
-{
-public:
- //////////////////////////////////////////////////////////////////////////
- // Default Constructor
- //////////////////////////////////////////////////////////////////////////
- TWCharAdapter() {}
-
- //////////////////////////////////////////////////////////////////////////
- // Conversion Constructor
- //////////////////////////////////////////////////////////////////////////
- TWCharAdapter(const char * rhs)
- {
- multiByteToWide(rhs);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // Conversion Constructor
- //////////////////////////////////////////////////////////////////////////
- TWCharAdapter(const wchar_t * rhs)
- {
- (*this) = rhs;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // Destructor
- //////////////////////////////////////////////////////////////////////////
- ~TWCharAdapter() {}
-
- //////////////////////////////////////////////////////////////////////////
- // Assignment operator
- //////////////////////////////////////////////////////////////////////////
- TWCharAdapter& operator=(const char * rhs)
- {
- multiByteToWide(rhs);
- return *this;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // Assignment operator
- //////////////////////////////////////////////////////////////////////////
- TWCharAdapter& operator=(const wchar_t * rhs)
- {
- const uint32 culLength = ::wcslen(rhs);
-
- if(culLength > 0)
- {
- this->allocateElements(culLength);
- wcsnCpy(rhs, culLength);
- }
- return *this;
- }
-
- //////////////////////////////////////////////////////////////////////////////
- // MakeLower()
- //
- // Converts all of the upper-case characters in this string to lower-case.
- //////////////////////////////////////////////////////////////////////////////
- void makeLower()
- {
- // Pre-validation.
- this->verifySentinal();
-
- if(!this->isNull())
- {
- wcslwr(this->m_ptData);
- }
-
- // Post-validation.
- this->verifySentinal();
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MakeUpper
- //
- // Converts all of the lower-case characters in this array to upper-case.
- //////////////////////////////////////////////////////////////////////////
- void makeUpper()
- {
- // Pre-validation.
- this->verifySentinal();
-
- if(!this->isNull())
- {
- wcsupr(this->m_ptData);
- }
-
- // Post-validation.
- this->verifySentinal();
- }
-
- //////////////////////////////////////////////////////////////////////////
- // Reverse
- //
- // Reverses the characters in the array.
- //////////////////////////////////////////////////////////////////////////
- void reverse()
- {
- // Pre-validation.
- this->verifySentinal();
-
- if(!this->isNull())
- {
- wcsrev(this->m_ptData);
- }
-
- // Post-validation.
- this->verifySentinal();
- }
-
- //////////////////////////////////////////////////////////////////////////
- // WcsLen
- //
- // Return the length of the string.
- //////////////////////////////////////////////////////////////////////////
- size_t wcsLen() const
- {
- size_t stRetVal = 0;
- this->verifySentinal();
- this->verifyNotNull();
- stRetVal = ::wcslen(this->m_ptData, this->m_strDesc);
- this->verifyLength(static_cast<uint32>(stRetVal));
- return stRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // WcsCpy
- //
- // Make a copy of the string into the buffer.
- //////////////////////////////////////////////////////////////////////////
- TWCharAdapter & wcsCpy(const wchar_t * cpwszSource)
- {
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Get the length of the source string.
- uint32 dwSourceLength = ::wcslen(cpwszSource);
-
- // Make sure the string will fit if we copy it.
- this->verifyLength(dwSourceLength);
-
- // Copy the string into the buffer.
- ::wcscpy(this->m_ptData, cpwszSource);
-
- // Post-validation.
- this->verifySentinal();
-
- return (*this);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // WcsnCpy
- //
- // Make a copy of the string into the buffer upto culCount characters.
- //////////////////////////////////////////////////////////////////////////
- TWCharAdapter & wcsnCpy(const wchar_t * cpwszSource, const uint32 culCount)
- {
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Make sure the string will fit if we copy it.
- this->verifyLength(culCount);
-
- // Copy the string into the buffer.
- ::wcsncpy(this->m_ptData, cpwszSource, culCount);
-
- // Post-validation.
- this->verifySentinal();
-
- return (*this);
- }
-
- //////////////////////////////////////////////////////////////////////////
- // WcsStr
- //
- // Find the substring cpwszSubString in the array. Returns the pointer to
- // the first occurance of the substring in the array or NULL if the
- // substring is not found.
- //////////////////////////////////////////////////////////////////////////
- const wchar_t * wcsStr(const wchar_t * cpwszSubString) const
- {
- wchar_t * pwszRetVal = NULL;
-
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Find the substring.
- pwszRetVal = ::wcsstr(this->m_ptData, cpwszSubString);
-
- // Post-validation.
- this->verifySentinal();
-
- return pwszRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // WcsCmp
- //
- // Compare the cpwszString to this array.
- //////////////////////////////////////////////////////////////////////////
- int32 wcsCmp(const wchar_t * cpwszString) const
- {
- int32 iRetVal = 0;
-
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Compare the strings.
- iRetVal = ::wcscmp(this->m_ptData, cpwszString);
-
- return iRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // WcsiCmp
- //
- // Compare the cpwszString to this array (case insensitive).
- //////////////////////////////////////////////////////////////////////////
- int32 wcsiCmp(const wchar_t * cpwszString) const
- {
- int32 iRetVal = 0;
-
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Compare the strings.
- iRetVal = wcsicmp(this->m_ptData, cpwszString);
-
- return iRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // WcsnCmp
- //
- // Compare the cpwszString to this array up to culCount characters.
- //////////////////////////////////////////////////////////////////////////
- int32 wcsnCmp(const wchar_t * cpwszString, const uint32 culCount) const
- {
- int32 iRetVal = 0;
-
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Make sure the comparison can take place with in our array bounds.
- this->verifyLength(culCount);
-
- // Compare the strings.
- iRetVal = wcsncmp(this->m_ptData, cpwszString, culCount);
-
- return iRetVal;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // WcsChr
- //
- // Find the first occurrence of the specified character in the string.
- //////////////////////////////////////////////////////////////////////////
- wchar_t * wcsChr(wchar_t wcCharacter) const
- {
- wchar_t * pwszRetVal = 0;
-
- // Pre-validation.
- this->verifySentinal();
- this->verifyNotNull();
-
- // Compare the strings.
- pwszRetVal = ::wcschr(this->m_ptData, wcCharacter);
-
- return pwszRetVal;
- }
-
-private:
- void multiByteToWide(const char* cpszSource)
- {
- // Calculate the length of the source.
- const uint32 cdwSourceLen = cpszSource ? ::strlen( cpszSource ) : 0;
-
- // Convert the multibyte strings to wide.
- if( cdwSourceLen > 0 )
- {
- this->allocateElements(cdwSourceLen);
- int32 iRet;
-#ifdef WIN32
- iRet = ::MultiByteToWideChar(
- CP_ACP,
- 0,
- cpszSource,
- cdwSourceLen,
- GetNonConstPtr(),
- GetLength() );
-#else
- iRet = ::mbstowcs( this->getNonConstPtr(), cpszSource, cdwSourceLen );
- // mbstowcs returns -1 on error or the number of
- // characters without the null terminator, so
- // we can increase it by 1 for the null or to 0 for
- // the error condition below
- if ( 0 != iRet )
- iRet++;
-#endif
-
- if( 0 == iRet )
- {
- this->freeArray();
- }
- }
- else if( cpszSource != NULL )
- {
- // This chunk of code is important. If the source
- // string is empty, return an empty string, not
- // a NULL pointer!
- this->allocateElements(0);
- }
-
- // Verify array.
- this->verifySentinal();
- }
-
-private:
- TWCharAdapter(const TWCharAdapter & crRhs);
- TWCharAdapter & operator=(const TWCharAdapter & crRhs);
-};
-
-}
-
-#endif // _TWCharAdapter_H_
+++ /dev/null
-/*
- * Created: Nov 14, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-#include "stdafx.h"
-#include "PlatformApi.h"
-
-std::string BasePlatform::PlatformApi::GetApiErrorMessage(const uint32 code) {
- char *buffer = NULL;
- uint32 msgLen = ::FormatMessageA(
- FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER,
- 0,
- code,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- reinterpret_cast<LPSTR>(&buffer),
- 0,
- NULL);
- if (msgLen == 0) {
- // try again by stripping away the HRESULT_FROM_WIN32 bits
- // in case this error code was translated first.
- uint32 subcode = HRESULT_CODE(code);
- msgLen = ::FormatMessageA(
- FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER,
- 0,
- code,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- reinterpret_cast<LPSTR>(&buffer),
- 0,
- NULL);
- }
-
- // strip ending CRLFs
- while (msgLen && (('\n' == buffer[msgLen-1]) || ('\r' == buffer[msgLen-1]))) {
- buffer[msgLen-1] = 0;
- --msgLen;
- }
-
- std::string message = msgLen ? std::string(buffer) : std::string();
- ::LocalFree(buffer);
- return message;
-}
+++ /dev/null
-/*
- * Created: Nov 14, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
- #ifndef BasePlatform_PlatformApi_h_
- #define BasePlatform_PlatformApi_h_
-
- namespace BasePlatform {
- namespace PlatformApi {
-
- std::string BASEPLATFORM_LINKAGE GetApiErrorMessage(const uint32 code);
-
- }}
-
-#endif
+++ /dev/null
-/*
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef PLATFORM_DEFINES_H
-#define PLATFORM_DEFINES_H
-
-#ifdef WIN32
- #ifdef _WIN64
- typedef uint64 SUBSYS_INTPTR;
- const SUBSYS_INTPTR SUBSYS_INTPTR_INVALID = 0xffffffffffffffff;
- #else
- typedef uint32 SUBSYS_INTPTR;
- const SUBSYS_INTPTR SUBSYS_INTPTR_INVALID = 0xffffffff;
- #endif
-#else
-
-#ifdef __x86_64__
-typedef uint64_t SUBSYS_INTPTR;
-const SUBSYS_INTPTR SUBSYS_INTPTR_INVALID = 0xffffffffffffffff;
-#else
-typedef uint32_t SUBSYS_INTPTR;
-const SUBSYS_INTPTR SUBSYS_INTPTR_INVALID = 0xffffffff;
-#endif
-const uint32 DLL_PROCESS_ATTACH = 1;
-const uint32 DLL_PROCESS_DETACH = 2;
-
-#ifndef TRUE
-#define TRUE true
-#endif
-
-#ifndef FALSE
-#define FALSE false
-#endif
-
-#endif
-
-#endif // #ifndef PLATFORM_DEFINES_H
+++ /dev/null
-/*
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef PLATFORMERRORS_H_
-#define PLATFORMERRORS_H_
-
-#ifdef WIN32
-
-#include <winerror.h>
-
-#else
-
-const HRESULT S_OK = 0;
-const HRESULT S_FALSE = 1;
-const HRESULT E_FAIL = 0x80004005;
-const HRESULT E_NOTIMPL = 0x80004001;
-const HRESULT E_INVALIDARG = 0x80070057;
-const HRESULT E_OUTOFMEMORY = 0x8007000E;
-const HRESULT E_POINTER = 0x80004003;
-const HRESULT E_NOINTERFACE = 0x80004002;
-const HRESULT E_UNEXPECTED = 0x8000FFFF;
-
-const HRESULT OLE_E_BLANK = 0x80040007;
-
-const HRESULT ERROR_SUCCESS = 0;
-const HRESULT NO_ERROR = 0;
-const HRESULT ERROR_INVALID_FUNCTION= 1;
-const HRESULT ERROR_FILE_NOT_FOUND = 2;
-const HRESULT ERROR_PATH_NOT_FOUND = 3;
-const HRESULT ERROR_ACCESS_DENIED = 5;
-const HRESULT ERROR_INVALID_HANDLE = 6;
-const HRESULT ERROR_INVALID_DATA = 13;
-const HRESULT ERROR_OUTOFMEMORY = 14;
-const HRESULT ERROR_NOT_SAME_DEVICE= 17;
-const HRESULT ERROR_HANDLE_EOF = 38;
-const HRESULT ERROR_NOT_SUPPORTED = 50;
-const HRESULT ERROR_FILE_EXISTS= 80;
-const HRESULT ERROR_INVALID_PARAMETER = 87;
-const HRESULT ERROR_BUFFER_OVERFLOW = 111;
-const HRESULT ERROR_CALL_NOT_IMPLEMENTED = 120;
-const HRESULT ERROR_INSUFFICIENT_BUFFER = 122;
-const HRESULT ERROR_BAD_PATHNAME = 161;
-const HRESULT ERROR_BUSY = 170;
-const HRESULT ERROR_ALREADY_EXISTS= 183;
-const HRESULT ERROR_NOT_FOUND = 1168;
-const HRESULT ERROR_MORE_DATA = 234;
-const HRESULT ERROR_NO_MORE_ITEMS = 259;
-const HRESULT ERROR_SHUTDOWN_IN_PROGRESS = 1115;
-const HRESULT ERROR_INVALID_INDEX = 1413;
-const HRESULT ERROR_INTERNAL_ERROR = 1359;
-const HRESULT ERROR_DISCARDED = 157;
-const HRESULT ERROR_CLASS_ALREADY_EXISTS = 1410;
-const HRESULT ERROR_CLASS_DOES_NOT_EXIST = 1411;
-const HRESULT ERROR_TIMEOUT = 1460;
-const HRESULT ERROR_UNSUPPORTED_TYPE = 1630;
-const HRESULT ERROR_TAG_NOT_FOUND =2012;
-const HRESULT ERROR_TAG_NOT_PRESENT =2013;
-const HRESULT ERROR_DUPLICATE_TAG =2014;
-const HRESULT ERROR_INVALID_STATE = 5023;
-const HRESULT ERROR_FILE_READ_ONLY = 6009;
-const HRESULT ERROR_REVISION_MISMATCH = 1306;
-const HRESULT ERROR_ALREADY_INITIALIZED = 1247;
-
-const HRESULT DISP_E_BADVARTYPE = 0x80020008;
-const HRESULT DISP_E_OVERFLOW = 0x8002000A;
-const HRESULT DISP_E_TYPEMISMATCH = 0x80020005;
-const HRESULT DISP_E_EXCEPTION = 0x80020009;
-const HRESULT DISP_E_PARAMNOTOPTIONAL = 0x8002000F;
-const HRESULT DISP_E_UNKNOWNNAME = 0x80020006;
-const HRESULT DISP_E_BADPARAMCOUNT = 0x8002000E;
-const HRESULT NTE_BAD_LEN = 0x80090004;
-
-const HRESULT RPC_S_OK = 0;
-const HRESULT RPC_S_OUT_OF_MEMORY = ERROR_OUTOFMEMORY;
-const HRESULT RPC_S_INVALID_STRING_BINDING = 1700;
-const HRESULT RPC_S_WRONG_KIND_OF_BINDING = 1701;
-const HRESULT RPC_S_INVALID_BINDING = 1702;
-const HRESULT RPC_S_PROTSEQ_NOT_SUPPORTED = 1703;
-const HRESULT RPC_S_INVALID_RPC_PROTSEQ = 1704;
-const HRESULT RPC_S_INVALID_STRING_UUID = 1705;
-const HRESULT RPC_S_INVALID_ENDPOINT_FORMAT = 1706;
-const HRESULT RPC_S_INVALID_NET_ADDR = 1707;
-const HRESULT RPC_S_NO_ENDPOINT_FOUND = 1708;
-const HRESULT RPC_S_INVALID_TIMEOUT = 1709;
-const HRESULT RPC_S_OBJECT_NOT_FOUND = 1710;
-const HRESULT RPC_S_ALREADY_REGISTERED = 1711;
-const HRESULT RPC_S_TYPE_ALREADY_REGISTERED = 1712;
-const HRESULT RPC_S_ALREADY_LISTENING = 1713;
-const HRESULT RPC_S_NO_PROTSEQS_REGISTERED = 1714;
-const HRESULT RPC_S_NOT_LISTENING = 1715;
-const HRESULT RPC_S_UNKNOWN_MGR_TYPE = 1716;
-const HRESULT RPC_S_UNKNOWN_IF = 1717;
-const HRESULT RPC_S_NO_BINDINGS = 1718;
-const HRESULT RPC_S_NO_PROTSEQS = 1719;
-const HRESULT RPC_S_CANT_CREATE_ENDPOINT = 1720;
-const HRESULT RPC_S_OUT_OF_RESOURCES = 1721;
-const HRESULT RPC_S_SERVER_UNAVAILABLE = 1722;
-const HRESULT RPC_S_SERVER_TOO_BUSY = 1723;
-const HRESULT RPC_S_INVALID_NETWORK_OPTIONS = 1724;
-const HRESULT RPC_S_NO_CALL_ACTIVE = 1725;
-const HRESULT RPC_S_CALL_FAILED = 1726;
-const HRESULT RPC_S_CALL_FAILED_DNE = 1727;
-const HRESULT RPC_S_PROTOCOL_ERROR = 1728;
-const HRESULT RPC_S_UNSUPPORTED_TRANS_SYN = 1730;
-const HRESULT RPC_S_UNSUPPORTED_TYPE = 1732;
-const HRESULT RPC_S_INVALID_TAG = 1733;
-const HRESULT RPC_S_INVALID_BOUND = 1734;
-const HRESULT RPC_S_NO_ENTRY_NAME = 1735;
-const HRESULT RPC_S_INVALID_NAME_SYNTAX = 1736;
-const HRESULT RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737;
-const HRESULT RPC_S_UUID_NO_ADDRESS = 1739;
-const HRESULT RPC_S_DUPLICATE_ENDPOINT = 1740;
-const HRESULT RPC_S_UNKNOWN_AUTHN_TYPE = 1741;
-const HRESULT RPC_S_MAX_CALLS_TOO_SMALL = 1742;
-const HRESULT RPC_S_STRING_TOO_LONG = 1743;
-const HRESULT RPC_S_PROTSEQ_NOT_FOUND = 1744;
-const HRESULT RPC_S_PROCNUM_OUT_OF_RANGE = 1745;
-const HRESULT RPC_S_BINDING_HAS_NO_AUTH = 1746;
-const HRESULT RPC_S_UNKNOWN_AUTHN_SERVICE = 1747;
-const HRESULT RPC_S_UNKNOWN_AUTHN_LEVEL = 1748;
-const HRESULT RPC_S_INVALID_AUTH_IDENTITY = 1749;
-const HRESULT RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750;
-
-const HRESULT FACILITY_WINDOWS = 8;
-const HRESULT FACILITY_URT = 19;
-const HRESULT FACILITY_STORAGE = 3;
-const HRESULT FACILITY_SSPI = 9;
-const HRESULT FACILITY_SCARD = 16;
-const HRESULT FACILITY_SETUPAPI = 15;
-const HRESULT FACILITY_SECURITY = 9;
-const HRESULT FACILITY_RPC = 1;
-const HRESULT FACILITY_WIN32 = 7;
-const HRESULT FACILITY_CONTROL = 10;
-const HRESULT FACILITY_NULL = 0;
-const HRESULT FACILITY_MSMQ = 14;
-const HRESULT FACILITY_MEDIASERVER = 13;
-const HRESULT FACILITY_INTERNET = 12;
-const HRESULT FACILITY_ITF = 4;
-const HRESULT FACILITY_DISPATCH = 2;
-const HRESULT FACILITY_COMPLUS = 17;
-const HRESULT FACILITY_CERT = 11;
-const HRESULT FACILITY_ACS = 20;
-const HRESULT FACILITY_AAF = 18;
-
-const HRESULT SEVERITY_SUCCESS = 0;
-const HRESULT SEVERITY_ERROR = 1;
-
-#define HRESULT_FROM_WIN32(x) ((HRESULT)(x) <= 0 ? ((HRESULT)(x)) : ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000)))
-
-#define SUCCEEDED(status) ((HRESULT)(status) >= 0)
-#define FAILED(status) ((HRESULT)(status) < 0)
-#define IS_ERROR(status) ((uint32)(status) >> 31 == SEVERITY_ERROR)
-
-#define HRESULT_CODE(hr) ((hr) & 0xFFFF)
-#define SCODE_CODE(sc) ((sc) & 0xFFFF)
-
-#define HRESULT_FACILITY(hr) (((hr) >> 16) & 0x1FFF)
-#define SCODE_FACILITY(sc) (((sc) >> 16) & 0x1FFF)
-
-#define HRESULT_SEVERITY(hr) (((hr) >> 31) & 0x1
-#define SCODE_SEVERITY(sc) (((sc) >> 31) & 0x1)
-
-#define MAKE_HRESULT(sev,fac,code) \
- ((HRESULT) (((uint32)(sev)<<31) | ((uint32)(fac)<<16) | ((uint32)(code))) )
-#define MAKE_SCODE(sev,fac,code) \
- ((HRESULT) (((uint32)(sev)<<31) | ((uint32)(fac)<<16) | ((uint32)(code))) )
-
-#endif
-
-#endif /* PLATFORMERRORS_H_ */
+++ /dev/null
-/*
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef PLATFORM_IID_H
-#define PLATFORM_IID_H
-
-#ifndef WIN32
-
- #include <string>
- #include <memory.h>
-
- struct GUID
- {
- // this must match the Windows GUID structure
- uint32 Data1; // 4 bytes
- uint16 Data2; // 2 bytes
- uint16 Data3; // 2 bytes
- byte Data4[8]; // 8 bytes
- };
-
- typedef GUID IID, UUID;
-
- inline bool IsEqualGUID(const GUID& rguid1, const GUID& rguid2)
- {
- return (!::memcmp(&rguid1,&rguid2,sizeof(GUID)));
- }
-
- #define IsEqualIID(rguid1,rguid2) IsEqualGUID(rguid1,rguid2)
- #define IsEqualUUID(rguid1,rguid2) IsEqualGUID(rguid1,rguid2)
-
- extern HRESULT UuidCreate(UUID* uuid);
-
-#endif
-
-namespace BasePlatform {
-BASEPLATFORM_LINKAGE std::string UuidToString(const UUID& uuid);
-BASEPLATFORM_LINKAGE HRESULT UuidFromString(const char* strGuid, UUID& uuid);
-
-// This mutex is used to guard the construction of the IIDs in the IIDOF macro
-extern BASEPLATFORM_LINKAGE GMutex gs_BaseIIDInitMutex;
-}
-
-#define CAF_DECL_UUID(iid) \
-public: \
-static const IID & IIDOF() \
-{ \
- static IID ms_oIID; \
- static bool m_bIsSet; \
- g_mutex_lock(&BasePlatform::gs_BaseIIDInitMutex); \
- if ( !m_bIsSet ) \
- { \
- BasePlatform::UuidFromString( iid , ms_oIID ); \
- m_bIsSet = true; \
- } \
- g_mutex_unlock(&BasePlatform::gs_BaseIIDInitMutex); \
- return ms_oIID; \
-}
-
-#define CAF_IIDOF(type_name) type_name::IIDOF()
-
-#endif
+++ /dev/null
-/*
- * Author: mdonahue
- * Created: Jan 13, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef PLATFORMSTRINGFUNC_H_
-#define PLATFORMSTRINGFUNC_H_
-
-namespace BasePlatform {
-
- //extern std::wstring A2W(const std::string& str);
- //extern std::string W2A(const std::wstring& str);
-}
-
-#endif /* PLATFORMSTRINGFUNC_H_ */
+++ /dev/null
-/*
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef PLATFORM_TYPES_H
-#define PLATFORM_TYPES_H
-
-#ifdef WIN32
-
-#include <wtypes.h>
-
-#else
-// #include <sys/timeb.h>
-#include <sys/types.h>
-#include <wchar.h>
-#if defined (__linux__) || defined (__APPLE__)
- #include <stdint.h>
-#endif
-
-//typedef int32 RPC_STATUS;
-
-#define __declspec(value)
-#define __stdcall
-#define __cdecl
-#define APIENTRY
-
-#define FAR
-
-typedef void * HINSTANCE;
-typedef void * HMODULE;
-typedef void * HANDLE;
-typedef void * LPVOID;
-typedef bool BOOL;
-typedef uint8_t byte;
-typedef int32_t HRESULT;
-#endif
-
-#endif // PLATFORM_TYPES_H
+++ /dev/null
-/*
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-#ifndef _TCafObject_h
-#define _TCafObject_h
-
-template <class Base>
-class TCafObject : public Base {
-public:
- TCafObject() : _refCnt(0) {}
-
-public: // ICafObect Implementations
- void AddRef() {
- g_atomic_int_inc(&_refCnt);
- }
-
- void Release() {
- if (g_atomic_int_dec_and_test(&_refCnt)) {
- delete this;
- }
- }
-
- void QueryInterface(const IID&, void**) {
- throw std::runtime_error("QueryInterface not supported");
- }
-
-private:
- gint _refCnt;
-
-private:
- TCafObject(const TCafObject&);
- TCafObject& operator=(const TCafObject&);
-};
-
-#endif
+++ /dev/null
-/*
- * Created: May 25, 2004
- *
- * Copyright (c) 2004-2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef TCAFQIOBJECT_H_
-#define TCAFQIOBJECT_H_
-
-template <class Base>
-class TCafQIObject : public TCafObject<Base>
-{
-public:
- TCafQIObject ()
- {
- }
-
- virtual ~TCafQIObject ()
- {
- }
-
-public:
- virtual void QueryInterface( const IID& criid, void** ppv )
- {
- Base::_InternalQueryInterface( criid, ppv );
- }
-};
-
-////////////////////////////////////////////////////////////////////////
-//
-// QI map
-//
-////////////////////////////////////////////////////////////////////////
-#define CAF_BEGIN_QI() \
-protected: \
- void _InternalQueryInterface (const IID &criid, void **ppv) \
- { \
- try \
- { \
- if (ppv) \
- { \
- *ppv = NULL; \
- bool bUseFirstInterface = (::IsEqualGUID(criid, CAF_IIDOF(::ICafObject)) != 0); \
- if (0);
-
-#define CAF_QI_ENTRY(Interface) \
- else if (bUseFirstInterface || ::IsEqualGUID(criid, CAF_IIDOF(Interface))) \
- *ppv = static_cast<Interface *>(this);
-
-#define CAF_QI_ENTRY2(Interface, IntermediateInterface) \
- else if (bUseFirstInterface || ::IsEqualGUID(criid, CAF_IIDOF(Interface))) \
- *ppv = static_cast<Interface *>(static_cast<IntermediateInterface *>(this));
-
-#define CAF_END_QI() \
- if (*ppv) \
- reinterpret_cast<ICafObject *>(this)->AddRef(); \
- } \
- } \
- catch (...) \
- { \
- } \
- }
-
-////////////////////////////////////////////////////////////////////////
-//
-// Object Id - required for ISerializableObject
-//
-////////////////////////////////////////////////////////////////////////
-#define CAF_MAKE_OBJECT_ID(Factory, Class) \
- (std::string(Factory) + std::string(":") + std::string( #Class ))
-
-#define CAF_DECLARE_OBJECT_ID(Class, Factory) \
- public: \
- virtual std::string GetObjectId () const \
- { \
- return CAF_MAKE_OBJECT_ID(Factory, Class); \
- }
-
-// Declare a smart pointer to a class that supports QI after the class has been declared
-#define CAF_DECLARE_SMART_QI_POINTER(ClassName) \
- typedef TCafSmartPtr<ClassName, TCafQIObject<ClassName> > SmartPtr##ClassName; \
- typedef TCafSmartPtr<const ClassName, TCafQIObject<ClassName> > ConstPtr##ClassName
-
-// Forward declare a smart pointer to a class that supports QI
-#define CAF_DECLARE_CLASS_AND_IMPQI_POINTER(ClassName) \
- class ClassName; \
- CAF_DECLARE_SMART_QI_POINTER(ClassName)
-
-#endif /* TCAFQIOBJECT_H_ */
+++ /dev/null
-/*
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef _TCafSmartPtr_H
-#define _TCafSmartPtr_H
-
-#ifdef WIN32
-// Disable C4800 - performance warning forcing value to 'true' or 'false'
-#pragma warning(disable: 4800)
-#endif
-
-// Forward declarations for Subsystem calls
-#ifndef SUBSYSTEMBASE_LINKAGE
-#ifdef WIN32
-#ifdef FRAMEWORK_BUILD
-#define SUBSYSTEMBASE_LINKAGE __declspec(dllexport)
-#else
-#define SUBSYSTEMBASE_LINKAGE __declspec(dllimport)
-#endif
-#else
-#define SUBSYSTEMBASE_LINKAGE
-#endif
-#endif
-
-namespace Caf {
-extern "C" void SUBSYSTEMBASE_LINKAGE CreateObject(const char* cszObjectId, const IID& criid, void** ppv);
-//extern "C" void SUBSYSTEMBASE_LINKAGE CreateQIObject(const char* cszFactoryId, const char* cszClassName, const IID& criid, void** ppv);
-}
-
-/**
- * @brief Template to wrap any interface or class and provide lifetime management.
- * <p>
- * Lifetime is managed through reference counting with counts stored in the object
- * itself. The reference methods are AddRef() and Release(). When the reference
- * count reaches zero the object will delete itself.
- * <p>
- * Template instantiation:<br>
- * <i>Cl</i> is used for accessing the class. It may or may not be derived from
- * #ICafObject.<br>
- * <i>CreateCl</i> is used for creating the class and reference counting. It must
- * support the #ICafObject interface.
- */
-// CreateCl is used for creation and reference counting and must support the
-// ICafObject interface. Cl is used for accessing the class.
-template<class Cl, class CreateCl = Cl>
-class TCafSmartPtr {
-public:
- typedef Cl class_type;
- typedef CreateCl create_type;
-
-private:
- typedef TCafSmartPtr<Cl, CreateCl> SameSmartType;
-
-public:
- // constructors/destructors
-
- // default constructor
- TCafSmartPtr(void) :
- m_pCl(0) {
- }
-
- // homogeneous raw constructor
- TCafSmartPtr(Cl *rhs) {
- m_pCl = rhs;
- if (m_pCreateCl)
- m_pCreateCl->AddRef();
- }
-
- // derived class smart constructor
- template<class Derived, class CreateDerived>
- TCafSmartPtr(const TCafSmartPtr<Derived, CreateDerived> &rhs) {
- m_pCl = rhs.GetNonAddRefedInterface();
- if (m_pCreateCl)
- m_pCreateCl->AddRef();
- }
-
- // homogeneous smart constructor
- TCafSmartPtr(const SameSmartType& rhs) {
- m_pCl = rhs.m_pCl;
- if (m_pCreateCl)
- m_pCreateCl->AddRef();
- }
-
- // don't allow construction from bool
- explicit TCafSmartPtr(const bool &rb) {
- int32 CantConstructSmartPointerFromBool[0];
- }
-
- // destructor
- ~TCafSmartPtr(void) {
- if (m_pCreateCl)
- m_pCreateCl->Release();
- }
-
-public:
- // assignment operators
-
- // homogeneous raw assignment
- SameSmartType &operator=(Cl *rhs) {
- Attach(rhs);
- return *this;
- }
-
- // derived class smart assignment
- template<class Derived, class CreateDerived>
- SameSmartType &operator=(const TCafSmartPtr<Derived, CreateDerived> &rhs) {
- Attach(rhs.GetNonAddRefedInterface());
- return *this;
- }
-
- // homogeneous smart assignment
- SameSmartType &operator=(const SameSmartType &rhs) {
- Attach(rhs.m_pCl);
- return *this;
- }
-
- // don't allow assignment from bool
- void operator=(bool &rb) {
- int32 CantAssignSmartPointerFromBool[0];
- }
-
-private:
-
- // This helper class is used to ensure that the old smart object gets
- // released in a safe manner. It is not safe to touch 'this' in any way
- // whatsoever after releasing the old smart object because the release
- // could set off a chain of destruction that results in this smart pointer
- // being destroyed. Note that this includes the exception macros which
- // reference the automatically-defined class name member variable.
- class CSafeAutoRelease {
- public:
- CSafeAutoRelease(CreateCl *pOldCreateCl) :
- m_pOldCreateCl(pOldCreateCl) {
- }
- ~CSafeAutoRelease() {
- if (m_pOldCreateCl)
- m_pOldCreateCl->Release();
- }
- CreateCl *m_pOldCreateCl;
- };
-
-public:
- /**
- * @brief Retrieve an interface from a ICafObject pointer and assign the result to self
- * @param piObj the object to be queried
- * @param cbIsRequired if <b>true</b> then the operation must succeed else an
- * exception will be thrown. If <b>false</b> then the self value will be NULL
- * if the operation fails.
- */
- void QueryInterface(ICafObject *piObj, const bool cbIsRequired = true) {
- CSafeAutoRelease oAutoRelease(m_pCreateCl);
-
- m_pCreateCl = NULL;
- if (piObj)
- piObj->QueryInterface(GetIID(), reinterpret_cast<void **>(&m_pCreateCl));
- if (cbIsRequired && !m_pCreateCl)
- throw std::bad_cast();
- }
-
- /**
- * @brief Retrieve an interface from another smart pointer and assign the result to self
- * @param rhs the object to be queried
- * @param cbIsRequired if <b>true</b> then the operation must succeed else an
- * exception will be thrown. If <b>false</b> then the self value will be NULL
- * if the operation fails.
- */
- template<class QI, class CreateQI>
- void QueryInterface(const TCafSmartPtr<QI, CreateQI> &rhs, const bool cbIsRequired = true) {
- CSafeAutoRelease oAutoRelease(m_pCreateCl);
-
- m_pCreateCl = NULL;
- if (rhs)
- rhs.QueryInterface(GetIID(), reinterpret_cast<void **>(&m_pCreateCl));
- if (cbIsRequired && !m_pCreateCl)
- throw std::bad_cast();
- }
-
- // This function is provided so that the delegation can go through m_pCreateCl
- // rather than m_pCl. This way, if this is a smart pointer to a class that
- // derives from multiple interfaces the compiler will not get confused about
- // which QueryInterface function to use.
- void QueryInterface(const IID &criid, void **ppv) const {
- *ppv = NULL;
- m_pCreateCl->QueryInterface(criid, ppv);
- }
-
- /**
- * @brief Return the UUID of the object
- * @return the UUID
- */
- static const IID& GetIID() {
- // Compiler bug workaround (see comments before COpaqueTemplate)
- // return TEcmSmartPtr_GetIID(static_cast<COpaqueTemplate<Cl> *>(NULL));
- return CAF_IIDOF(Cl);
- }
-
-public:
- // comparison operators
-
- bool operator==(const Cl *rhs) const {
- return m_pCl == rhs;
- }
-
- template<class Derived, class CreateDerived>
- bool operator==(const TCafSmartPtr<Derived, CreateDerived> &rhs) const {
- return m_pCl == rhs.GetNonAddRefedInterface();
- }
-
- bool operator!=(const Cl *rhs) const {
- return m_pCl != rhs;
- }
-
- template<class Derived, class CreateDerived>
- bool operator!=(const TCafSmartPtr<Derived, CreateDerived> &rhs) const {
- return m_pCl != rhs.GetNonAddRefedInterface();
- }
-
- bool operator<(const SameSmartType &rhs) const {
- return (m_pCl < rhs.m_pCl);
- }
-
-public:
- // conversion
-
- // This takes the place of operator bool.
- // It turns out that the presence of operator bool
- // causes the compiler to "get lost" when compiling
- // comparison operations such as if( spcPtr1 == spcPtr2)...
- //
- // This conversion operator will satisfy the compiler when
- // compiling comparison operations.
- class PseudoBool {
- };
- operator PseudoBool *() const {
- return (PseudoBool *) m_pCl;
- }
-
-public:
- // instance creation
- /**
- * @brief Create an instance of the CreateCl object
- * <p>
- * The object will have an initial reference count of 1.
- */
- void CreateInstance() {
- CSafeAutoRelease oAutoRelease(m_pCreateCl);
-
- ////////////////////////////////////////////////////////////////////////
- //
- // This code is used to verify that it is safe to use a union of Cl
- // and CreateCl. An error indicates that it is *not* safe in which
- // case the smart pointer cannot be used as defined. To solve this
- // problem, eliminate the second template parameter from the smart
- // pointer definition which will force Cl and CreateCl to be the
- // same, e.g.:
- //
- // typedef TCafSmartPtr<TCafObject<Class> > SmartPtrClass;
- //
- ////////////////////////////////////////////////////////////////////////
- Cl *pCl = static_cast<Cl *>(reinterpret_cast<CreateCl *>(0x4));
- if (pCl != reinterpret_cast<Cl *>(0x4))
- throw std::logic_error("Illegal use of TCafSmartPtr<> (See comments in TCafSmartPtr.h)");
- m_pCreateCl = new CreateCl;
- if (!m_pCreateCl)
- throw std::bad_alloc();
- m_pCreateCl->AddRef();
- }
-
- /**
- * @brief Create an instance of a subsystem object
- * <p>
- * Objects exposed as subsystems (#Caf::TCafSubSystemSmartCl) are identified
- * by a string. The Cl and CreateCl template arguments would both be
- * set to an interface on the subsystem object of interest.
- * <p>
- * The object will have an initial reference count of 1.
- */
- void CreateInstance(const char* cszObjectId) {
- CSafeAutoRelease oAutoRelease(m_pCreateCl);
- Caf::CreateObject(cszObjectId, GetIID(), reinterpret_cast<void **>(&m_pCreateCl));
- }
-
-// void CreateInstance (const char *cszFactoryId, const char *cszClassName)
-// {
-// CSafeAutoRelease oAutoRelease(m_pCreateCl);
-// Caf::CreateQIObject(cszFactoryId, cszClassName, GetIID(), reinterpret_cast<void **>(&m_pCreateCl));
-// }
-
-public:
- // operations
- Cl *GetAddRefedInterface() const {
- if (!m_pCl)
- throw std::runtime_error("TCafSmartPtr: m_pCl is NULL");
- if (m_pCreateCl)
- m_pCreateCl->AddRef();
- return m_pCl;
- }
-
- Cl *GetNonAddRefedInterface() const {
- return m_pCl;
- }
-
- Cl **GetReleasedInterfaceReference(void) {
- CSafeAutoRelease oAutoRelease(m_pCreateCl);
- m_pCreateCl = NULL;
- return &m_pCreateCl;
- }
-
- Cl **GetNonReleasedInterfaceReference(void) {
- return &m_pCreateCl;
- }
-
- void **GetAsPPVArg(void) {
- return (void**) GetReleasedInterfaceReference();
- }
-
- bool IsNull() const {
- return m_pCl == 0;
- }
-
- // the arrow operator simply returns the pointer
- Cl *operator->() const {
- if (!m_pCl)
- throw std::runtime_error("TCafSmartPtr: m_pCl is NULL");
- return m_pCl;
- }
-
- Cl &operator*() const {
- if (!m_pCl)
- throw std::runtime_error("TCafSmartPtr: m_pCl is NULL");
- return *m_pCl;
- }
-
-private:
- // m_pCreateCl is used for reference counting; m_pCl is used for object access.
- union {
- Cl *m_pCl;
- CreateCl *m_pCreateCl;
- };
-
-private:
- // homogeneous raw attachment
- void Attach(Cl* rhs) {
- CSafeAutoRelease oAutoRelease(m_pCreateCl);
- m_pCl = rhs;
- if (m_pCreateCl)
- m_pCreateCl->AddRef();
- }
-};
-
-// These template functions will give you a reference to the
-// underlying object wraped in a smart class
-template<class Cl, class CreateCl>
-const Cl& ToObj(const TCafSmartPtr<Cl, CreateCl>& spcT) {
- return *(spcT.GetNonAddRefedInterface());
-}
-
-template<class Cl, class CreateCl>
-Cl& ToNonConstObj(const TCafSmartPtr<Cl, CreateCl>& spcT) {
- return *(spcT.GetNonAddRefedInterface());
-}
-
-////////////////////////////////////////////////////////////////////////
-//
-// Declaration Macros
-//
-////////////////////////////////////////////////////////////////////////
-
-// Declare a smart pointer after the class has been declared
-#define CAF_DECLARE_SMART_POINTER(ClassName) \
- typedef TCafSmartPtr<ClassName, TCafObject<ClassName> > SmartPtr##ClassName; \
-// typedef TCafSmartPtr<const ClassName, TCafObject<ClassName> > ConstPtr##ClassName
-
-// Forward declare a class smart pointer
-#define CAF_DECLARE_CLASS_AND_SMART_POINTER(ClassName) \
- class ClassName; \
- CAF_DECLARE_SMART_POINTER(ClassName)
-
-// Forward declare a struct smart pointer
-#define CAF_DECLARE_STRUCT_AND_SMART_POINTER(StructName) \
- struct StructName; \
- CAF_DECLARE_SMART_POINTER(StructName)
-
-// Helper macro - do not use directly
-#define CAF_DECLARE_SMART_INTERFACE_HELPER(InterfaceName) \
- typedef TCafSmartPtr<InterfaceName> SmartPtr##InterfaceName; \
-// typedef TCafSmartPtr<const InterfaceName, InterfaceName> ConstPtr##InterfaceName
-
-// Declare a smart pointer to an interface in the interface header file
-#define CAF_DECLARE_SMART_INTERFACE_POINTER(InterfaceName) \
- CAF_DECLARE_SMART_INTERFACE_HELPER(InterfaceName)
-
-// Forward declare a smart interface pointer
-#define CAF_FORWARD_DECLARE_SMART_INTERFACE(InterfaceName) \
- struct InterfaceName; \
- CAF_DECLARE_SMART_INTERFACE_HELPER(InterfaceName)
-
-#endif // #ifndef _TCafSmartPtr_H
+++ /dev/null
-/*
- * Created on: Jul 23, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef TCAFSTACKOBJECT_H_
-#define TCAFSTACKOBJECT_H_
-
-namespace Caf {
-
-template <class Base>
-class TCafStackObject : public Base {
-public:
- TCafStackObject() {}
- virtual ~TCafStackObject() {}
-
-private:
- virtual void AddRef() {
- throw std::runtime_error("TCafStackObj::AddRef not supported");
- }
-
- virtual void Release() {
- throw std::runtime_error("TCafStackObj::Release not supported");
- }
-
- virtual void QueryInterface(const IID&, void** ppv) {
- throw std::runtime_error("TCafStackObj::QueryInterface not supported");
- }
-};
-
-}
-#endif /* TCAFSTACKOBJECT_H_ */
+++ /dev/null
-/*
- * Author: mdonahue
- * Created: Jan 20, 2011
- *
- * Copyright (c) 2011 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CMARKUPPARSER_H_
-#define CMARKUPPARSER_H_
-
-#include <list>
-#include <map>
-
-namespace Caf {
-
-/*
- * Wrapper around glib GMarkupParser to store results in std containers
- */
-namespace MarkupParser {
-
-// attribute name, value
-typedef std::pair<std::string, std::string> Attribute;
-typedef std::list<Attribute> Attributes;
-
-struct AttributeName : public std::binary_function<Attribute, std::string, bool> {
- bool operator()(const Attribute& attr, const std::string& name) const {
- return (attr.first.compare(name) == 0);
- }
-};
-
-struct Element;
-CAF_DECLARE_SMART_POINTER(Element);
-struct Element {
- Element() {}
- std::string name;
- std::string value;
- Attributes attributes;
- typedef std::list<SmartPtrElement> Children;
- Children children;
-
- CAF_CM_DECLARE_NOCOPY(Element);
-};
-
-struct ElementName : public std::binary_function<SmartPtrElement, std::string, bool> {
- bool operator()(const SmartPtrElement& element, const std::string& name) const {
- return (element->name.compare(name) == 0);
- }
-};
-
-SmartPtrElement MARKUPPARSER_LINKAGE parseString(const std::string& xml);
-
-SmartPtrElement MARKUPPARSER_LINKAGE parseFile(const std::string& file);
-
-typedef Element::Children::iterator ChildIterator;
-typedef Attributes::iterator AttributeIterator;
-
-ChildIterator MARKUPPARSER_LINKAGE findChild(SmartPtrElement& element, const std::string& name);
-
-AttributeIterator MARKUPPARSER_LINKAGE findAttribute(Attributes& attributes, const std::string& name);
-
-std::string MARKUPPARSER_LINKAGE getAttributeValue(SmartPtrElement& element, const std::string& name);
-
-}}
-
-#endif /* CMARKUPPARSER_H_ */
+++ /dev/null
-/*
- * Author: mdonahue
- * Created: Dec 3, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef _CXmlElement_h
-#define _CXmlElement_h
-
-namespace Caf {
-
-CAF_DECLARE_CLASS_AND_SMART_POINTER(CXmlElement);
-
-class XMLUTILS_LINKAGE CXmlElement {
-public:
- typedef std::map<std::string, std::string> CAttributeCollection;
- typedef std::multimap<std::string, SmartPtrCXmlElement> CElementCollection;
- typedef std::deque<SmartPtrCXmlElement> COrderedElementCollection;
- CAF_DECLARE_SMART_POINTER(CAttributeCollection);
- CAF_DECLARE_SMART_POINTER(CElementCollection);
- CAF_DECLARE_SMART_POINTER(COrderedElementCollection);
-
-public:
- CXmlElement();
- virtual ~CXmlElement();
-
-public:
- void initialize(const MarkupParser::SmartPtrElement& element, const std::string& path);
- MarkupParser::SmartPtrElement getInternalElement();
-
-public: // Read operations
-
- std::string findRequiredAttribute(const std::string& name) const;
- std::string findOptionalAttribute(const std::string& name) const;
- SmartPtrCXmlElement findRequiredChild(const std::string& name) const;
- SmartPtrCXmlElement findOptionalChild(const std::string& name) const;
- SmartPtrCElementCollection findRequiredChildren(const std::string& name) const;
- SmartPtrCElementCollection findOptionalChildren(const std::string& name) const;
- SmartPtrCAttributeCollection getAllAttributes() const;
- SmartPtrCElementCollection getAllChildren() const;
- SmartPtrCOrderedElementCollection getAllChildrenInOrder() const;
- std::string getName() const;
- std::string getValue() const;
- std::string getCDataValue() const;
- std::string getPath() const;
-
-public: // Write operations
- void addAttribute(const std::string& name, const std::string& value);
- void removeAttribute(const std::string& name);
- void setAttribute(const std::string& name, const std::string& value);
- SmartPtrCXmlElement createAndAddElement(const std::string& name);
- void addChild(const SmartPtrCXmlElement& xmlElement);
- void removeChild(const std::string& name);
- void setValue(const std::string& value);
- void setCDataValue(const std::string& value);
- void appendValue(const std::string& value);
- void saveToFile(const std::string& filename) const;
- std::string saveToString() const;
- std::string saveToStringRaw() const;
-
-private:
- static const std::string CDATA_BEG;
- static const std::string CDATA_END;
-
-private:
- bool _isInitialized;
- mutable MarkupParser::SmartPtrElement _element;
- std::string _path;
-
-private:
- static void saveToString(const MarkupParser::SmartPtrElement& element, std::string& xml);
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CXmlElement);
-};
-
-CAF_DECLARE_SMART_POINTER(CXmlElement);
-
-}
-
-#endif /* _CXmlElement_h */
libFramework_la_SOURCES=
libFramework_la_SOURCES += Framework/src/BasePlatform.cpp
-libFramework_la_SOURCES += Framework/src/CommonGlobals.cpp
-libFramework_la_SOURCES += Framework/src/PlatformIID.cpp
-libFramework_la_SOURCES += Framework/src/PlatformStringFunc.cpp
-libFramework_la_SOURCES += Framework/src/Logging/CLogger.cpp
-libFramework_la_SOURCES += Framework/src/Exception/CBacktraceUtils.cpp
-libFramework_la_SOURCES += Framework/src/Exception/CCafException.cpp
-libFramework_la_SOURCES += Framework/src/Exception/CCafExceptionEx.cpp
-libFramework_la_SOURCES += Framework/src/Exception/CValidate.cpp
-libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmDllManager.cpp
-libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmSubSystem.cpp
-libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmSubSystemModule.cpp
-libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmSubSystemRegistry.cpp
-libFramework_la_SOURCES += Framework/src/SubSystemBase/EcmSubSystemBase.cpp
-libFramework_la_SOURCES += Framework/src/Xml/MarkupParser/CMarkupParser.cpp
-libFramework_la_SOURCES += Framework/src/Xml/XmlUtils/CXmlElement.cpp
-libFramework_la_SOURCES += Framework/src/Xml/XmlUtils/CXmlUtils.cpp
libFramework_la_SOURCES += Framework/src/Common/AppConfigUtils.cpp
-libFramework_la_SOURCES += Framework/src/Common/CafInitialize.cpp
libFramework_la_SOURCES += Framework/src/Common/CAppConfig.cpp
libFramework_la_SOURCES += Framework/src/Common/CApplicationContext.cpp
libFramework_la_SOURCES += Framework/src/Common/CAutoCondition.cpp
libFramework_la_SOURCES += Framework/src/Common/CAutoRecMutex.cpp
libFramework_la_SOURCES += Framework/src/Common/CCafRegex.cpp
libFramework_la_SOURCES += Framework/src/Common/CCmdLineOptions.cpp
-libFramework_la_SOURCES += Framework/src/Common/CConfigParamsChain.cpp
libFramework_la_SOURCES += Framework/src/Common/CConfigParams.cpp
+libFramework_la_SOURCES += Framework/src/Common/CConfigParamsChain.cpp
libFramework_la_SOURCES += Framework/src/Common/CDaemonUtils.cpp
libFramework_la_SOURCES += Framework/src/Common/CDateTimeUtils.cpp
libFramework_la_SOURCES += Framework/src/Common/CEnvironmentUtils.cpp
libFramework_la_SOURCES += Framework/src/Common/CThreadUtils.cpp
libFramework_la_SOURCES += Framework/src/Common/CTimeUnit.cpp
libFramework_la_SOURCES += Framework/src/Common/CVariant.cpp
+libFramework_la_SOURCES += Framework/src/Common/CafInitialize.cpp
libFramework_la_SOURCES += Framework/src/Common/UriUtils.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CAbstractMessageChannel.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CAbstractMessageRouter.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CAbstractPollableChannel.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CBroadcastingDispatcher.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CChannelInterceptorAdapter.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CChannelResolver.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CDocument.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CErrorHandler.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CExpressionHandler.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CIntegrationAppContext.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CIntException.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CIntMessage.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CIntMessageHeaders.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CMessageHandler.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CMessageHeaderUtils.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CMessagingTemplate.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CMessagingTemplateHandler.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CSourcePollingChannelAdapter.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/CUnicastingDispatcher.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/FileHeaders.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Core/MessageHeaders.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Caf/CBeanPropertiesHelper.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessageCreator.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessageHeaders.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessageHeadersWriter.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessagePayload.cpp
-libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessagePayloadParser.cpp
+libFramework_la_SOURCES += Framework/src/CommonGlobals.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAddInCollectionDoc.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAddInsDoc.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentCollectionDoc.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ResponseXml.cpp
libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.cpp
-libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.cpp
+libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.cpp
+libFramework_la_SOURCES += Framework/src/Exception/CBacktraceUtils.cpp
+libFramework_la_SOURCES += Framework/src/Exception/CCafException.cpp
+libFramework_la_SOURCES += Framework/src/Exception/CCafExceptionEx.cpp
+libFramework_la_SOURCES += Framework/src/Exception/CValidate.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Caf/CBeanPropertiesHelper.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessageCreator.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessageHeaders.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessageHeadersWriter.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessagePayload.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessagePayloadParser.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CAbstractMessageChannel.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CAbstractMessageRouter.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CAbstractPollableChannel.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CBroadcastingDispatcher.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CChannelInterceptorAdapter.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CChannelResolver.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CDocument.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CErrorHandler.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CExpressionHandler.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CIntException.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CIntMessage.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CIntMessageHeaders.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CIntegrationAppContext.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CMessageHandler.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CMessageHeaderUtils.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CMessagingTemplate.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CMessagingTemplateHandler.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CSourcePollingChannelAdapter.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/CUnicastingDispatcher.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/FileHeaders.cpp
+libFramework_la_SOURCES += Framework/src/Integration/Core/MessageHeaders.cpp
+libFramework_la_SOURCES += Framework/src/Logging/CLogger.cpp
+libFramework_la_SOURCES += Framework/src/PlatformIID.cpp
+libFramework_la_SOURCES += Framework/src/PlatformStringFunc.cpp
+libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmDllManager.cpp
+libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmSubSystem.cpp
+libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmSubSystemModule.cpp
+libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmSubSystemRegistry.cpp
+libFramework_la_SOURCES += Framework/src/SubSystemBase/EcmSubSystemBase.cpp
+libFramework_la_SOURCES += Framework/src/Xml/MarkupParser/CMarkupParser.cpp
+libFramework_la_SOURCES += Framework/src/Xml/XmlUtils/CXmlElement.cpp
+libFramework_la_SOURCES += Framework/src/Xml/XmlUtils/CXmlUtils.cpp
libFramework_la_CPPFLAGS =
libFramework_la_CPPFLAGS += @GLIB2_CPPFLAGS@
libFramework_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@
libFramework_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-libFramework_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
libFramework_la_LIBADD =
libFramework_la_LIBADD += @GLIB2_LIBS@
libFramework_la_LIBADD += @LOG4CPP_LIBS@
libIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@
libIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-libIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
+libIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Subsystems/Integration/include
libIntegrationSubsys_la_LIBADD =
libIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@
libIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@
libCafIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@
libCafIntegrationSubsys_la_SOURCES=
-libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CafIntegration.cpp
libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.cpp
libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.cpp
libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CErrorToResponseTransformer.cpp
libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.cpp
libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CPayloadHeaderEnricher.cpp
libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.cpp
+libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CafIntegration.cpp
libCafIntegrationSubsys_la_CPPFLAGS =
libCafIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@
libCafIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@
libCafIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-libCafIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
+libCafIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Subsystems/CafIntegration/include
libCafIntegrationSubsys_la_LIBADD =
libCafIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@
libCafIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CEnvelopeToPayloadTransformerInstance_h_
-#define CEnvelopeToPayloadTransformerInstance_h_
-
-namespace Caf {
-
-class CEnvelopeToPayloadTransformerInstance :
- public TCafSubSystemObjectRoot<CEnvelopeToPayloadTransformerInstance>,
- public IIntegrationObject,
- public IIntegrationComponentInstance,
- public ITransformer,
- public IErrorProcessor {
-public:
- struct SExpandedFileAlias {
- std::string _filePath;
- std::string _encoding;
- };
- CAF_DECLARE_SMART_POINTER(SExpandedFileAlias);
-
-public:
- CEnvelopeToPayloadTransformerInstance();
- virtual ~CEnvelopeToPayloadTransformerInstance();
-
- CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdEnvelopeToPayloadTransformerInstance)
-
- CAF_BEGIN_INTERFACE_MAP(CEnvelopeToPayloadTransformerInstance)
- CAF_INTERFACE_ENTRY(IIntegrationObject)
- CAF_INTERFACE_ENTRY(IIntegrationComponentInstance)
- CAF_INTERFACE_ENTRY(ITransformer)
- CAF_INTERFACE_ENTRY(IErrorProcessor)
- CAF_END_INTERFACE_MAP()
-
-public: // IIntegrationObject
- void initialize(
- const IBean::Cargs& ctorArgs,
- const IBean::Cprops& properties,
- const SmartPtrIDocument& configSection);
-
- std::string getId() const;
-
-public: // IIntegrationComponentInstance
- void wire(
- const SmartPtrIAppContext& appContext,
- const SmartPtrIChannelResolver& channelResolver);
-
-public: // ITransformer
- SmartPtrIIntMessage transformMessage(
- const SmartPtrIIntMessage& message);
-
-public: // IErrorProcessor
- SmartPtrIIntMessage processErrorMessage(
- const SmartPtrIIntMessage& message);
-
-private:
- SmartPtrCDynamicByteArray findPayload(
- const std::deque<SmartPtrCAttachmentDoc>& attachmentCollection) const;
-
- std::deque<SmartPtrCAttachmentDoc> removePayload(
- const std::deque<SmartPtrCAttachmentDoc>& attachmentCollection) const;
-
-private:
- bool _isInitialized;
- std::string _id;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CEnvelopeToPayloadTransformerInstance);
-};
-
-}
-
-#endif // #ifndef CEnvelopeToPayloadTransformerInstance_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CFileReadingMessageSource_h_
-#define CFileReadingMessageSource_h_
-
-namespace Caf {
-
-class CFileReadingMessageSource :
- public CAbstractPollableChannel
-{
-private:
- typedef std::map<std::string, bool> CFileCollection;
- CAF_DECLARE_SMART_POINTER(CFileCollection);
-
-public:
- CFileReadingMessageSource();
- virtual ~CFileReadingMessageSource();
-
-public:
- void initialize(
- const SmartPtrIDocument& configSection);
-
-protected: // CAbstractPollableChannel
- bool doSend(
- const SmartPtrIIntMessage& message,
- int32 timeout);
-
- SmartPtrIIntMessage doReceive(const int32 timeout);
-
-private:
- SmartPtrCFileCollection itemsInDirectory(
- const std::string& directory,
- const std::string& filenameRegex) const;
-
- SmartPtrCFileCollection merge(
- const SmartPtrCFileCollection& newFileCollection,
- const SmartPtrCFileCollection& existingFileCollection) const;
-
- std::string calcNextFile(
- SmartPtrCFileCollection& fileCollection) const;
-
- uint64 getTimeSec() const;
-
- bool isRefreshNecessary(
- const uint32 refreshSec,
- const uint64 lastRefreshSec) const;
-
-private:
- bool _isInitialized;
- std::string _id;
- std::string _directory;
- std::string _filenameRegex;
- bool _preventDuplicates;
- uint32 _refreshSec;
- uint64 _lastRefreshSec;
-
- SmartPtrCFileCollection _fileCollection;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CFileReadingMessageSource);
-};
-
-CAF_DECLARE_SMART_POINTER(CFileReadingMessageSource);
-
-}
-
-#endif // #ifndef CFileReadingMessageSource_h_
+++ /dev/null
-/*
- * Created on: Aug 10, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CMessageHandlerChainInstance_h
-#define CMessageHandlerChainInstance_h
-
-namespace Caf {
-
-class CMessageHandlerChainInstance :
- public IIntegrationObject,
- public IIntegrationComponentInstance,
- public ILifecycle,
- public IMessageHandler
-{
-public:
- CMessageHandlerChainInstance();
- virtual ~CMessageHandlerChainInstance();
-
- CAF_BEGIN_QI()
- CAF_QI_ENTRY(IIntegrationObject)
- CAF_QI_ENTRY(IIntegrationComponentInstance)
- CAF_QI_ENTRY(ILifecycle)
- CAF_QI_ENTRY(IMessageHandler)
- CAF_END_QI()
-
-public: // IIntegrationObject
- void initialize(
- const IBean::Cargs& ctorArgs,
- const IBean::Cprops& properties,
- const SmartPtrIDocument& configSection);
-
- std::string getId() const;
-
-public: // IIntegrationComponentInstance
- void wire(
- const SmartPtrIAppContext& appContext,
- const SmartPtrIChannelResolver& channelResolver);
-
-public: // ILifecycle
- void start(const uint32 timeoutMs);
- void stop(const uint32 timeoutMs);
- bool isRunning() const;
-
-public: // IMessageHandler
- void handleMessage(
- const SmartPtrIIntMessage& message);
- SmartPtrIIntMessage getSavedMessage() const;
- void clearSavedMessage();
-
-private:
- void logMessage(const SmartPtrIIntMessage& message) const;
-
-private:
- class ChainedMessageHandler {
- public:
- ChainedMessageHandler();
-
- void init(
- const SmartPtrIAppContext& appContext,
- const SmartPtrIChannelResolver& channelResolver);
- void setId(const std::string& id);
- void setOutputChannel(const SmartPtrIMessageChannel& channel);
- void setMessageHandler(const SmartPtrICafObject& handlerObj);
- void handleMessage(const SmartPtrIIntMessage& message);
- SmartPtrIIntMessage getSavedMessage() const;
- void clearSavedMessage();
-
- private:
- void logMessage(const SmartPtrIIntMessage& message) const;
-
- private:
- bool _isInitialized;
- std::string _id;
- SmartPtrIMessageChannel _outputChannel;
- SmartPtrICafObject _messageHandlerObj;
- SmartPtrCMessageHandler _messageHandler;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(ChainedMessageHandler);
- };
- CAF_DECLARE_SMART_POINTER(ChainedMessageHandler);
- typedef std::deque<SmartPtrChainedMessageHandler> MessageHandlers;
-
- class InterconnectChannel : public IMessageChannel {
- public:
- InterconnectChannel();
- virtual ~InterconnectChannel();
- void init(const SmartPtrChainedMessageHandler& nextHandler);
- bool send(
- const SmartPtrIIntMessage& message);
- bool send(
- const SmartPtrIIntMessage& message,
- const int32 timeout);
-
- private:
- SmartPtrChainedMessageHandler _nextHandler;
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(InterconnectChannel);
- };
- CAF_DECLARE_SMART_POINTER(InterconnectChannel);
-
- struct ChainLink {
- CMessageHandlerChainInstance::SmartPtrChainedMessageHandler handler;
- std::string id;
- bool isMessageProducer;
- };
- CAF_DECLARE_SMART_POINTER(ChainLink);
- typedef std::vector<SmartPtrChainLink> ChainLinks;
-
- class SelfWeakReference : public IMessageHandler {
- public:
- SelfWeakReference();
- void setReference(IMessageHandler *handler);
- public: // IMessageHandler
- void handleMessage(
- const SmartPtrIIntMessage& message);
- SmartPtrIIntMessage getSavedMessage() const;
- void clearSavedMessage();
- private:
- IMessageHandler *_reference;
- CAF_CM_CREATE_THREADSAFE;
- };
- CAF_DECLARE_SMART_POINTER(SelfWeakReference);
-
-private:
- bool _isInitialized;
- bool _isRunning;
- IBean::Cargs _ctorArgs;
- IBean::Cprops _properties;
- SmartPtrIDocument _configSection;
- std::string _id;
- SmartPtrISubscribableChannel _subscribableInputChannel;
- SmartPtrITaskExecutor _taskExecutor;
- SmartPtrSelfWeakReference _weakRefSelf;
- MessageHandlers _messageHandlers;
- SmartPtrIIntMessage _savedMessage;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CMessageHandlerChainInstance);
-};
-
-CAF_DECLARE_SMART_QI_POINTER(CMessageHandlerChainInstance);
-
-}
-
-#endif /* CMessageHandlerChainInstance_h */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CXPathHeaderEnricherItem_h_
-#define CXPathHeaderEnricherItem_h_
-
-namespace Caf {
-
-class CXPathHeaderEnricherItem {
-private:
- typedef std::map<std::string, bool> CFileCollection;
- CAF_DECLARE_SMART_POINTER(CFileCollection);
-
-public:
- CXPathHeaderEnricherItem();
- virtual ~CXPathHeaderEnricherItem();
-
-public:
- void initialize(
- const SmartPtrIDocument& configSection,
- const bool& defaultOverwrite);
-
-public:
- std::string getName() const;
- std::string getEvaluationType() const;
- bool getOverwrite() const;
- std::string getXpathExpression() const;
- std::string getXpathExpressionRef() const;
-
-private:
- bool _isInitialized;
-
- std::string _name;
- std::string _evaluationType;
- bool _overwrite;
- std::string _xpathExpression;
- std::string _xpathExpressionRef;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_DECLARE_NOCOPY(CXPathHeaderEnricherItem);
-};
-
-CAF_DECLARE_SMART_POINTER(CXPathHeaderEnricherItem);
-
-}
-
-#endif // #ifndef CXPathHeaderEnricherItem_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: May 18, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CINIFILEWITHOUTSECTION_H_
-#define CINIFILEWITHOUTSECTION_H_
-
-namespace Caf {
-
-class CIniFileWithoutSection {
-public:
- struct SIniEntry {
- std::string _name;
- std::string _valueRaw;
- std::string _valueExpanded;
- };
- CAF_DECLARE_SMART_POINTER(SIniEntry);
-
-public:
- CIniFileWithoutSection();
- virtual ~CIniFileWithoutSection();
-
-public:
- void initialize(const std::string& configFilePath);
-
- std::deque<SmartPtrSIniEntry> getEntryCollection();
-
- SmartPtrSIniEntry findOptionalEntry(
- const std::string& keyName);
-
- SmartPtrSIniEntry findRequiredEntry(
- const std::string& keyName);
-
- std::string findOptionalString(
- const std::string& keyName);
-
- std::string findRequiredString(
- const std::string& keyName);
-
- std::string findOptionalRawString(
- const std::string& keyName);
-
- std::string findRequiredRawString(
- const std::string& keyName);
-
- void log();
-
- void setValue(
- const std::string valueName,
- const std::string valueValue);
-
- void deleteValue(
- const std::string valueName);
-
-private:
- struct SReplacement {
- SmartPtrCCafRegex _regex;
- std::string _value;
- };
- CAF_DECLARE_SMART_POINTER(SReplacement);
-
-private:
- std::deque<SmartPtrSIniEntry> parse(
- const std::string& configFilePath) const;
-
- SmartPtrSReplacement createReplacement(
- const std::string& keyName,
- const std::string& value) const;
-
- SmartPtrSIniEntry createIniEntry(
- const std::string& keyName,
- const std::string& valueRaw,
- const std::string& valueExpanded) const;
-
- std::deque<std::string> loadTextFileIntoCollection(
- const std::string& filePath) const;
-
- void saveTextFile(
- const std::deque<std::string> fileContents,
- const std::string filePath) const;
-
-private:
- bool _isInitialized;
- std::string _configFilePath;
- std::deque<SmartPtrSIniEntry> _entryCollection;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CIniFileWithoutSection);
-};
-
-CAF_DECLARE_SMART_POINTER(CIniFileWithoutSection);
-
-}
-
-#endif /* CINIFILEWITHOUTSECTION_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: May 3, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CPackageInstaller_h_
-#define CPackageInstaller_h_
-
-namespace Caf {
-
-/// Sends responses/errors back to the client.
-class CPackageInstaller {
-public:
- typedef std::deque<SmartPtrCInstallPackageSpecDoc> CInstallPackageSpecCollection;
- CAF_DECLARE_SMART_POINTER(CInstallPackageSpecCollection);
-
- struct CInstallPackageMatch {
- CInstallUtils::MATCH_STATUS _matchStatus;
- SmartPtrCInstallPackageSpecDoc _matchedInstallPackageSpec;
- };
- CAF_DECLARE_SMART_POINTER(CInstallPackageMatch);
-
-public:
- static void installPackages(
- const std::deque<SmartPtrCFullPackageElemDoc>& fullPackageElemCollection,
- const SmartPtrCAttachmentCollectionDoc& attachmentCollection,
- const std::string& outputDir);
-
- static void uninstallPackages(
- const std::deque<SmartPtrCMinPackageElemDoc>& minPackageElemCollection,
- const std::deque<SmartPtrCInstallProviderSpecDoc>& installProviderSpecCollection,
- const std::string& outputDir);
-
-private:
- static void installPackage(
- const SmartPtrCInstallPackageSpecDoc& installPackageSpec,
- const SmartPtrCInstallPackageSpecDoc& uninstallPackageSpec,
- const std::string& outputDir);
-
- static void executePackage(
- const SmartPtrCInstallPackageSpecDoc& installPackageSpec,
- const std::string& startupArgument,
- const std::string& outputDir);
-
- static SmartPtrCInstallPackageSpecDoc resolveAndCopyAttachments(
- const SmartPtrCInstallPackageSpecDoc& installPackageSpec);
-
- static void saveInstallPackageSpec(
- const SmartPtrCInstallPackageSpecDoc& installPackageSpec);
-
- static std::map<int32, SmartPtrCFullPackageElemDoc> orderFullPackageElems(
- const std::deque<SmartPtrCFullPackageElemDoc>& fullPackageElemCollection);
-
- static std::map<int32, SmartPtrCMinPackageElemDoc> orderMinPackageElems(
- const std::deque<SmartPtrCMinPackageElemDoc>& minPackageElemCollection);
-
- static SmartPtrCAttachmentCollectionDoc resolveAttachments(
- const SmartPtrCAttachmentNameCollectionDoc& attachmentNameCollection,
- const SmartPtrCAttachmentCollectionDoc& attachmentCollection);
-
- static SmartPtrCAttachmentCollectionDoc copyAttachments(
- const SmartPtrCAttachmentDoc& startupAttachment,
- const SmartPtrCAttachmentDoc& packageAttachment,
- const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection,
- const std::string& outputDir);
-
- static SmartPtrCInstallPackageMatch matchInstallPackageSpec(
- const SmartPtrCInstallPackageSpecDoc& installPackageSpec);
-
- static SmartPtrCInstallPackageSpecCollection readInstallPackageSpecs();
-
- static uint32 countPackageReferences(
- const SmartPtrCInstallPackageSpecDoc& installPackageSpec,
- const std::deque<SmartPtrCInstallProviderSpecDoc>& installProviderSpecCollection);
-
- static void logDebug(
- const std::string& message,
- const SmartPtrCInstallPackageSpecDoc& installPackageSpec1,
- const SmartPtrCInstallPackageSpecDoc& installPackageSpec2);
-
- static void logWarn(
- const std::string& message,
- const SmartPtrCInstallPackageSpecDoc& installPackageSpec1,
- const SmartPtrCInstallPackageSpecDoc& installPackageSpec2);
-
- static void cleanupPackage(
- const SmartPtrCInstallPackageMatch& installPackageMatch);
-
-private:
- CAF_CM_DECLARE_NOCREATE(CPackageInstaller);
-};
-
-}
-
-#endif // #ifndef CPackageInstaller_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: May 3, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CProviderInstaller_h_
-#define CProviderInstaller_h_
-
-namespace Caf {
-
-class CProviderInstaller {
-public:
- typedef std::deque<SmartPtrCInstallProviderSpecDoc> CInstallProviderSpecCollection;
- CAF_DECLARE_SMART_POINTER(CInstallProviderSpecCollection);
-
- struct CInstallProviderMatch {
- CInstallUtils::MATCH_STATUS _matchStatus;
- SmartPtrCInstallProviderSpecDoc _matchedInstallProviderSpec;
- };
- CAF_DECLARE_SMART_POINTER(CInstallProviderMatch);
-
-public:
- static void installProvider(
- const SmartPtrCInstallProviderJobDoc& installProviderJob,
- const SmartPtrCAttachmentCollectionDoc& attachmentCollection,
- const std::string& outputDir);
-
- static void uninstallProvider(
- const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob,
- const std::string& outputDir);
-
- static SmartPtrCInstallProviderSpecCollection readInstallProviderSpecs();
-
-private:
- static void installProviderLow(
- const SmartPtrCInstallProviderJobDoc& installProviderJob,
- const SmartPtrCAttachmentCollectionDoc& attachmentCollection,
- const std::string& outputDir);
-
- static void uninstallProviderLow(
- const SmartPtrCInstallProviderSpecDoc& installProviderSpec,
- const std::string& outputDir);
-
- static void storeInstallProviderSpec(
- const SmartPtrCInstallProviderSpecDoc& installProviderSpec);
-
- static SmartPtrCInstallProviderMatch matchInstallProviderSpec(
- const SmartPtrCInstallProviderSpecDoc& installProviderSpec);
-
- static SmartPtrCInstallProviderSpecDoc createInstallProviderSpec(
- const SmartPtrCInstallProviderJobDoc& installProviderJob);
-
- static void logDebug(
- const std::string& message,
- const SmartPtrCInstallProviderSpecDoc& installProviderSpec1,
- const SmartPtrCInstallProviderSpecDoc& installProviderSpec2);
-
- static void logWarn(
- const std::string& message,
- const SmartPtrCInstallProviderSpecDoc& installProviderSpec1,
- const SmartPtrCInstallProviderSpecDoc& installProviderSpec2);
-
- static void cleanupProvider(
- const SmartPtrCInstallProviderSpecDoc& installProviderSpec);
-
- static std::string calcProviderFqn(
- const SmartPtrCInstallProviderSpecDoc& installProviderSpec);
-
- static std::string calcProviderFqn(
- const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob);
-
-private:
- CAF_CM_DECLARE_NOCREATE(CProviderInstaller);
-};
-
-}
-
-#endif // #ifndef CProviderInstaller_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: July 25, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef _InstallProvider_IPackage_h_
-#define _InstallProvider_IPackage_h_
-
-namespace Caf {
-
-/// TODO - describe interface
-struct __declspec(novtable)
-IPackage : public ICafObject {
- CAF_DECL_UUID("e372d4bc-2384-4fcc-8042-f916f2d11bd2")
-
- virtual void fullPackageElem(
- const SmartPtrCAttachmentDoc packageAttachment,
- const std::string arguments,
- const SmartPtrCAttachmentCollectionDoc supportingAttachmentCollection,
- const std::string outputDir) = 0;
-
- virtual void unfullPackageElem(
- const SmartPtrCAttachmentDoc packageAttachment,
- const std::string arguments,
- const SmartPtrCAttachmentCollectionDoc supportingAttachmentCollection,
- const std::string outputDir) = 0;
-};
-
-CAF_DECLARE_SMART_INTERFACE_POINTER(IPackage);
-
-}
-
-#endif
ConfigProvider_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@
ConfigProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-ConfigProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
ConfigProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include
+ConfigProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/InternalProviders/Config_Provider/include
ConfigProvider_LDADD =
ConfigProvider_LDADD += @GLIB2_LIBS@
ConfigProvider_LDADD += @LOG4CPP_LIBS@
InstallProvider_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@
InstallProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-InstallProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
InstallProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include
+InstallProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/InternalProviders/Install_Provider/include
InstallProvider_LDADD =
InstallProvider_LDADD += @GLIB2_LIBS@
InstallProvider_LDADD += @LOG4CPP_LIBS@
RemoteCommandProvider_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@
RemoteCommandProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-RemoteCommandProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
RemoteCommandProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include
RemoteCommandProvider_LDADD =
RemoteCommandProvider_LDADD += @GLIB2_LIBS@
TestInfraProvider_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@
TestInfraProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-TestInfraProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
TestInfraProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include
TestInfraProvider_LDADD =
TestInfraProvider_LDADD += @GLIB2_LIBS@
libMaIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@
libMaIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-libMaIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
+libMaIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Subsystems/CafIntegration/include
+libMaIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ManagementAgent/ManagementAgent/include
+libMaIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include
libMaIntegrationSubsys_la_LIBADD =
libMaIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@
libMaIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@
ManagementAgentHost_CPPFLAGS += @LOG4CPP_CPPFLAGS@
ManagementAgentHost_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-ManagementAgentHost_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
+ManagementAgentHost_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ManagementAgent/ManagementAgent/include
ManagementAgentHost_LDADD =
ManagementAgentHost_LDADD += @GLIB2_LIBS@
ManagementAgentHost_LDADD += @LOG4CPP_LIBS@
libVgAuthIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/vgauth/public
libVgAuthIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-libVgAuthIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
+libVgAuthIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ManagementAgent/ManagementAgent/include
+libVgAuthIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include
libVgAuthIntegrationSubsys_la_LIBADD =
libVgAuthIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@
libVgAuthIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CManagementAgentHostWork_h_
-#define CManagementAgentHostWork_h_
-
-namespace Caf {
-
-/// Sends responses/errors back to the client.
-class CManagementAgentHostWork :
- public IWork
-{
-public:
- CManagementAgentHostWork();
- virtual ~CManagementAgentHostWork();
-
-public:
- void initialize();
-
-public: // IWork
- void doWork();
- void stopWork();
-
-private:
- bool _isInitialized;
- bool _isWorking;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CManagementAgentHostWork);
-};
-
-CAF_DECLARE_SMART_POINTER(CManagementAgentHostWork);
-
-}
-
-#endif // #ifndef CManagementAgentHostWork_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: June 25, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#include "stdafx.h"
-#include "CWinService.h"
-#include <process.h>
-
-bool CWinService::s_isInitialized = false;
-SmartPtrCWinServiceState CWinService::s_winServiceState;
-SmartPtrCWinServiceInstance CWinService::s_winServiceInstance;
-
-////////////////////////////////////////////////////////////////////////
-//
-// controlHandler()
-//
-// Handler for the break event when running in console mode
-//
-////////////////////////////////////////////////////////////////////////
-BOOL WINAPI controlHandler(
- DWORD dwCtrlType) {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "controlHandler");
-
- try {
- switch(dwCtrlType) {
- case CTRL_BREAK_EVENT: // use Ctrl+C or Ctrl+Break to simulate
- case CTRL_C_EVENT: // SERVICE_CONTROL_STOP in debug mode
- CAF_CM_LOG_DEBUG_VA0("Received Ctrl+C or Ctrl+Break... Stopping the service");
- CWinService::s_winServiceState->signalServiceStop();
- return TRUE;
- break;
- }
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_LOG_CRIT_CAFEXCEPTION;
- const BOOL rc = (CAF_CM_ISEXCEPTION) ? FALSE : TRUE;
- CAF_CM_CLEAREXCEPTION;
-
- return rc;
-}
-
-uint32 __stdcall Caf::serviceWorkerThreadFunc(
- void* pThreadContext) {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "serviceWorkerThreadFunc");
-
- try {
- // Bring the thread into the correct scope
- CWinService::s_winServiceInstance->runWorkerThread();
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_LOG_CRIT_CAFEXCEPTION;
- const uint32 rc = (CAF_CM_ISEXCEPTION) ? -1 : 0;
- CAF_CM_CLEAREXCEPTION;
-
- return rc;
-}
-
-void CWinService::initialize(
- const SmartPtrIWork& work) {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "initialize");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISNOTINITIALIZED(s_isInitialized);
- CAF_CM_VALIDATE_SMARTPTR(work);
-
- s_winServiceState.CreateInstance();
- s_winServiceState->initialize(
- "VMwareCAFManagementAgentHost",
- "VMware CAF Management Agent Service",
- "VMware Common Agent Management Agent Service",
- work);
-
- s_winServiceInstance.CreateInstance();
- s_winServiceInstance->initialize(s_winServiceState);
- s_isInitialized = true;
- }
- CAF_CM_EXIT;
-}
-
-void CWinService::execute(
- int32 argc,
- char** argv) {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "execute");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized);
-
- // Figure out what to do based on the optional command line argument
- const CWinServiceInstance::SCommandLineParams commandLineParams =
- s_winServiceInstance->processCommandLine(argc, argv);
- switch (commandLineParams._eMode) {
- case CWinServiceInstance::EModeRunAsService:
- CAF_CM_LOG_DEBUG_VA0("Running the service");
- run();
- break;
-
- case CWinServiceInstance::EModeRunAsConsole:
- CAF_CM_LOG_DEBUG_VA0("Running as console");
- runAsConsole();
- break;
-
- case CWinServiceInstance::EModeRegister: {
- CAF_CM_LOG_DEBUG_VA0("Installing the service");
- const std::string currentFile = FileSystemUtils::getCurrentFile();
- s_winServiceInstance->install(currentFile);
- }
- break;
-
- case CWinServiceInstance::EModeUnregister:
- CAF_CM_LOG_DEBUG_VA0("Uninstalling the service");
- s_winServiceInstance->uninstall();
- break;
-
- default:
- std::string cmdLine;
- for (int32 index = 0; index < argc; index++) {
- cmdLine += argv[index];
- cmdLine += " ";
- }
- CAF_CM_EXCEPTIONEX_VA2(
- InvalidHandleException, E_FAIL,
- "Invalid mode returned from processCommandLine - Mode: %d, cmdLine: %s",
- static_cast<DWORD>(commandLineParams._eMode), cmdLine.c_str());
- break;
- }
- }
- CAF_CM_EXIT;
-}
-
-void CWinService::run() {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "run");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized);
-
- const std::string serviceName = s_winServiceState->getServiceName();
-
- // build the table of Services in this exe, name and the address of the
- // Service's main function terminated by NULL's
- SERVICE_TABLE_ENTRYA stbl[] =
- {
- {
- const_cast<char*>(serviceName.c_str()),
- reinterpret_cast<LPSERVICE_MAIN_FUNCTIONA>(CWinService::serviceMain)
- },
- {
- NULL,
- NULL
- }
- };
-
- // call the SCM. We have 30 seconds to execute this call. If it fails to
- // execute within that time, the SCM will assume that something is wrong
- // and terminate this process...
- if (::StartServiceCtrlDispatcherA(stbl) == FALSE) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError,
- "::StartServiceCtrlDispatcher() Failed - serviceName: \"%s\", msg: \"%s\"",
- serviceName.c_str(), errorMsg.c_str());
- }
- }
- CAF_CM_EXIT;
-}
-
-void CWinService::runAsConsole() {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "runAsConsole");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized);
-
- ::SetConsoleCtrlHandler(controlHandler, TRUE);
-
- CWinService::s_winServiceState->putIsService(false);
- CWinService::serviceMain(0, NULL);
- }
- CAF_CM_EXIT;
-}
-
-void CALLBACK CWinService::serviceMain(
- const DWORD cdwArgc,
- LPCWSTR* plpwszArgv) {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "serviceMain");
-
- try {
- // This is a new thread from the SCM
- CafInitialize::init();
-
- CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized);
-
- const std::string serviceName = s_winServiceState->getServiceName();
-
- // Register our handler routine with the SCM.
- // The function that we are registering will be called when certain
- // events occur like : starting, stopping, pausing this Service
- if (s_winServiceState->getIsService()) {
- const SERVICE_STATUS_HANDLE serviceHandle = ::RegisterServiceCtrlHandlerExA(
- serviceName.c_str(), CWinService::scmHandlerEx, NULL);
- if (! serviceHandle) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA2(lastError,
- "::RegisterServiceCtrlHandlerEx() Failed - serviceName: \"%s\", msg: \"%s\"",
- serviceName.c_str(), errorMsg.c_str());
- }
-
- s_winServiceState->putServiceHandle(serviceHandle);
- }
-
- // Let the SCM know that the service is starting.
- s_winServiceState->putCurrentServiceState(SERVICE_START_PENDING);
- if (s_winServiceState->getIsService()) {
- s_winServiceState->setStatus();
- }
-
- // Creates the worker thread.
- createWorkerThread();
-
- // Runs the Service
- s_winServiceInstance->runService();
-
- // Let the SCM know that we've stopped.
- s_winServiceState->putCurrentServiceState(SERVICE_STOPPED);
- if (s_winServiceState->getIsService()) {
- s_winServiceState->setStatus();
- }
-
- // Close all of the handles.
- s_winServiceState->close();
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_LOG_CRIT_CAFEXCEPTION;
- CAF_CM_CLEAREXCEPTION;
-
- CafInitialize::term();
-}
-
-DWORD CWinService::scmHandlerEx(
- DWORD dwCommand,
- DWORD dwEventType,
- LPVOID lpEventData,
- LPVOID lpContext) {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "scmHandlerEx");
-
- try {
- CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized);
-
- switch(dwCommand) {
- case SERVICE_CONTROL_STOP:
- case SERVICE_CONTROL_SHUTDOWN:
- case SERVICE_CONTROL_POWEREVENT: {
- CAF_CM_LOG_INFO_VA0("Caught stop, shutdown or power event");
-
- // Let the SCM know that we're in the process of stopping.
- s_winServiceState->putCurrentServiceState(SERVICE_STOP_PENDING);
- s_winServiceState->setStatus();
-
- // Signal the event that tells us to stop.
- s_winServiceState->signalServiceStop();
- }
- break;
-
- case SERVICE_CONTROL_INTERROGATE: {
- CAF_CM_LOG_INFO_VA0("Caught interrogate event");
-
- // Let the SCM know our current state.
- s_winServiceState->setStatus();
- }
- break;
- default:
- CAF_CM_LOG_WARN_VA1("Unhandled command - %d", dwCommand);
- break;
- }
- }
- CAF_CM_CATCH_ALL;
- CAF_CM_LOG_CRIT_CAFEXCEPTION;
- CAF_CM_CLEAREXCEPTION;
-
- return NO_ERROR;
-}
-
-void CWinService::createWorkerThread() {
- CAF_CM_STATIC_FUNC_LOG("CWinService", "createWorkerThread");
-
- CAF_CM_ENTER {
- CAF_CM_PRECOND_ISINITIALIZED(s_isInitialized);
-
- // Create the thread.
- uint32 uiThreadAddress = 0;
- UINT_PTR uipRc = ::_beginthreadex(NULL, 0, ::serviceWorkerThreadFunc, NULL, 0, &uiThreadAddress);
- if (0 == uipRc) {
- const DWORD lastError = ::GetLastError();
- const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError);
- CAF_CM_EXCEPTION_VA1(lastError, "::_beginthreadex() Failed - msg: \"%s\"",
- errorMsg.c_str());
- }
- }
- CAF_CM_EXIT;
-}
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: June 25, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CWinService_h_
-#define CWinService_h_
-
-namespace Caf {
-
-class CWinService {
-public:
- /// Initializes the static service class.
- static void initialize(
- const SmartPtrIWork& work);
-
- /// Parses the command line and executes the server
- static void execute(int32 argc, char** argv);
-
-private:
- /// Spawns the worker thread to run the service
- static void run();
-
- /// Runs the service in console mode for debugging
- static void runAsConsole();
-
-private:
- /// Each Service (there can be more than one) exposes its own main function
- /// This function's pointer was passed into the SCM in the run method
- /// For each of these main functions the SCM will create a thread.
- static void CALLBACK serviceMain(
- const DWORD cdwArgc,
- LPCWSTR* plpwszArgv);
-
- /// Notification callback function for the SCM that's called when the state of
- /// the Service must be changed.
- static DWORD CALLBACK scmHandlerEx(
- DWORD dwCommand,
- DWORD dwEventType,
- LPVOID lpEventData,
- LPVOID lpContext );
-
-private:
- // Creates the service's main working thread which performs the work of this service.
- static void createWorkerThread();
-
-private:
- /// When CWinService::createWorkerThread() creates the helper-thread,
- /// it calls this global function. This function simply redirects the thread
- /// back into the main class.
- friend uint32 __stdcall serviceWorkerThreadFunc(
- void* pThreadContext);
-
-public:
- static bool s_isInitialized;
- static SmartPtrCWinServiceState s_winServiceState;
- static SmartPtrCWinServiceInstance s_winServiceInstance;
-
-private:
- CAF_CM_DECLARE_NOCREATE(CWinService);
-};
-
-}
-
-#endif // #ifndef CWinService_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CAttachmentRequestTransformerInstance_h_
-#define CAttachmentRequestTransformerInstance_h_
-
-namespace Caf {
-
-class CAttachmentRequestTransformerInstance :
- public TCafSubSystemObjectRoot<CAttachmentRequestTransformerInstance>,
- public IIntegrationObject,
- public IIntegrationComponentInstance,
- public ITransformer {
-public:
- struct SExpandedFileAlias {
- std::string _filePath;
- std::string _encoding;
- };
- CAF_DECLARE_SMART_POINTER(SExpandedFileAlias);
-
-public:
- CAttachmentRequestTransformerInstance();
- virtual ~CAttachmentRequestTransformerInstance();
-
- CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdAttachmentRequestTransformerInstance)
-
- CAF_BEGIN_INTERFACE_MAP(CAttachmentRequestTransformerInstance)
- CAF_INTERFACE_ENTRY(IIntegrationObject)
- CAF_INTERFACE_ENTRY(IIntegrationComponentInstance)
- CAF_INTERFACE_ENTRY(ITransformer)
- CAF_END_INTERFACE_MAP()
-
-public: // IIntegrationObject
- void initialize(
- const IBean::Cargs& ctorArgs,
- const IBean::Cprops& properties,
- const SmartPtrIDocument& configSection);
-
- std::string getId() const;
-
-public: // IIntegrationComponentInstance
- void wire(
- const SmartPtrIAppContext& appContext,
- const SmartPtrIChannelResolver& channelResolver);
-
-public: // ITransformer
- SmartPtrIIntMessage transformMessage(
- const SmartPtrIIntMessage& message);
-
-private:
- std::string calcOutputDirPath(
- const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope) const;
-
- std::string calcFilePath(
- const UriUtils::SUriRecord& uriRecord) const;
-
- std::string calcRelPath(
- const std::string& filePath,
- const UriUtils::SUriRecord& uriRecord) const;
-
- void moveFile(
- const std::string& srcFilePath,
- const std::string& dstFilePath) const;
-
-private:
- bool _isInitialized;
- std::string _id;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CAttachmentRequestTransformerInstance);
-};
-
-}
-
-#endif // #ifndef CAttachmentRequestTransformerInstance_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef _MaIntegration_CConfigEnvReadingMessageSource_h_
-#define _MaIntegration_CConfigEnvReadingMessageSource_h_
-
-namespace Caf {
-
-class CConfigEnvReadingMessageSource :
- public CAbstractPollableChannel {
-private:
- typedef std::map<std::string, bool> CFileCollection;
- CAF_DECLARE_SMART_POINTER(CFileCollection);
-
-public:
- CConfigEnvReadingMessageSource();
- virtual ~CConfigEnvReadingMessageSource();
-
-public:
- void initialize(
- const SmartPtrIDocument& configSection,
- const SmartPtrIConfigEnv& configEnv);
-
-protected: // CAbstractPollableChannel
- bool doSend(
- const SmartPtrIIntMessage& message,
- int32 timeout);
-
- SmartPtrIIntMessage doReceive(const int32 timeout);
-
-private:
- bool _isInitialized;
- std::string _id;
-
- SmartPtrIConfigEnv _configEnv;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CConfigEnvReadingMessageSource);
-};
-
-CAF_DECLARE_SMART_POINTER(CConfigEnvReadingMessageSource);
-
-}
-
-#endif // #ifndef _MaIntegration_CConfigEnvReadingMessageSource_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CDiagToMgmtRequestTransformerInstance_h_
-#define CDiagToMgmtRequestTransformerInstance_h_
-
-namespace Caf {
-
-class CDiagToMgmtRequestTransformerInstance :
- public TCafSubSystemObjectRoot<CDiagToMgmtRequestTransformerInstance>,
- public IIntegrationObject,
- public IIntegrationComponentInstance,
- public ITransformer {
-public:
- struct SExpandedFileAlias {
- std::string _filePath;
- std::string _encoding;
- };
- CAF_DECLARE_SMART_POINTER(SExpandedFileAlias);
-
-public:
- CDiagToMgmtRequestTransformerInstance();
- virtual ~CDiagToMgmtRequestTransformerInstance();
-
- CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdDiagToMgmtRequestTransformerInstance)
-
- CAF_BEGIN_INTERFACE_MAP(CDiagToMgmtRequestTransformerInstance)
- CAF_INTERFACE_ENTRY(IIntegrationObject)
- CAF_INTERFACE_ENTRY(IIntegrationComponentInstance)
- CAF_INTERFACE_ENTRY(ITransformer)
- CAF_END_INTERFACE_MAP()
-
-public: // IIntegrationObject
- void initialize(
- const IBean::Cargs& ctorArgs,
- const IBean::Cprops& properties,
- const SmartPtrIDocument& configSection);
-
- std::string getId() const;
-
-public: // IIntegrationComponentInstance
- void wire(
- const SmartPtrIAppContext& appContext,
- const SmartPtrIChannelResolver& channelResolver);
-
-public: // ITransformer
- SmartPtrIIntMessage transformMessage(
- const SmartPtrIIntMessage& message);
-
-private:
- SmartPtrCMgmtCollectInstancesCollectionDoc createMgmtCollectInstancesCollection(
- const SmartPtrCDiagCollectInstancesDoc& diagCollectInstances) const;
-
- SmartPtrCMgmtInvokeOperationCollectionDoc createMgmtInvokeOperationCollection(
- const SmartPtrCDiagSetValueCollectionDoc& diagSetValueCollection,
- const SmartPtrCDiagDeleteValueCollectionDoc& diagDeleteValueCollection) const;
-
- SmartPtrCMgmtCollectInstancesDoc createCollectInstances(
- const UUID& jobId,
- const SmartPtrSExpandedFileAlias& expandedFileAlias) const;
-
- SmartPtrCOperationDoc createSetValueOperation(
- const std::string& valueName,
- const std::deque<std::string>& valueCollection,
- const SmartPtrSExpandedFileAlias& expandedFileAlias) const;
-
- SmartPtrCOperationDoc createDeleteValueOperation(
- const std::string& valueName,
- const SmartPtrSExpandedFileAlias& expandedFileAlias) const;
-
- SmartPtrCMgmtInvokeOperationDoc createInvokeOperation(
- const UUID& jobId,
- const SmartPtrCOperationDoc operation) const;
-
- std::deque<CDiagToMgmtRequestTransformerInstance::SmartPtrSExpandedFileAlias> expandFileAliases() const;
-
- SmartPtrSExpandedFileAlias expandFileAlias(
- const std::string& fileAlias) const;
-
- std::string findUriParameter(
- const std::string& parameterName,
- const UriUtils::SUriRecord& uri) const;
-
-private:
- bool _isInitialized;
- std::string _id;
-
- std::string _fileAliasPrefix;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CDiagToMgmtRequestTransformerInstance);
-};
-
-}
-
-#endif // #ifndef CDiagToMgmtRequestTransformerInstance_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef _MaIntegration_CMonitorReadingMessageSource_h_
-#define _MaIntegration_CMonitorReadingMessageSource_h_
-
-namespace Caf {
-
-class CMonitorReadingMessageSource :
- public CAbstractPollableChannel {
-private:
- typedef std::map<std::string, bool> CFileCollection;
- CAF_DECLARE_SMART_POINTER(CFileCollection);
-
-public:
- CMonitorReadingMessageSource();
- virtual ~CMonitorReadingMessageSource();
-
-public:
- void initialize(
- const SmartPtrIDocument& configSection);
-
-protected: // CAbstractPollableChannel
- bool doSend(
- const SmartPtrIIntMessage& message,
- int32 timeout);
-
- SmartPtrIIntMessage doReceive(const int32 timeout);
-
-private:
- bool isListenerRunning() const;
-
- void startListener(
- const std::string& reason) const;
-
- void stopListener(
- const std::string& reason) const;
-
- void restartListener(
- const std::string& reason) const;
-
- std::string executeScript(
- const std::string& scriptPath,
- const std::string& scriptResultsDir) const;
-
- bool areSystemResourcesLow() const;
-
- bool isTimeForListenerRestart() const;
-
- uint64 calcListenerRestartMs() const;
-
-private:
- bool _isInitialized;
- std::string _id;
-
- uint64 _listenerStartTimeMs;
- uint64 _listenerRestartMs;
-
- std::string _monitorDir;
- std::string _restartListenerPath;
- std::string _listenerConfiguredStage2Path;
-
- std::string _scriptOutputDir;
- std::string _stopListenerScript;
- std::string _startListenerScript;
- std::string _isListenerRunningScript;
-
- std::string _listenerStartupType;
- int32 _listenerRetryCnt;
- int32 _listenerRetryMax;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CMonitorReadingMessageSource);
-};
-
-CAF_DECLARE_SMART_POINTER(CMonitorReadingMessageSource);
-
-}
-
-#endif // #ifndef _MaIntegration_CMonitorReadingMessageSource_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef _MaIntegration_CPersistenceReadingMessageSource_h_
-#define _MaIntegration_CPersistenceReadingMessageSource_h_
-
-namespace Caf {
-
-class CPersistenceReadingMessageSource :
- public CAbstractPollableChannel {
-private:
- typedef std::map<std::string, bool> CFileCollection;
- CAF_DECLARE_SMART_POINTER(CFileCollection);
-
-public:
- CPersistenceReadingMessageSource();
- virtual ~CPersistenceReadingMessageSource();
-
-public:
- void initialize(
- const SmartPtrIDocument& configSection,
- const SmartPtrIPersistence& persistence);
-
-protected: // CAbstractPollableChannel
- bool doSend(
- const SmartPtrIIntMessage& message,
- int32 timeout);
-
- SmartPtrIIntMessage doReceive(const int32 timeout);
-
-private:
- bool _isInitialized;
- std::string _id;
-
- SmartPtrIPersistence _persistence;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CPersistenceReadingMessageSource);
-};
-
-CAF_DECLARE_SMART_POINTER(CPersistenceReadingMessageSource);
-
-}
-
-#endif // #ifndef _MaIntegration_CPersistenceReadingMessageSource_h_
+++ /dev/null
-/*
- * Author: brets
- * Created: Nov 20, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CProviderExecutorRequest_h_
-#define CProviderExecutorRequest_h_
-
-namespace Caf {
-
-/// TODO - describe class
-class CProviderExecutorRequest {
-public:
- CProviderExecutorRequest();
- virtual ~CProviderExecutorRequest();
-
-public:
- void initialize(const SmartPtrIIntMessage& request);
-
- const SmartPtrIIntMessage getInternalRequest() const;
- const SmartPtrCProviderRequestDoc getRequest() const;
- const std::string& getOutputDirectory() const;
- const std::string& getProviderUri() const;
-
-private:
- bool _isInitialized;
- SmartPtrIIntMessage _internalRequest;
- SmartPtrCProviderRequestDoc _request;
- std::string _outputDir;
- std::string _providerUri;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CProviderExecutorRequest);
-};
-
-CAF_DECLARE_SMART_POINTER(CProviderExecutorRequest);
-
-}
-
-#endif // #ifndef CProviderExecutorRequest_h_
+++ /dev/null
-/*
- * Author: brets
- * Created: Nov 20, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CProviderExecutorRequestHandler_h_
-#define CProviderExecutorRequestHandler_h_
-
-namespace Caf {
-
-/// TODO - describe class
-class CProviderExecutorRequestHandler : public IRunnable {
-public:
- CProviderExecutorRequestHandler();
- virtual ~CProviderExecutorRequestHandler();
-
-public:
- void initialize(const std::string& providerUri,
- const SmartPtrITransformer beginImpersonationTransformer,
- const SmartPtrITransformer endImpersonationTransformer,
- const SmartPtrIErrorHandler errorHandler);
-
- void handleRequest(const SmartPtrCProviderExecutorRequest request);
-
-public: // IRunnable
- void run();
- void cancel();
-
-private:
- SmartPtrCProviderExecutorRequest getNextPendingRequest();
-
- void processRequest(const SmartPtrCProviderExecutorRequest& request) const;
-
- void executeRequestAsync(
- const SmartPtrCProviderExecutorRequest& request);
-
- std::deque<SmartPtrITaskExecutor> removeFinishedTaskExecutors(
- const std::deque<SmartPtrITaskExecutor> taskExecutors) const;
-
-private:
- bool _isInitialized;
- bool _isCancelled;
- std::string _providerPath;
- std::string _providerUri;
- std::deque<SmartPtrITaskExecutor> _taskExecutors;
- SmartPtrCAutoMutex _mutex;
- std::deque<SmartPtrCProviderExecutorRequest> _pendingRequests;
- SmartPtrITransformer _beginImpersonationTransformer;
- SmartPtrITransformer _endImpersonationTransformer;
- SmartPtrIErrorHandler _errorHandler;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_CREATE_THREADSAFE;
- CAF_CM_DECLARE_NOCOPY(CProviderExecutorRequestHandler);
-};
-
-CAF_DECLARE_SMART_POINTER(CProviderExecutorRequestHandler);
-
-}
-
-#endif // #ifndef CProviderExecutorRequestHandler_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CResponseFactory_h_
-#define CResponseFactory_h_
-
-namespace Caf {
-
-/// Builds the response XML document.
-class CResponseFactory {
-public:
- static SmartPtrCResponseDoc createResponse(
- const SmartPtrCProviderCollectSchemaRequestDoc& providerCollectSchemaRequest,
- const std::string& outputDir,
- const std::string& schemaCacheDir);
-
- static SmartPtrCResponseDoc createResponse(
- const SmartPtrCProviderRequestDoc& providerRequest,
- const std::string& outputDir);
-
-private:
- static void findAndStoreGlobalAttachmentsAndProviderResponses(
- const std::string& outputDir,
- const std::string& schemaCacheDir,
- SmartPtrCManifestCollectionDoc& manifestCollection,
- SmartPtrCAttachmentCollectionDoc& attachmentCollection);
-
- static void findAndStoreProviderResponses(
- const std::string& outputDir,
- const std::string& schemaCacheDir,
- std::map<std::string, SmartPtrCAttachmentDoc>& globalAttachmentCollection,
- std::deque<SmartPtrCManifestDoc>& manifestCollection);
-
- static void findAndStoreGlobalAttachments(
- const std::string& outputDir,
- std::map<std::string, SmartPtrCAttachmentDoc>& globalAttachmentCollection);
-
- static void resolveAndStoreGlobalAttachments(
- const std::deque<SmartPtrCAttachmentDoc> attachmentCollectionInner,
- const std::string& outputDir,
- const std::string& schemaCacheDir,
- std::map<std::string, SmartPtrCAttachmentDoc>& globalAttachmentCollection);
-
- static void storeGlobalAttachments(
- const std::string& attachmentName,
- const std::string& attachmentType,
- const std::deque<std::string>& attachmentPathCollection,
- const std::string& baseDir,
- std::map<std::string, SmartPtrCAttachmentDoc>& attachmentCollection);
-
- static void storeGlobalAttachment(
- const std::string& attachmentName,
- const std::string& attachmentType,
- const std::string& attachmentPath,
- const std::string& baseDir,
- std::map<std::string, SmartPtrCAttachmentDoc>& attachmentCollection);
-
- static void resolveAttachmentPath(
- const std::string& attachmentPath,
- const std::string& baseDir,
- std::string& relPath,
- std::string& attachmentPathNew);
-
- static std::string removeLeadingChars(
- const std::string& sourceStr,
- const char leadingChar);
-
-private:
- CAF_CM_DECLARE_NOCREATE(CResponseFactory);
-};
-
-CAF_DECLARE_SMART_POINTER(CResponseFactory);
-
-}
-
-#endif // #ifndef CResponseFactory_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CSchemaCacheManager_h_
-#define CSchemaCacheManager_h_
-
-namespace Caf {
-
-/// Simple container class for identifying a class.
-class CClassId {
-public:
- SmartPtrCFullyQualifiedClassGroupDoc _fqc;
- std::string toString() const {
- return _fqc->getClassNamespace() + "::" + _fqc->getClassName() + "::" + _fqc->getClassVersion();
- }
-};
-bool operator< (const CClassId& lhs, const CClassId& rhs);
-
-/// Creates a provider request.
-class CSchemaCacheManager {
-private:
- typedef std::map<CClassId, std::string> CClassCollection;
-
-public:
- CSchemaCacheManager();
- virtual ~CSchemaCacheManager();
-
-public:
- void initialize();
-
- std::string findProvider(
- const SmartPtrCFullyQualifiedClassGroupDoc& fqc);
-
-private:
- void processSchemaSummaries(
- const std::string& schemaCacheDirPath,
- CClassCollection& classCollection) const;
-
- void addNewClasses(
- const SmartPtrCSchemaSummaryDoc& schemaSummary,
- const std::string& schemaSummaryFilePath,
- CClassCollection& classCollection) const;
-
- void waitForSchemaCacheCreation(
- const std::string& schemaCacheDir,
- const uint16 maxWaitSecs) const;
-
-private:
- bool _isInitialized;
- std::string _schemaCacheDirPath;
- CClassCollection _classCollection;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CSchemaCacheManager);
-};
-
-CAF_DECLARE_SMART_POINTER(CSchemaCacheManager);
-
-}
-
-#endif // #ifndef CSchemaCacheManager_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Oct 22, 2010
- *
- * Copyright (c) 2010 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CSinglePmeRequestSplitterInstance_h_
-#define CSinglePmeRequestSplitterInstance_h_
-
-namespace Caf {
-
-// Moved the following typedefs from the class because Windows produced
-// the warning "decorated name length exceeded, name was truncated" because
-// their name included CSinglePmeRequestSplitterInstance.
-struct CSplitterJob {
- SmartPtrCFullyQualifiedClassGroupDoc _fqc;
- SmartPtrCMgmtCollectInstancesDoc _mgmtCollectInstances;
- SmartPtrCMgmtInvokeOperationDoc _mgmtInvokeOperation;
-};
-CAF_DECLARE_SMART_POINTER(CSplitterJob);
-
-typedef std::deque<SmartPtrCSplitterJob> CSplitterJobsCollection;
-CAF_DECLARE_SMART_POINTER(CSplitterJobsCollection);
-
-typedef std::map<std::string, SmartPtrCSplitterJobsCollection> CProviderJobsCollection;
-CAF_DECLARE_SMART_POINTER(CProviderJobsCollection);
-
-class CSinglePmeRequestSplitterInstance :
- public TCafSubSystemObjectRoot<CSinglePmeRequestSplitterInstance>,
- public IIntegrationObject,
- public IIntegrationComponentInstance,
- public IMessageSplitter {
-private:
- typedef std::deque<SmartPtrCFullyQualifiedClassGroupDoc> CClassCollection;
- CAF_DECLARE_SMART_POINTER(CClassCollection);
-
-public:
- CSinglePmeRequestSplitterInstance();
- virtual ~CSinglePmeRequestSplitterInstance();
-
- CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdSinglePmeRequestSplitterInstance)
-
- CAF_BEGIN_INTERFACE_MAP(CSinglePmeRequestSplitterInstance)
- CAF_INTERFACE_ENTRY(IIntegrationObject)
- CAF_INTERFACE_ENTRY(IIntegrationComponentInstance)
- CAF_INTERFACE_ENTRY(IMessageSplitter)
- CAF_END_INTERFACE_MAP()
-
-public: // IIntegrationObject
- void initialize(
- const IBean::Cargs& ctorArgs,
- const IBean::Cprops& properties,
- const SmartPtrIDocument& configSection);
-
- std::string getId() const;
-
-public: // IIntegrationComponentInstance
- void wire(
- const SmartPtrIAppContext& appContext,
- const SmartPtrIChannelResolver& channelResolver);
-
-public: // IMessageSplitter
- SmartPtrCMessageCollection splitMessage(
- const SmartPtrIIntMessage& message);
-
-private:
- SmartPtrCProviderCollectSchemaRequestDoc createCollectSchemaRequest(
- const SmartPtrCMgmtRequestDoc& mgmtRequest,
- const SmartPtrCMgmtCollectSchemaDoc& mgmtCollectSchema,
- const SmartPtrCProviderRequestHeaderDoc& providerRequestHeader,
- const std::string& outputDir) const;
-
- SmartPtrCProviderRequestDoc createProviderRequest(
- const SmartPtrCMgmtRequestDoc& mgmtRequest,
- const SmartPtrCSplitterJobsCollection& jobsCollection,
- const SmartPtrCProviderRequestHeaderDoc& providerRequestHeader,
- const std::string& outputDir) const;
-
- void addCollectInstancesJobs(
- const SmartPtrCMgmtCollectInstancesCollectionDoc& mgmtCollectInstancesCollection,
- SmartPtrCProviderJobsCollection& providerJobsCollection) const;
-
- void addInvokeOperationJobs(
- const SmartPtrCMgmtInvokeOperationCollectionDoc& mgmtInvokeOperationCollection,
- SmartPtrCProviderJobsCollection& providerJobsCollection) const;
-
- SmartPtrCClassCollection resolveClassSpecifier(
- const SmartPtrCClassSpecifierDoc& classSpecifier) const;
-
- std::string findProviderUri(
- const SmartPtrCFullyQualifiedClassGroupDoc& fqc) const;
-
- void createDirectory(
- const std::string& directory) const;
-
- void saveRequest(
- const std::string& outputDir,
- const SmartPtrCDynamicByteArray& payload) const;
-
- SmartPtrCProviderRequestHeaderDoc convertRequestHeader(
- const SmartPtrCRequestHeaderDoc& requestHeader) const;
-
-private:
- bool _isInitialized;
- std::string _id;
- SmartPtrCSchemaCacheManager _schemaCacheManager;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CSinglePmeRequestSplitterInstance);
-};
-
-}
-
-#endif // #ifndef CSinglePmeRequestSplitterInstance_h_
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 12, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef _MaContracts_IConfigEnv_h_
-#define _MaContracts_IConfigEnv_h_
-
-namespace Caf {
-
-/// TODO - describe interface
-struct __declspec(novtable)
-IConfigEnv : public ICafObject {
- CAF_DECL_UUID("dea6cea4-9385-458e-b549-d05640382da6")
-
- virtual void initialize(
- const SmartPtrIPersistence& persistenceRemove = SmartPtrIPersistence()) = 0;
-
- virtual SmartPtrCPersistenceDoc getUpdated(
- const int32 timeout) = 0;
-
- virtual void update(
- const SmartPtrCPersistenceDoc& persistence) = 0;
-};
-
-CAF_DECLARE_SMART_INTERFACE_POINTER(IConfigEnv);
-
-}
-
-#endif
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Nov 12, 2015
- *
- * Copyright (c) 2015 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef _MaContracts_IPersistence_h_
-#define _MaContracts_IPersistence_h_
-
-namespace Caf {
-
-/// TODO - describe interface
-struct __declspec(novtable)
-IPersistence : public ICafObject {
- CAF_DECL_UUID("5b48f8ef-7023-4583-9d2d-b15ae566b0cc")
-
- virtual void initialize() = 0;
-
- virtual SmartPtrCPersistenceDoc getUpdated(
- const int32 timeout) = 0;
-
- virtual void update(
- const SmartPtrCPersistenceDoc& persistence) = 0;
-
- virtual void remove(
- const SmartPtrCPersistenceDoc& persistence) = 0;
-};
-
-CAF_DECLARE_SMART_INTERFACE_POINTER(IPersistence);
-
-}
-
-#endif
+++ /dev/null
-/*
- * Created on: Nov 11, 2015
- * Author: bwilliams
- *
- * Copyright (c) 2015 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef _MaIntegration_h_
-#define _MaIntegration_h_
-
-namespace Caf {
-
-/** @brief CAF AMQP Integration */
-namespace MaIntegration {
- extern const char* _sObjIdIntegrationObjects;
-}}
-
-namespace Caf {
- extern const char* _sObjIdCollectSchemaExecutor;
- extern const char* _sObjIdProviderCollectSchemaExecutor;
- extern const char* _sObjIdProviderExecutor;
- extern const char* _sObjIdSinglePmeRequestSplitterInstance;
- extern const char* _sObjIdSinglePmeRequestSplitter;
- extern const char* _sObjIdDiagToMgmtRequestTransformerInstance;
- extern const char* _sObjIdDiagToMgmtRequestTransformer;
- extern const char* _sObjIdInstallToMgmtRequestTransformerInstance;
- extern const char* _sObjIdInstallToMgmtRequestTransformer;
-
- extern const char* _sObjIdAttachmentRequestTransformerInstance;
- extern const char* _sObjIdAttachmentRequestTransformer;
- extern const char* _sObjIdVersionTransformerInstance;
- extern const char* _sObjIdVersionTransformer;
-
- extern const char* _sObjIdPersistenceNamespaceDb;
- extern const char* _sObjIdConfigEnv;
-}
-
-#endif /* _MaIntegration_h_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Aug 16, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CVgAuthContext_H_
-#define CVgAuthContext_H_
-
-namespace Caf {
-
-class CVgAuthContext {
-public:
- CVgAuthContext();
- virtual ~CVgAuthContext();
-
-public:
- void initialize(
- const std::string& applicationName);
-
- VGAuthContext* getPtr() const;
-
- std::string getApplicationName() const;
-
-private:
- bool _isInitialized;
- VGAuthContext* _vgAuthContext;
- std::string _applicationName;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CVgAuthContext);
-};
-
-CAF_DECLARE_SMART_POINTER(CVgAuthContext);
-
-}
-
-#endif /* CVgAuthContext_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Aug 16, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CVgAuthImpersonation_H_
-#define CVgAuthImpersonation_H_
-
-namespace Caf {
-
-class CVgAuthImpersonation {
-public:
- CVgAuthImpersonation();
- virtual ~CVgAuthImpersonation();
-
-public:
- void impersonateAndManage(
- const SmartPtrCVgAuthContext& vgAuthContext,
- const SmartPtrCVgAuthUserHandle& vgAuthUserHandle);
-
-public:
- static void beginImpersonation(
- const SmartPtrCVgAuthContext& vgAuthContext,
- const SmartPtrCVgAuthUserHandle& vgAuthUserHandle);
-
- static void endImpersonation(
- const SmartPtrCVgAuthContext& vgAuthContext);
-
-private:
- void impersonateLocal(
- const SmartPtrCVgAuthContext& vgAuthContext,
- const SmartPtrCVgAuthUserHandle& vgAuthUserHandle) const;
-
-private:
- bool _isInitialized;
- SmartPtrCVgAuthContext _vgAuthContext;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CVgAuthImpersonation);
-};
-
-CAF_DECLARE_SMART_POINTER(CVgAuthImpersonation);
-
-}
-
-#endif /* CVgAuthImpersonation_H_ */
+++ /dev/null
-/*
- * Author: bwilliams
- * Created: Aug 16, 2012
- *
- * Copyright (c) 2012 Vmware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef CVgAuthUserHandle_H_
-#define CVgAuthUserHandle_H_
-
-namespace Caf {
-
-class CVgAuthUserHandle {
-public:
- CVgAuthUserHandle();
- virtual ~CVgAuthUserHandle();
-
-public:
- void initialize(
- const SmartPtrCVgAuthContext& vgAuthContext,
- const std::string& signedSamlToken);
-
- void initialize(
- const SmartPtrCVgAuthContext& vgAuthContext,
- const std::string& signedSamlToken,
- const std::string& userName);
-
-public:
- std::string getUserName(
- const SmartPtrCVgAuthContext& vgAuthContext) const;
-
- VGAuthUserHandle* getPtr() const;
-
-private:
- bool _isInitialized;
- VGAuthUserHandle* _vgAuthUserHandle;
-
-private:
- CAF_CM_CREATE;
- CAF_CM_CREATE_LOG;
- CAF_CM_DECLARE_NOCOPY(CVgAuthUserHandle);
-};
-
-CAF_DECLARE_SMART_POINTER(CVgAuthUserHandle);
-
-}
-
-#endif /* CVgAuthUserHandle_H_ */
+++ /dev/null
-/*
- * Created on: Jan 25, 2012
- * Author: mdonahue
- *
- * Copyright (c) 2012 VMware, Inc. All rights reserved.
- * -- VMware Confidential
- */
-
-#ifndef _IVgAuthImpersonation_H_
-#define _IVgAuthImpersonation_H_
-
-namespace Caf {
-
-struct __declspec(novtable)
- IVgAuthImpersonation : public ICafObject
-{
- CAF_DECL_UUID("63cfac22-e1b8-4977-8907-9582657b7420")
-
- virtual void endImpersonation() = 0;
-};
-
-CAF_DECLARE_SMART_INTERFACE_POINTER(IVgAuthImpersonation);
-
-}
-
-#endif /* _IVgAuthImpersonation_H_ */
libProviderFx_la_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@
libProviderFx_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include
-libProviderFx_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include/Contracts
+libProviderFx_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include
libProviderFx_la_LIBADD =
libProviderFx_la_LIBADD += @GLIB2_LIBS@
libProviderFx_la_LIBADD += @LOG4CPP_LIBS@