OXY-SYNC-DIRECTORY 1.0
OXY-SYNC-DIRECTORY Library Documentation
Loading...
Searching...
No Matches
api.hpp File Reference

This file defines the interfaces for synchronizing and updating the metadata directory. More...

Classes

struct  oxy::directory::ISyncDirectory
 Interface for synchronizing the metadata directory. More...
struct  oxy::directory::IUpdateDirectory
 Interface for updating the metadata directory. More...

Namespaces

namespace  oxy::directory
 The oxy::directory namespace contains interfaces and functions for synchronizing and updating the metadata directory.

Typedefs

using oxy::directory::ISyncDirectoryPtr = std::shared_ptr<ISyncDirectory>
 Type alias for a shared pointer to an ISyncDirectory instance.
using oxy::directory::IUpdateDirectoryPtr = std::shared_ptr<IUpdateDirectory>
 Type alias for a shared pointer to an IUpdateDirectory instance.

Functions

OXY_DIRECTORY_API ISyncDirectoryPtr oxy::directory::create_sync_instance ()
 Create an instance of ISyncDirectory.
OXY_DIRECTORY_API IUpdateDirectoryPtr oxy::directory::create_update_instance ()
 Create an instance of IUpdateDirectory.

Detailed Description

This file defines the interfaces for synchronizing and updating the metadata directory.

The ISyncDirectory and IUpdateDirectory interfaces provide methods for counting, synchronizing, and updating metadata records in the directory based on customer identifiers and metadata IDs. Implementations of these interfaces should provide the actual logic for these operations.

Note
The create_sync_instance and create_update_instance functions are provided to create instances of the respective interfaces. These functions return shared pointers to the created instances, allowing for easy memory management and sharing of the interface instances across different parts of the application.
The OXY_DIRECTORY_API macro is used to handle symbol visibility for shared library builds, ensuring that the interfaces are correctly exported or imported depending on the build context.
The interfaces are designed to be flexible and extensible, allowing for different implementations to be provided based on specific requirements or use cases. This design promotes modularity and separation of concerns, enabling developers to focus on the specific logic for synchronizing and updating the metadata directory without being concerned with the underlying implementation details.
The use of shared pointers for the interface instances allows for automatic memory management, reducing the risk of memory leaks and ensuring that the instances are properly cleaned up when they are no longer needed. This design choice promotes safe and efficient resource management in the application.