aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCory Fields <theuni-nospam-@xbmc.org>2013-08-08 20:47:17 -0400
committerCory Fields <theuni-nospam-@xbmc.org>2013-08-08 21:01:51 -0400
commit2a6328dd2a2ba2d35aa9551228d01490cb80fcb8 (patch)
tree9cdc295149dc378c8a62f0e82f866940eceecc32
parenta98cbcfeac9b1acdd39bc1f930abfe68a1c6f733 (diff)
jni: const'ify Intent as necessary
-rw-r--r--xbmc/android/jni/Intent.cpp14
-rw-r--r--xbmc/android/jni/Intent.h14
2 files changed, 14 insertions, 14 deletions
diff --git a/xbmc/android/jni/Intent.cpp b/xbmc/android/jni/Intent.cpp
index 9557411fab..b09b6c9d34 100644
--- a/xbmc/android/jni/Intent.cpp
+++ b/xbmc/android/jni/Intent.cpp
@@ -34,45 +34,45 @@ CJNIIntent::CJNIIntent(const std::string &action) : CJNIBase("android/content/In
jcast<jhstring>(action));
}
-std::string CJNIIntent::getAction()
+std::string CJNIIntent::getAction() const
{
return jcast<std::string>(call_method<jhstring>(m_object,
"getAction", "()Ljava/lang/String;"));
}
-std::string CJNIIntent::getDataString()
+std::string CJNIIntent::getDataString() const
{
return jcast<std::string>(call_method<jhstring>(m_object,
"getDataString", "()Ljava/lang/String;"));
}
-std::string CJNIIntent::getPackage()
+std::string CJNIIntent::getPackage() const
{
return jcast<std::string>(call_method<jhstring>(m_object,
"getPackage", "()Ljava/lang/String;"));
}
-std::string CJNIIntent::getType()
+std::string CJNIIntent::getType() const
{
return jcast<std::string>(call_method<jhstring>(m_object,
"getType", "()Ljava/lang/String;"));
}
-int CJNIIntent::getIntExtra(const std::string &name, int defaultValue)
+int CJNIIntent::getIntExtra(const std::string &name, int defaultValue) const
{
return call_method<jint>(m_object,
"getIntExtra", "(Ljava/lang/String;I)I",
jcast<jhstring>(name), defaultValue);
}
-bool CJNIIntent::hasExtra(const std::string &name)
+bool CJNIIntent::hasExtra(const std::string &name) const
{
return call_method<jboolean>(m_object,
"hasExtra", "(Ljava/lang/String;)Z",
jcast<jhstring>(name));
}
-bool CJNIIntent::hasCategory(const std::string &category)
+bool CJNIIntent::hasCategory(const std::string &category) const
{
return call_method<jboolean>(m_object,
"hasCategory", "(Ljava/lang/String;)Z",
diff --git a/xbmc/android/jni/Intent.h b/xbmc/android/jni/Intent.h
index c31c989c1f..a944b03248 100644
--- a/xbmc/android/jni/Intent.h
+++ b/xbmc/android/jni/Intent.h
@@ -29,15 +29,15 @@ public:
CJNIIntent(const jni::jhobject &intent) : CJNIBase(intent) {};
~CJNIIntent() {};
- std::string getAction();
- std::string getDataString();
- std::string getPackage();
- std::string getType();
+ std::string getAction() const;
+ std::string getDataString() const ;
+ std::string getPackage() const;
+ std::string getType() const ;
- int getIntExtra(const std::string &name, int defaultValue);
+ int getIntExtra(const std::string &name, int defaultValue) const;
- bool hasExtra(const std::string &name);
- bool hasCategory(const std::string &category);
+ bool hasExtra(const std::string &name) const;
+ bool hasCategory(const std::string &category) const;
void addFlags(int flags);
void addCategory(const std::string &category);