Static abstract factory class used to create network technology specific MAbstractConnection objects.
Public Methods
-
void Register(MAbstractCreator* aCreator)
- Registers a new MAbstractCreator implementation.
-
MAbstractConnection* CreateConnectionL(const std::string& aProto)
- Creates a new MAbstractConnection implementation specific to some network technology.
-
MAbstractPinger* CreatePingerL(const std::string& aProto, const std::string& aAddress)
- Creates a new MAbstractPinger object.
-
MAbstractMonitor* CreateMonitorL(const std::string& aProto, const std::string& aAddress)
- Creates a new MAbstractMonitor object.
-
std::string* GetPluginNamesL(int* aSize)
- Returns an array containing the names of all loaded plugins.
Documentation
Static abstract factory class used to create network technology
specific MAbstractConnection objects. This class holds a list of
MAbstractCreator objects that include the actual network technology
specified functionality. The usage of the abstract factory pattern enables
transparent creation of MAbstractConnection objects of the right type.
void Register(MAbstractCreator* aCreator)
-
Registers a new MAbstractCreator implementation to the list of possible
creators. These creators are network technology dependent and there should
be exactly one creator for each network technology.
- Parameters:
- aCreator - The creator to be registered. If the creator is NULL then
nothing happens.
- Returns:
- none
MAbstractConnection* CreateConnectionL(const std::string& aProto)
-
Creates a new MAbstractConnection implementation that is specific to
some certain network technology. The prototype string is given to each
registered creator one by one and if a creator recognizes the prototype it
creates the asked connection object. Otherwise the prototype string is given
to the next creator.
- Parameters:
- aProto - Prototype string of the desired network technology.
- Returns:
- the newly created connection object or NULL if no matching creator
could be found
MAbstractPinger* CreatePingerL(const std::string& aProto, const std::string& aAddress)
-
Creates a new MAbstractConnection object that is suitable for the given
networking technology. The prototype string is given to each registered
creator one by one as long as a creator recognizes it or all the creators
have been tried. If a creator recognizes the prototype string then it
creates a Pinger objects and returns that. The returned object is then
passed to the original caller.
- Parameters:
- aProto - Prototype string of the desired network technology.
aAddress - Remote device's address.
- Returns:
- the newly created connection object or NULL if no matching creator
could be found
MAbstractMonitor* CreateMonitorL(const std::string& aProto, const std::string& aAddress)
-
Creates a new MAbstractMonitor object that is suitable for the given
networking technology. The prototype string is given to each registered
creator one by one as long as a creator recognizes it or all the creators
have been tried. If a creator recognizes the prototype string then it
creates a Pinger objects and returns that. The returned object is then
passed to the original caller.
- Parameters:
- aProto - Prototype string of the desired network technology.
aAddress - Remote device's address.
- Returns:
- the newly created connection object or NULL if no matching creator
could be found
std::string* GetPluginNamesL(int* aSize)
-
Returns an array containing the names of all loaded plugins. Note that
caller is responsible of freeing the memory reserved for the returned array.
It's safe to call <code>delete</code> for the returned array even if there
are no items on it.
- Parameters:
- aSize - On return, this int contains the number of items on the list.
This parameter cannot be NULL.
- Returns:
- array of plugin names or NULL if no plugins are available
- This class has no child classes.
- See Also:
- MAbstractCreator
MAbstractConnection
MAbstractPinger
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.