Skip to content

Commit 6bbda6a

Browse files
authored
Hide some private friend functions from swig (#1565)
* Hide some private auth functions from swig * Hide more methods
1 parent dd34e37 commit 6bbda6a

File tree

8 files changed

+16
-0
lines changed

8 files changed

+16
-0
lines changed

auth/src/include/firebase/auth.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,10 +669,12 @@ class Auth {
669669
friend class UserDesktopTest;
670670
friend class AuthDesktopTest;
671671

672+
#ifndef SWIG
672673
friend void EnableTokenAutoRefresh(AuthData* authData);
673674
friend void DisableTokenAutoRefresh(AuthData* authData);
674675
friend void ResetTokenRefreshCounter(AuthData* authData);
675676
friend void LogHeartbeat(Auth* auth);
677+
#endif // not SWIG
676678
/// @endcond
677679

678680
// Find Auth instance using App. Return null if the instance does not exist.

database/src/include/firebase/database.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,10 @@ class Database {
181181
LogLevel log_level() const;
182182

183183
private:
184+
#ifndef SWIG
184185
friend Database* GetDatabaseInstance(::firebase::App* app, const char* url,
185186
InitResult* init_result_out);
187+
#endif // not SWIG
186188
Database(::firebase::App* app, internal::DatabaseInternal* internal);
187189
Database(const Database& src);
188190
Database& operator=(const Database& src);

database/src/include/firebase/database/mutable_data.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ class MutableData {
148148
friend class internal::DatabaseInternal;
149149
friend class internal::MutableDataInternal;
150150
friend class internal::Repo;
151+
#ifndef SWIG
151152
friend MutableData GetInvalidMutableData();
153+
#endif // not SWIG
152154
/// @endcond
153155

154156
explicit MutableData(internal::MutableDataInternal* internal);

firestore/src/include/firebase/firestore/aggregate_query_snapshot.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,10 @@ class AggregateQuerySnapshot {
126126

127127
friend bool operator==(const AggregateQuerySnapshot& lhs,
128128
const AggregateQuerySnapshot& rhs);
129+
#ifndef SWIG
129130
friend std::size_t AggregateQuerySnapshotHash(
130131
const AggregateQuerySnapshot& snapshot);
132+
#endif // not SWIG
131133
friend struct ConverterImpl;
132134
friend class AggregateQuerySnapshotTest;
133135

firestore/src/include/firebase/firestore/document_change.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ class DocumentChange {
176176
std::size_t Hash() const;
177177

178178
friend bool operator==(const DocumentChange& lhs, const DocumentChange& rhs);
179+
#ifndef SWIG
179180
friend std::size_t DocumentChangeHash(const DocumentChange& change);
181+
#endif // not SWIG
180182

181183
friend class FirestoreInternal;
182184
friend class Wrapper;

firestore/src/include/firebase/firestore/document_snapshot.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ class DocumentSnapshot {
265265

266266
friend bool operator==(const DocumentSnapshot& lhs,
267267
const DocumentSnapshot& rhs);
268+
#ifndef SWIG
268269
friend std::size_t DocumentSnapshotHash(const DocumentSnapshot& snapshot);
270+
#endif // not SWIG
269271

270272
friend class DocumentChangeInternal;
271273
friend class EventListenerInternal;

firestore/src/include/firebase/firestore/query.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,9 @@ class Query {
678678
size_t Hash() const;
679679

680680
friend bool operator==(const Query& lhs, const Query& rhs);
681+
#ifndef SWIG
681682
friend size_t QueryHash(const Query& query);
683+
#endif // not SWIG
682684

683685
friend class FirestoreInternal;
684686
friend class QueryInternal;

firestore/src/include/firebase/firestore/query_snapshot.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ class QuerySnapshot {
167167
std::size_t Hash() const;
168168

169169
friend bool operator==(const QuerySnapshot& lhs, const QuerySnapshot& rhs);
170+
#ifndef SWIG
170171
friend std::size_t QuerySnapshotHash(const QuerySnapshot& snapshot);
172+
#endif // not SWIG
171173

172174
friend class EventListenerInternal;
173175
friend class FirestoreInternal;

0 commit comments

Comments
 (0)