• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * Copyright (c) 2022 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/**
17 * Phone Data Type - Instant Messaging
18 */
19export class Aim {
20  static readonly CONTENT_ITEM_TYPE: string = "vnd.cursor.item/aim_v2";
21  static readonly TYPE_AIM: number = 1;
22  static readonly TYPE_WINDOWSLIVE: number = 2;
23  static readonly TYPE_YAHOO: number = 3;
24  static readonly TYPE_SKYPE: number = 4;
25  static readonly TYPE_QQ: number= 5;
26  static readonly TYPE_HANGOUTS: number = 6;
27  static readonly TYPE_ICQ: number = 7;
28  static readonly TYPE_JABBER: number = 8
29  static readonly TYPE_CUSTOM: number = 0;
30
31  static getTypeLabelResource(type: number) {
32    switch (type) {
33      case Aim.TYPE_AIM:
34        return $r("app.string.instant_type_aim");
35      case Aim.TYPE_WINDOWSLIVE:
36        return $r("app.string.instant_type_windowslive");
37      case Aim.TYPE_YAHOO:
38        return $r("app.string.instant_type_yahoo");
39      case Aim.TYPE_SKYPE:
40        return $r("app.string.instant_type_skype");
41      case Aim.TYPE_QQ:
42        return $r("app.string.instant_type_qq");
43      case Aim.TYPE_HANGOUTS:
44        return $r("app.string.instant_type_hangouts");
45      case Aim.TYPE_ICQ:
46        return $r("app.string.instant_type_icq");
47      case Aim.TYPE_JABBER:
48        return $r("app.string.instant_type_jabber");
49      case Aim.TYPE_CUSTOM:
50        return $r("app.string.instant_type_custom");
51      default:
52        return $r("app.string.instant_type_custom");
53    }
54  }
55
56  constructor() {
57  }
58}