RIC:1060: Change in PTL
[ric-plt/sdl.git] / include / sdl / publisherid.hpp
1 /*
2    Copyright (c) 2018-2019 Nokia.
3
4    Licensed under the Apache License, Version 2.0 (the "License");
5    you may not use this file except in compliance with the License.
6    You may obtain a copy of the License at
7
8        http://www.apache.org/licenses/LICENSE-2.0
9
10    Unless required by applicable law or agreed to in writing, software
11    distributed under the License is distributed on an "AS IS" BASIS,
12    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    See the License for the specific language governing permissions and
14    limitations under the License.
15 */
16
17 /*
18  * This source code is part of the near-RT RIC (RAN Intelligent Controller)
19  * platform project (RICP).
20 */
21
22 #ifndef SHAREDDATALAYER_PUBLISHERID_HPP_
23 #define SHAREDDATALAYER_PUBLISHERID_HPP_
24
25 #include <string>
26
27 namespace shareddatalayer
28 {
29     /**
30      * Identification that can be set by a publisher to identify the source of
31      * the modification. Process that is modifying data in a namespace and is
32      * also subscribed to the same namespace can utilize the publisherId to
33      * distinguish events that it published itself.
34      */
35     using PublisherId = std::string;
36
37     /**
38      * Special constant for when a notification is not associated with any particular
39      * publisher, such as a notification after notification framework service discontinuity
40      * event. When this is set, client is advised to refresh its data from shared data
41      * layer storage as it *might* have changed.
42      *
43      * @todo add check-and-throw for this in AsyncConnection/Connection side.
44      */
45     extern const PublisherId NO_PUBLISHER;
46 }
47
48 #endif