• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-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 SERVICES_EDM_INCLUDE_CONNECTION_IENTERPRISE_CONNECTION_H
17 #define SERVICES_EDM_INCLUDE_CONNECTION_IENTERPRISE_CONNECTION_H
18 
19 #include "ability_connect_callback_stub.h"
20 #include "enterprise_admin_proxy.h"
21 
22 namespace OHOS {
23 namespace EDM {
24 class IEnterpriseConnection : public AAFwk::AbilityConnectionStub {
25 public:
IEnterpriseConnection(const AAFwk::Want & want,uint32_t code,uint32_t userId)26     IEnterpriseConnection(const AAFwk::Want &want, uint32_t code,
27         uint32_t userId) : want_(want), code_(code), userId_(userId) {};
28 
~IEnterpriseConnection()29     virtual ~IEnterpriseConnection() {};
30 
GetWant()31     AAFwk::Want GetWant() const
32     {
33         return want_;
34     }
35 
GetUserId()36     uint32_t GetUserId() const
37     {
38         return userId_;
39     }
40 protected:
41     AAFwk::Want want_;
42     uint32_t code_;
43     uint32_t userId_;
44 
45     sptr<EnterpriseAdminProxy> proxy_{nullptr};
46 };
47 } // namespace EDM
48 } // namespace OHOS
49 #endif // SERVICES_EDM_INCLUDE_CONNECTION_IENTERPRISE_CONNECTION_H