2032dedb236af20673f3d495d69aae114c706365
[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 #ifndef SHAREDDATALAYER_PUBLISHERID_HPP_
18 #define SHAREDDATALAYER_PUBLISHERID_HPP_
19
20 #include <string>
21
22 namespace shareddatalayer
23 {
24     /**
25      * Identification that can be set by a publisher to identify the source of
26      * the modification. Process that is modifying data in a namespace and is
27      * also subscribed to the same namespace can utilize the publisherId to
28      * distinguish events that it published itself.
29      */
30     using PublisherId = std::string;
31
32     /**
33      * Special constant for when a notification is not associated with any particular
34      * publisher, such as a notification after notification framework service discontinuity
35      * event. When this is set, client is advised to refresh its data from shared data
36      * layer storage as it *might* have changed.
37      *
38      * @todo add check-and-throw for this in AsyncConnection/Connection side.
39      */
40     extern const PublisherId NO_PUBLISHER;
41 }
42
43 #endif