Skip to content
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

Add search targets for Belkin device and rootdevice #98

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion src/api/SSDPDB_ObjC.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
@property (NS_NONATOMIC_IOSONLY, readonly) int startSSDP;
@property (NS_NONATOMIC_IOSONLY, readonly) int stopSSDP;
@property (NS_NONATOMIC_IOSONLY, readonly) int searchSSDP;
@property (NS_NONATOMIC_IOSONLY, readonly) int searchForBelkinDevice;
@property (NS_NONATOMIC_IOSONLY, readonly) int searchForRootDevice;
@property (NS_NONATOMIC_IOSONLY, readonly) int searchForMediaServer;
@property (NS_NONATOMIC_IOSONLY, readonly) int searchForMediaRenderer;
@property (NS_NONATOMIC_IOSONLY, readonly) int searchForContentDirectory;
Expand Down Expand Up @@ -119,4 +121,4 @@
@property (readonly) unsigned int ip;
@property (readonly) unsigned short port;

@end
@end
8 changes: 8 additions & 0 deletions src/ssdp/SSDPDB_ObjC.mm
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ -(int)searchSSDP{
return UPNP::GetInstance()->GetSSDP()->Search();
}

-(int)searchForBelkinDevice{
return UPNP::GetInstance()->GetSSDP()->SearchForBelkinDevice();
}

-(int)searchForRootDevice{
return UPNP::GetInstance()->GetSSDP()->SearchForRootDevice();
}

-(int)searchForMediaServer{
return UPNP::GetInstance()->GetSSDP()->SearchForMediaServer();
}
Expand Down
8 changes: 8 additions & 0 deletions src/ssdp/ssdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,14 @@ int SSDP::Search(){
return this->SendSearchRequest("ssdp:all");
}

int SSDP::SearchForBelkinDevice(){
return this->SendSearchRequest("urn:Belkin:device:controllee:1");
}

int SSDP::SearchForRootDevice(){
return this->SendSearchRequest("upnp:rootdevice");
}

int SSDP::SearchForMediaServer(){
return this->SendSearchRequest("urn:schemas-upnp-org:device:MediaServer:1");
}
Expand Down
4 changes: 3 additions & 1 deletion src/ssdp/ssdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class SSDP{
int RemoveObserver(SSDPObserver* observer);
int Advertise();
int Search();
int SearchForBelkinDevice();
int SearchForRootDevice();
int SearchForMediaServer();
int SearchForMediaRenderer();
int SearchForContentDirectory();
Expand Down Expand Up @@ -102,4 +104,4 @@ class SSDP{
};


#endif //_SSDP_H_
#endif //_SSDP_H_