Skip to content

Hide some private friend functions from swig #1565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions auth/src/include/firebase/auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -669,10 +669,12 @@ class Auth {
friend class UserDesktopTest;
friend class AuthDesktopTest;

#ifndef SWIG
friend void EnableTokenAutoRefresh(AuthData* authData);
friend void DisableTokenAutoRefresh(AuthData* authData);
friend void ResetTokenRefreshCounter(AuthData* authData);
friend void LogHeartbeat(Auth* auth);
#endif // not SWIG
/// @endcond

// Find Auth instance using App. Return null if the instance does not exist.
Expand Down
2 changes: 2 additions & 0 deletions database/src/include/firebase/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ class Database {
LogLevel log_level() const;

private:
#ifndef SWIG
friend Database* GetDatabaseInstance(::firebase::App* app, const char* url,
InitResult* init_result_out);
#endif // not SWIG
Database(::firebase::App* app, internal::DatabaseInternal* internal);
Database(const Database& src);
Database& operator=(const Database& src);
Expand Down
2 changes: 2 additions & 0 deletions database/src/include/firebase/database/mutable_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ class MutableData {
friend class internal::DatabaseInternal;
friend class internal::MutableDataInternal;
friend class internal::Repo;
#ifndef SWIG
friend MutableData GetInvalidMutableData();
#endif // not SWIG
/// @endcond

explicit MutableData(internal::MutableDataInternal* internal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ class AggregateQuerySnapshot {

friend bool operator==(const AggregateQuerySnapshot& lhs,
const AggregateQuerySnapshot& rhs);
#ifndef SWIG
friend std::size_t AggregateQuerySnapshotHash(
const AggregateQuerySnapshot& snapshot);
#endif // not SWIG
friend struct ConverterImpl;
friend class AggregateQuerySnapshotTest;

Expand Down
2 changes: 2 additions & 0 deletions firestore/src/include/firebase/firestore/document_change.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ class DocumentChange {
std::size_t Hash() const;

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

friend class FirestoreInternal;
friend class Wrapper;
Expand Down
2 changes: 2 additions & 0 deletions firestore/src/include/firebase/firestore/document_snapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ class DocumentSnapshot {

friend bool operator==(const DocumentSnapshot& lhs,
const DocumentSnapshot& rhs);
#ifndef SWIG
friend std::size_t DocumentSnapshotHash(const DocumentSnapshot& snapshot);
#endif // not SWIG

friend class DocumentChangeInternal;
friend class EventListenerInternal;
Expand Down
2 changes: 2 additions & 0 deletions firestore/src/include/firebase/firestore/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,9 @@ class Query {
size_t Hash() const;

friend bool operator==(const Query& lhs, const Query& rhs);
#ifndef SWIG
friend size_t QueryHash(const Query& query);
#endif // not SWIG

friend class FirestoreInternal;
friend class QueryInternal;
Expand Down
2 changes: 2 additions & 0 deletions firestore/src/include/firebase/firestore/query_snapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ class QuerySnapshot {
std::size_t Hash() const;

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

friend class EventListenerInternal;
friend class FirestoreInternal;
Expand Down
Loading