> For the complete documentation index, see [llms.txt](https://prosbcdocs.telcobridges.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prosbcdocs.telcobridges.com/telecom-references/apis-and-integration/interfaces.md).

# Interfaces

Interfaces are basically a set of member functions that act as an application programming interface (API) to an object. Implemented as pure-virtual base classes (i.e., they can only be used through inheritance), these APIs are used by other modules of the system to interact with all types of objects without knowing their specific definitions (i.e., having to include an header file with the description of the class).

One can see these interfaces as a set of functions that everyone knows how to call. As long as a class inherits from an interface, any object that knows of this interface can use the class. This design approach is commonly used to create systems where the implementation of a given functionality is irrelevant or needs to be replaceable.

For example, a database interface would define member functions to read and write records from a database. Multiple classes deriving from that interface could implement it differently such as using an XML file instead of a real database or storing the information into random access memory (RAM). The benefit from this approach is that any other piece of code in the system only needs to be passed a pointer to the interface regardless of the type of the class implementing it. Thus, there is no knowledge of the actual class implementing the interface.

### Usage

A practical example is the implementation of the the ToolPack wrapper classes on top of the CMC API:

![CMC interfaces](https://docs.telcobridges.com/w/images/2/28/CMC_interfaces.jpg)

As shown in the figure above, the CMC library does not actually knows which classes implements the different functional APIs. It only knows of the pointers to the interfaces to each different service. Whether or not these interfaces are implemented into a single object or multiple objects is irrelevant to the CMC library.

### Caveats

Be aware that some interface member functions may have default implementation while some other absolutely need **SENTENCE IS INCOMPLETE**

***

Return to the Toolpack [User Guide](https://github.com/telcobridges-main/tmedia-wiki/tree/main/tmedia/configuration/user-guide/README.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://prosbcdocs.telcobridges.com/telecom-references/apis-and-integration/interfaces.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
