Skip to content

Commit e96332d

Browse files
committed
API: Mark suitable CP methods const
1 parent 9db1d11 commit e96332d

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

include/osdp.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ class OSDP_EXPORT Common {
3232
osdp_set_log_callback(cb);
3333
}
3434

35-
const char *get_version()
35+
const char *get_version() const
3636
{
3737
return osdp_get_version();
3838
}
3939

40-
const char *get_source_info()
40+
const char *get_source_info() const
4141
{
4242
return osdp_get_source_info();
4343
}
4444

45-
void get_status_mask(uint8_t *bitmask)
45+
void get_status_mask(uint8_t *bitmask) const
4646
{
4747
osdp_get_status_mask(_ctx, bitmask);
4848
}
4949

50-
void get_sc_status_mask(uint8_t *bitmask)
50+
void get_sc_status_mask(uint8_t *bitmask) const
5151
{
5252
osdp_get_sc_status_mask(_ctx, bitmask);
5353
}
@@ -57,7 +57,7 @@ class OSDP_EXPORT Common {
5757
return osdp_file_register_ops(_ctx, pd, ops);
5858
}
5959

60-
int file_tx_get_status(int pd, int *size, int *offset)
60+
int file_tx_get_status(int pd, int *size, int *offset) const
6161
{
6262
return osdp_get_file_tx_status(_ctx, pd, size, offset);
6363
}
@@ -101,7 +101,7 @@ class OSDP_EXPORT ControlPanel : public Common {
101101
return false;
102102
}
103103

104-
int add_pd(int num_pd, const osdp_pd_info_t *info)
104+
int add_pd(int num_pd, const osdp_pd_info_t *info) const
105105
{
106106
return osdp_cp_add_pd(_ctx, num_pd, info);
107107
}
@@ -138,12 +138,12 @@ class OSDP_EXPORT ControlPanel : public Common {
138138
osdp_cp_set_command_completion_callback(_ctx, cb, arg);
139139
}
140140

141-
int get_pd_id(int pd, struct osdp_pd_id *id)
141+
int get_pd_id(int pd, struct osdp_pd_id *id) const
142142
{
143143
return osdp_cp_get_pd_id(_ctx, pd, id);
144144
}
145145

146-
int get_capability(int pd, struct osdp_pd_cap *cap)
146+
int get_capability(int pd, struct osdp_pd_cap *cap) const
147147
{
148148
return osdp_cp_get_capability(_ctx, pd, cap);
149149
}
@@ -163,7 +163,7 @@ class OSDP_EXPORT ControlPanel : public Common {
163163
return osdp_cp_enable_pd(_ctx, pd);
164164
}
165165

166-
bool is_pd_enabled(int pd)
166+
bool is_pd_enabled(int pd) const
167167
{
168168
return osdp_cp_is_pd_enabled(_ctx, pd);
169169
}

0 commit comments

Comments
 (0)