1 /* 2 * Copyright (C) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef COMMUNICATIONNETMANAGEREXT_MDNS_CONSTANT_H 17 #define COMMUNICATIONNETMANAGEREXT_MDNS_CONSTANT_H 18 19 #include <cstdint> 20 21 22 static constexpr int32_t PARAM_NONE = 0; 23 static constexpr int32_t PARAM_JUST_OPTIONS = 2; 24 static constexpr int32_t PARAM_OPTIONS_AND_CALLBACK = 3; 25 26 static constexpr const char *EVENT_SERVICESTART = "discoveryStart"; 27 static constexpr const char *EVENT_SERVICESTOP = "discoveryStop"; 28 static constexpr const char *EVENT_SERVICEFOUND = "serviceFound"; 29 static constexpr const char *EVENT_SERVICELOST = "serviceLost"; 30 31 static constexpr const char *ERRCODE = "errorCode"; 32 static constexpr const char *SERVICEINFO = "serviceInfo"; 33 static constexpr const char *SERVICEINFO_ATTR = "serviceAttribute"; 34 static constexpr const char *SERVICEINFO_ADDRESS = "address"; 35 static constexpr const char *SERVICEINFO_TYPE = "serviceType"; 36 static constexpr const char *SERVICEINFO_NAME = "serviceName"; 37 static constexpr const char *SERVICEINFO_PORT = "port"; 38 static constexpr const char *SERVICEINFO_HOST = "host"; 39 static constexpr const char *SERVICEINFO_FAMILY = "family"; 40 41 static constexpr const char *SERVICEINFO_ATTR_KEY = "key"; 42 static constexpr const char *SERVICEINFO_ATTR_VALUE = "value"; 43 static constexpr const char *CONTEXT_ATTR_APPINFO = "applicationInfo"; 44 static constexpr const char *APPINFO_ATTR_NAME = "name"; 45 46 static constexpr const char *MDNS_ERR = "MdnsError"; 47 static constexpr const char *INTERNAL_ERROR_NAME = "INTERNAL_ERROR"; 48 static constexpr const char *ALREADY_ACTIVE_NAME = "ALREADY_ACTIVE"; 49 static constexpr const char *MAX_LIMIT_NAME = "MAX_LIMIT"; 50 51 enum { 52 ARG_NUM_0, 53 ARG_NUM_1, 54 ARG_NUM_2, 55 }; 56 57 enum MDnsErr { 58 INTERNAL_ERROR, 59 ALREADY_ACTIVE, 60 MAX_LIMIT, 61 }; 62 #endif /* COMMUNICATIONNETMANAGEREXT_MDNS_CONSTANT_H */ 63