• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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 MMS_ENCODE_STRING_H
17 #define MMS_ENCODE_STRING_H
18 
19 #include <string>
20 
21 #include "mms_decode_buffer.h"
22 #include "mms_encode_buffer.h"
23 #include "mms_address.h"
24 
25 namespace OHOS {
26 namespace Telephony {
27 class MmsEncodeString {
28 public:
29     MmsEncodeString();
30     ~MmsEncodeString();
31     MmsEncodeString(const MmsEncodeString &obj);
32     bool DecodeEncodeString(MmsDecodeBuffer &decodeBuffer);
33     bool EncodeEncodeString(MmsEncodeBuffer &encodeBuffer);
34     bool GetEncodeString(std::string &encodeString);
35     bool SetEncodeString(uint32_t charset, const std::string &encodeStringt);
36     bool SetAddressString(MmsAddress &addrsss);
37 private:
38     static constexpr uint32_t CHARSET_UTF8 = 0x6A;
39     uint32_t charset_ = 0;
40     uint32_t valLength_ = 0;
41     std::string strEncodeString_ = "";
42 };
43 } // namespace Telephony
44 } // namespace OHOS
45 #endif
46