📄 megaco_binary_name_resolver_prev3c.erl
字号:
%% ``The contents of this file are subject to the Erlang Public License,%% Version 1.1, (the "License"); you may not use this file except in%% compliance with the License. You should have received a copy of the%% Erlang Public License along with this software. If not, it can be%% retrieved via the world wide web at http://www.erlang.org/.%% %% Software distributed under the License is distributed on an "AS IS"%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See%% the License for the specific language governing rights and limitations%% under the License.%% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB.%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings%% AB. All Rights Reserved.''%% %% $Id$%%%%----------------------------------------------------------------------%% Purpose: Handle meta data about packages%%-----------------------------------------------------------------------module(megaco_binary_name_resolver_prev3c).-include_lib("megaco/src/engine/megaco_message_internal.hrl").-include_lib("megaco/src/app/megaco_internal.hrl").-define(LOWER(Char), if Char >= $A, Char =< $Z -> Char - ($A - $a); true -> Char end).-export([packages/0, capabilities/0, capabilities/1, decode_name/3, encode_name/3 ]).encode_name(Config, term_id, TermId) -> case megaco:encode_binary_term_id(Config, TermId) of {ok, TermId2} -> TermId2; {error, Reason} -> exit({bad_term_id, TermId, Reason}) end; encode_name(_Config, Scope, Item) -> ?d("encode_name(~p) -> entry with" "~n Item: ~p", [Scope, Item]), encode(Scope, Item).decode_name(Config, term_id, TermId) -> case megaco:decode_binary_term_id(Config, TermId) of {ok, TermId2} -> TermId2; {error, Reason} -> exit({bad_term_id, TermId, Reason}) end;decode_name(_Config, Scope, Item) -> ?d("decode_name(~p) -> entry with" "~n Item: ~p", [Scope, Item]), decode(Scope, Item).%%----------------------------------------------------------------------%% 12.1.1 Package%% %% Overall description of the package, specifying:%% %% Package Name: only descriptive%% %% PackageID: is an identifier%% %% Description: is a description of the package%% %% Version: %% %% A new version of a package can only add additional Properties, %% Events, Signals, Statistics and new possible values for an %% existing parameter described in the original package. No %% deletions or modifications shall be allowed. A version is an %% integer in the range from 1 to 99.%% %% Designed to be extended only (Optional): Yes%% %% This indicates that the package has been expressly designed to %% be extended by others, not to be directly referenced. For %% example, the package may not have any function on its own or be %% nonsensical on its own. The MG SHOULD NOT publish this PackageID %% when reporting packages.%% %% Extends: existing package Descriptor%% %% A package may extend an existing package. The version of the %% original package must be specified. When a package extends %% another package it shall only add additional Properties, Events, %% Signals, Statistics and new possible values for an existing %% parameter described in the original package. An extended package %% shall not redefine or overload an identifier defined in the %% original package and packages it may have extended (multiple %% levels of extension). Hence, if package B version 1 extends %% package A version 1, version 2 of B will not be able to extend %% the A version 2 if A version 2 defines a name already in B %% version 1. If the package does not extend another package, it %% shall specify "none".%% %% %% 12.1.2 Properties%% %% Properties defined by the package, specifying:%% %% Property Name: only descriptive%% %% PropertyID: is an identifier%% %% Description: is a description of the function of the property%% %% Type: One of:%% %% Boolean%% %% String: UTF-8 string%% %% Octet String: A number of octets. See Annex A and B.3 for %% encoding%% %% Integer: 4 byte signed integer%% %% Double: 8 byte signed integer%% %% Character: unicode UTF-8 encoding of a single letter. %% Could be more than one octet.%% %% Enumeration: one of a list of possible unique values (see 12.3)%% %% Sub-list: a list of several values from a list. %% The type of sub-list SHALL also be specified. %% The type shall be chosen from the types specified in %% this section (with the exception of sub-list). For %% example, Type: sub-list of enumeration. The encoding %% of sub-lists is specified in Annexes A and B.3.%% %% Possible values:%% %% A package MUST specify either a specific set of values or a %% description of how values are determined. A package MUST also %% specify a default value or the default behaviour when the value %% is omitted from its descriptor. For example, a package may %% specify that procedures related to the property are suspended %% when its value is omitted.%% %% Default:%% %% A default value (but not procedures) may be specified as %% provisionable.%% %% Defined in:%% %% Which H.248.1 descriptor the property is defined in. %% LocalControl is for stream-dependent properties. %% TerminationState is for stream-independent properties. %% ContextAttribute is for properties that affect the context as %% a whole, i.e., mixing properties. These are expected to be the %% most common cases, but it is possible for properties to be %% defined in other descriptors. Context properties MUST be defined %% in the ContextAttribute descriptor.%% %% Characteristics: Read/Write or both, and (optionally), global: %% %% Indicates whether a property is read-only, or read-write, and %% if it is global. If Global is omitted, the property is not %% global. If a property is declared as global, the value of the %% property is shared by all Terminations realizing the package. %% If a context property is declared as global, the property is %% shared by all contexts realizing the package.%% %% %% 12.1.3 Events%% %% Events defined by the package, specifying:%% %% Event name: only descriptive%% %% EventID: is an identifier%% %% Description: a description of the function of the event%% %% EventsDescriptor Parameters: %% %% Parameters used by the MGC to configure the event, and found in %% the EventsDescriptor. See 12.2. If there are no parameters for %% the Events Descriptor, then "none" shall be specified.%% %% ObservedEventsDescriptor Parameters: %% %% Parameters returned to the MGC in Notify requests and in replies %% to command requests from the MGC that audit %% ObservedEventsDescriptor, and found in the %% ObservedEventsDescriptor. See 12.2. If there are no parameters %% for the ObservedEvents Descriptor, then 萵one
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -