--- a/.classpath Thu Nov 26 15:21:46 2009 +0100
+++ b/.classpath Tue Dec 15 10:29:46 2009 +0100
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry kind="lib" path="libs/smackx-debug.jar"/>
- <classpathentry kind="lib" path="libs/smackx-jingle.jar" sourcepath="/home/nikita/devel/smack">
+ <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry exported="true" kind="lib" path="libs/smackx-debug.jar"/>
+ <classpathentry exported="true" kind="lib" path="libs/smackx-jingle.jar" sourcepath="/home/nikita/devel/smack">
<attributes>
<attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/"/>
</attributes>
</classpathentry>
- <classpathentry kind="lib" path="libs/security.jar"/>
- <classpathentry kind="lib" path="libs/smack.jar" sourcepath="/home/marseille/smack_src_3_1_0/source">
+ <classpathentry exported="true" kind="lib" path="libs/security.jar"/>
+ <classpathentry exported="true" kind="lib" path="libs/smack.jar" sourcepath="/home/marseille/smack_src_3_1_0/source">
<attributes>
<attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/org/"/>
</attributes>
</classpathentry>
- <classpathentry kind="lib" path="libs/smackx.jar" sourcepath="/home/nikita/devel/smack">
+ <classpathentry exported="true" kind="lib" path="libs/smackx.jar" sourcepath="/home/nikita/devel/smack">
<attributes>
<attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/"/>
</attributes>
</classpathentry>
- <classpathentry kind="lib" path="libs/jlibrtp.jar">
+ <classpathentry exported="true" kind="lib" path="libs/jlibrtp.jar">
<attributes>
<attribute name="javadoc_location" value="file:/home/nikita/android/docs/reference/"/>
</attributes>
--- a/.hgignore Thu Nov 26 15:21:46 2009 +0100
+++ b/.hgignore Tue Dec 15 10:29:46 2009 +0100
@@ -5,3 +5,6 @@
src/com/beem/project/beem/service/aidl/*.java
gen/*
local.properties
+**~
+**/.*.sw?
+
--- a/AndroidManifest.xml Thu Nov 26 15:21:46 2009 +0100
+++ b/AndroidManifest.xml Tue Dec 15 10:29:46 2009 +0100
@@ -5,17 +5,15 @@
<application android:label="@string/app_name"
android:icon="@drawable/beem_launcher_icon_silver" android:theme="@style/Theme.BEEM.Default"
android:debuggable="true" android:name="@string/app_name">
- <activity android:name=".ui.Login" android:label="@string/app_name" android:screenOrientation="portrait"
- android:launchMode="singleTask">
+ <activity android:name=".ui.Login" android:label="@string/app_name"
+ android:screenOrientation="portrait" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
- <intent-filter android:label="Beem Connection">
- <action
- android:name="com.beem.project.beem.service.XmppConnectionAdapter.CONNECTION_CLOSED" />
- </intent-filter>
</activity>
+ <activity android:name=".ui.LoginAnim" android:label="@string/login_login_progress"
+ android:launchMode="singleTop" />
<activity android:name=".ui.Settings" android:label="@string/edit_settings_name">
<intent-filter android:label="Beem Connection">
<action
@@ -55,12 +53,6 @@
android:name="com.beem.project.beem.service.XmppConnectionAdapter.CONNECTION_CLOSED" />
</intent-filter>
</activity>
- <activity android:name=".ui.UserInfo" android:label="@string/user_info_name">
- <intent-filter android:label="Beem Connection">
- <action
- android:name="com.beem.project.beem.service.XmppConnectionAdapter.CONNECTION_CLOSED" />
- </intent-filter>
- </activity>
<activity android:name=".jingle.demo.JingleCallActivity"
android:label="JingleDemoCall">
<intent-filter>
@@ -94,6 +86,7 @@
<uses-permission android:name="android.permission.VIBRATE"></uses-permission>
<uses-permission android:name="com.beem.project.beem.BEEM_SERVICE"></uses-permission>
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"></uses-permission>
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-sdk android:minSdkVersion="3"></uses-sdk>
</manifest>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/COPYING Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CREDITS Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,9 @@
+This file contains the name of the people who have contributed to
+BEEM. The names are sorted alphabetically by last name.
+
+Frederic-Charles Barthelery
+Jean-Manuel Da Silva
+Nikita Kozlov
+Philippe Lago
+Jean Baptiste Vergely
+Vincent Véronis
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/LicenseHeader.txt Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,43 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
Binary file libs/smack.jar has changed
Binary file libs/smackx-debug.jar has changed
Binary file libs/smackx-jingle.jar has changed
Binary file libs/smackx.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/res/anim/rotate_and_scale.xml Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <scale android:fromXScale="0.5" android:toXScale="1.0"
+ android:fromYScale="0.5" android:toYScale="1.0"
+ android:pivotX="50%" android:pivotY="50%"
+ android:repeatMode="reverse" android:duration="8000"
+ android:repeatCount="infinite" />
+ <rotate android:fromDegrees="0" android:toDegrees="360"
+ android:pivotX="50%" android:pivotY="50%"
+ android:duration="5000"
+ android:repeatMode="restart"
+ android:repeatCount="infinite" />
+</set>
--- a/res/layout/contactdialog.xml Thu Nov 26 15:21:46 2009 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- <Button android:id="@+id/CDChat" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:text="@string/CDChat" />
-
- <Button android:id="@+id/CDCall" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:text="@string/CDCall" />
-
- <Button android:id="@+id/CDInfos" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:text="@string/CDInfos" />
-
-</LinearLayout>
\ No newline at end of file
--- a/res/layout/contactdialogaliasdialog.xml Thu Nov 26 15:21:46 2009 +0100
+++ b/res/layout/contactdialogaliasdialog.xml Tue Dec 15 10:29:46 2009 +0100
@@ -2,13 +2,14 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
-
+ <TextView android:id="@+id/CDAliasDialogLabel"
+ android:layout_height="wrap_content" android:layout_width="wrap_content"
+ android:layout_marginLeft="20dip" android:layout_marginRight="20dip"
+ android:text="@string/userinfo_label_alias"
+ android:gravity="left" style="@style/Label" />
<EditText android:id="@+id/CDAliasDialogName"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
- android:inputType="textPersonName" android:imeOptions="actionDone"
- android:singleLine="true" android:maxLines="1" />
-
- <Button android:id="@+id/CDAliasDialogOk" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:text="@string/OkButton" />
-
+ android:layout_height="wrap_content" android:layout_width="fill_parent"
+ android:layout_marginLeft="20dip" android:layout_marginRight="20dip"
+ android:scrollHorizontally="true" android:autoText="false"
+ android:capitalize="none" android:gravity="fill_horizontal" />
</LinearLayout>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/res/layout/login_anim.xml Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_height="fill_parent" android:layout_width="fill_parent"
+ android:orientation="vertical">
+ <ImageView android:id="@+id/loginanim_logo_anim" android:src="@drawable/beem_launcher_icon_color"
+ android:layout_height="fill_parent" android:layout_width="fill_parent"
+ android:layout_weight="1" />
+ <Button android:id="@+id/loginanim_cancel_button"
+ android:layout_height="wrap_content" android:layout_width="fill_parent"
+ android:layout_gravity="bottom" android:text="@string/CancelButton" />
+</LinearLayout>
+
--- a/res/layout/userinfo.xml Thu Nov 26 15:21:46 2009 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- <LinearLayout android:orientation="vertical"
- android:layout_width="fill_parent" android:layout_height="wrap_content">
- <LinearLayout android:id="@+id/userinfo_layout_alias"
- android:orientation="vertical" android:layout_width="fill_parent"
- android:layout_height="70px">
- <TextView android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:paddingLeft="20sp"
- android:singleLine="true" android:maxLines="1" android:textSize="30px"
- android:text="@string/userinfo_label_alias" />
- <TextView android:id="@+id/userinfo_alias"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
- android:paddingLeft="20sp" android:singleLine="true" />
- </LinearLayout>
- <View android:layout_height="1px" android:layout_width="fill_parent"
- android:background="#FFFFFF" />
- <LinearLayout android:id="@+id/userinfo_layout_chg_group"
- android:orientation="vertical" android:layout_width="fill_parent"
- android:layout_height="70px">
- <TextView android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:paddingLeft="20sp"
- android:singleLine="true" android:maxLines="1" android:textSize="30px"
- android:text="@string/userinfo_label_chg_group" />
- <Gallery android:id="@+id/userinfo_groups"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
- android:spacing="10px" />
- </LinearLayout>
- <View android:layout_height="1px" android:layout_width="fill_parent"
- android:background="#FFFFFF" />
- <LinearLayout android:id="@+id/userinfo_layout_re_suscription"
- android:orientation="vertical" android:layout_width="fill_parent"
- android:layout_height="70px">
- <TextView android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:paddingLeft="20sp"
- android:singleLine="true" android:maxLines="1" android:textSize="30px"
- android:text="@string/userinfo_label_re_suscription" />
- </LinearLayout>
- <View android:layout_height="1px" android:layout_width="fill_parent"
- android:background="#FFFFFF" />
- <LinearLayout android:id="@+id/userinfo_layout_block"
- android:orientation="vertical" android:layout_width="fill_parent"
- android:layout_height="70px">
- <TextView android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:paddingLeft="20sp"
- android:singleLine="true" android:maxLines="1" android:textSize="30px"
- android:text="@string/userinfo_label_block" />
- </LinearLayout>
- <View android:layout_height="1px" android:layout_width="fill_parent"
- android:background="#FFFFFF" />
- <LinearLayout android:id="@+id/userinfo_layout_delete"
- android:orientation="vertical" android:layout_width="fill_parent"
- android:layout_height="70px">
- <TextView android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:paddingLeft="20sp"
- android:singleLine="true" android:maxLines="1" android:textSize="30px"
- android:text="@string/userinfo_label_delete" />
- </LinearLayout>
- </LinearLayout>
-</ScrollView>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/res/menu/contactlist_context.xml Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,21 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/contact_list_context_menu_chat_item"
+ android:title="@string/CDChat" />
+ <item android:id="@+id/contact_list_context_menu_call_item"
+ android:title="@string/CDCall" android:visible="false" />
+ <item android:id="@+id/contact_list_context_menu_user_info"
+ android:title="@string/CDInfos">
+ <menu>
+ <item android:id="@+id/contact_list_context_menu_userinfo_alias"
+ android:title="@string/userinfo_label_alias" />
+ <item android:id="@+id/contact_list_context_menu_userinfo_group"
+ android:title="@string/userinfo_label_chg_group" />
+ <item android:id="@+id/contact_list_context_menu_userinfo_subscription"
+ android:title="@string/userinfo_label_re_subscription" />
+ <item android:id="@+id/contact_list_context_menu_userinfo_block"
+ android:title="@string/userinfo_label_block" android:visible="false"/>
+ <item android:id="@+id/contact_list_context_menu_userinfo_delete"
+ android:title="@string/userinfo_label_delete" />
+ </menu>
+ </item>
+</menu>
--- a/res/menu/edit_settings.xml Thu Nov 26 15:21:46 2009 +0100
+++ b/res/menu/edit_settings.xml Tue Dec 15 10:29:46 2009 +0100
@@ -3,10 +3,6 @@
android:visible="true"
android:icon="@drawable/ic_menu_invite"
android:title="@string/settings_menu_create_account" />
- <item android:id="@+id/settings_menu_login"
- android:visible="true"
- android:title="@string/settings_menu_login"
- android:icon="@drawable/ic_menu_login" />
<item android:id="@+id/settings_menu_privacy_lists"
android:visible="true"
android:title="@string/settings_menu_privacy_lists"
--- a/res/menu/login.xml Thu Nov 26 15:21:46 2009 +0100
+++ b/res/menu/login.xml Tue Dec 15 10:29:46 2009 +0100
@@ -1,4 +1,8 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/login_menu_login"
+ android:visible="true"
+ android:title="@string/login_menu_login"
+ android:icon="@drawable/ic_menu_login" />
<item android:id="@+id/login_menu_settings"
android:visible="true"
android:title="@string/login_menu_settings"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/res/menu/privacy_list_context.xml Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,8 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/privacy_list_context_menu_buddies_item"
+ android:title="@string/privacy_list_select_dialog_buddies" />
+ <item android:id="@+id/privacy_list_context_menu_groups_item"
+ android:title="@string/privacy_list_select_dialog_groups" />
+ <item android:id="@+id/privacy_list_context_menu_delete_item"
+ android:title="@string/privacy_list_select_dialog_delete" />
+</menu>
--- a/res/values-fr/strings.xml Thu Nov 26 15:21:46 2009 +0100
+++ b/res/values-fr/strings.xml Tue Dec 15 10:29:46 2009 +0100
@@ -170,28 +170,15 @@
<string name="login_login_progress">Connexion en cours. Veuillez patienter...</string>
<string name="login_error_msg">Malheureusement, une erreur est survenu.\n\nDétail
de l\'erreur :\n%s</string>
+ <string name="login_menu_login">Se connecter</string>
+ <string name="login_no_connectivity">Pas de connexion internet disponible</string>
<!--
EditSettings Activity
-->
<string name="settings_menu_create_account">Créer un compte</string>
- <string name="settings_menu_login">Se connecter</string>
<string name="settings_menu_privacy_lists">Gérer mes listes privées</string>
- <string name="settings_saved_ok">Les paramètres ont été enregistrés avec succès.
- </string>
-
- <string name="settings_key_account_username">beem_account_username</string>
- <string name="settings_key_account_password">beem_account_password</string>
- <string name="settings_key_xmpp_server">beem_xmpp_server</string>
- <string name="settings_key_xmpp_port">beem_xmpp_port</string>
- <string name="settings_key_xmpp_tls_use">beem_xmpp_tls_use</string>
- <string name="settings_key_proxy_use">beem_xmpp_proxy_use</string>
- <string name="settings_key_proxy_server">beem_xmpp_proxy_server</string>
- <string name="settings_key_proxy_port">beem_xmpp_proxy_port</string>
- <string name="settings_key_proxy_username">beem_xmpp_proxy_username</string>
- <string name="settings_key_proxy_password">beem_xmpp_proxy_password</string>
- <string name="settings_key_proxy_type">beem_xmpp_proxy_type</string>
- <string name="settings_key_hidden_contact">settings_key_hidden_contact</string>
+ <string name="settings_saved_ok">Les paramètres ont été enregistrés avec succès.</string>
<!-- EditSettings Activity Categories -->
<string name="general_preferences">Préférences de l\'application</string>
@@ -246,7 +233,7 @@
<string name="create_account_err_dialog_title">Créer un compte - Erreur</string>
<string name="create_account_err_dialog_settings_button">Changer mes paramètres</string>
<string name="create_account_close_dialog_button">Fermer</string>
- <string name="create_account_successfull_after">A été créé avec succès</string>
+ <string name="create_account_successfull_after">L\'utilisateur %s a été créé avec succès</string>
<string name="create_account_err_username">Mauvais JabberID</string>
<string name="create_account_err_passwords">Les mots de passe ne correspondent pas</string>
<string name="create_account_username">Nom d\'utilisateur</string>
@@ -267,7 +254,7 @@
-->
<string name="userinfo_label_alias">Alias</string>
<string name="userinfo_label_chg_group">Modifier groupe</string>
- <string name="userinfo_label_re_suscription">Renvoyer l\'invitation</string>
+ <string name="userinfo_label_re_subscription">Renvoyer l\'invitation</string>
<string name="userinfo_label_block">Bloquer</string>
<string name="userinfo_label_delete">Supprimer</string>
<string name="userinfo_resend">Souscription réenvoyée</string>
@@ -287,7 +274,7 @@
<string name="chat_no_more_chats">Aucune conversation en cours</string>
<string name="contact_status_msg_available">Disponible</string>
- <string name="contact_status_msg_available_chat">Disponible pour clavarder</string>
+ <string name="contact_status_msg_available_chat">Disponible pour discuter</string>
<string name="contact_status_msg_dnd">Occupé(e)</string>
<string name="contact_status_msg_away">Absent(e)</string>
<string name="contact_status_msg_xa">Indisponible</string>
@@ -299,6 +286,12 @@
<string name="privacy_list_create_dialog_title">Créer une liste privée</string>
<string name="privacy_list_create_dialog_list_name_label">Titre</string>
<string name="privacy_list_create_dialog_create_button">Créer</string>
+ <string name="privacy_list_select_dialog_buddies">Contacts</string>
+ <string name="privacy_list_select_dialog_groups">Groupes</string>
+ <string name="privacy_list_select_dialog_delete">Supprimer</string>
+ <string name="privacy_list_delete_dialog_msg">Souhaitez-vous vraiment supprimer la liste privée intitulée '%s' ?</string>
+ <string name="privacy_list_delete_dialog_yes">Oui</string>
+ <string name="privacy_list_delete_dialog_no">Non</string>
<string name="UpdateButton">Mettre à jour</string>
</resources>
--- a/res/values/strings.xml Thu Nov 26 15:21:46 2009 +0100
+++ b/res/values/strings.xml Tue Dec 15 10:29:46 2009 +0100
@@ -160,25 +160,15 @@
<string name="login_max_retry">Max retry</string>
<string name="login_error_msg">Unfortunately, an error occured.\n\nError
detail:\n%s</string>
+ <string name="login_menu_login">Login</string>
+ <string name="login_no_connectivity">No internet connection found</string>
<!-- EditSettings Activity -->
<string name="settings_menu_create_account">Create an account</string>
- <string name="settings_menu_login">Login</string>
<string name="settings_menu_privacy_lists">Manage my privacy lists</string>
<string name="settings_saved_ok">The settings have been saved successfully.</string>
- <string name="settings_key_account_username">beem_account_username</string>
- <string name="settings_key_account_password">beem_account_password</string>
- <string name="settings_key_xmpp_server">beem_xmpp_server</string>
- <string name="settings_key_xmpp_port">beem_xmpp_port</string>
- <string name="settings_key_xmpp_tls_use">beem_xmpp_tls_use</string>
- <string name="settings_key_proxy_use">beem_xmpp_proxy_use</string>
- <string name="settings_key_proxy_server">beem_xmpp_proxy_server</string>
- <string name="settings_key_proxy_port">beem_xmpp_proxy_port</string>
- <string name="settings_key_proxy_username">beem_xmpp_proxy_username</string>
- <string name="settings_key_proxy_password">beem_xmpp_proxy_password</string>
- <string name="settings_key_proxy_type">beem_xmpp_proxy_type</string>
- <string name="settings_key_hidden_contact">settings_key_hidden_contact</string>
+
<!-- EditSettings Activity Categories -->
<string name="general_preferences">General preferences</string>
@@ -231,7 +221,7 @@
<string name="create_account_err_dialog_title">Create an account - Error</string>
<string name="create_account_err_dialog_settings_button">Change my settings</string>
<string name="create_account_close_dialog_button">Close</string>
- <string name="create_account_successfull_after">has been created successfully</string>
+ <string name="create_account_successfull_after">account %s has been created successfully</string>
<string name="create_account_err_username">Bad JabberID</string>
<string name="create_account_err_passwords">Passwords do not match.</string>
<string name="create_account_username">Username</string>
@@ -244,10 +234,10 @@
<string name="contact_list_all_contact">All contacts</string>
<string name="contact_list_no_group">No group</string>
- <!-- UserInfo Activity -->
+ <!-- UserInfo dialog -->
<string name="userinfo_label_alias">Alias</string>
<string name="userinfo_label_chg_group">Manage groups</string>
- <string name="userinfo_label_re_suscription">Resend invit</string>
+ <string name="userinfo_label_re_subscription">Resend invit</string>
<string name="userinfo_label_block">Block</string>
<string name="userinfo_label_delete">Delete</string>
<string name="userinfo_resend">Suscription resend</string>
@@ -283,6 +273,9 @@
<string name="privacy_list_select_dialog_buddies">Buddies</string>
<string name="privacy_list_select_dialog_groups">Groups</string>
<string name="privacy_list_select_dialog_delete">Delete</string>
+ <string name="privacy_list_delete_dialog_msg">Do you really want to delete the privacy list entitled '%s' ?</string>
+ <string name="privacy_list_delete_dialog_yes">Yes</string>
+ <string name="privacy_list_delete_dialog_no">No</string>
<string name="UpdateButton">Update</string>
</resources>
--- a/src/com/beem/project/beem/BeemService.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/BeemService.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem;
import org.jivesoftware.smack.ConnectionConfiguration;
@@ -51,6 +94,7 @@
import com.beem.project.beem.service.XmppFacade;
import com.beem.project.beem.service.aidl.IXmppFacade;
+// TODO: Auto-generated Javadoc
/**
* This class is for the Beem service. The connection to the xmpp server will be made asynchronously when the service
* will start.
@@ -58,9 +102,7 @@
*/
public class BeemService extends Service {
- /**
- * The id to use for status notification.
- */
+ /** The id to use for status notification. */
public static final int NOTIFICATION_STATUS_ID = 100;
private static final String TAG = "BeemService";
@@ -79,7 +121,6 @@
private ProxyInfo mProxyInfo;
private boolean mUseProxy;
private IXmppFacade.Stub mBind;
- private ProviderManager mProviderManager;
/**
* Constructor.
@@ -128,6 +169,9 @@
return mBind;
}
+ /* (non-Javadoc)
+ * @see android.app.Service#onUnbind(android.content.Intent)
+ */
@Override
public boolean onUnbind(Intent intent) {
Log.d(TAG, "ONUNBIND()");
@@ -180,7 +224,7 @@
@Override
public void onDestroy() {
super.onDestroy();
- mNotificationManager.cancel(NOTIFICATION_STATUS_ID);
+ mNotificationManager.cancelAll();
if (mConnection.isAuthentificated())
mConnection.disconnect();
Log.d(TAG, "ONDESTROY");
@@ -222,7 +266,7 @@
*/
public void resetStatus() {
Editor edit = mSettings.edit();
- edit.putInt(getString(R.string.PreferenceStatus), 1);
+ edit.putInt("PreferenceStatus", 1);
edit.commit();
}
@@ -270,12 +314,11 @@
pm.addExtensionProvider("x", "jabber:x:event", new MessageEventProvider());
// Chat State
pm.addExtensionProvider("active", "http://jabber.org/protocol/chatstates", new ChatStateExtension.Provider());
- pm.addExtensionProvider("composing", "http://jabber.org/protocol/chatstates",
- new ChatStateExtension.Provider());
+ pm
+ .addExtensionProvider("composing", "http://jabber.org/protocol/chatstates",
+ new ChatStateExtension.Provider());
pm.addExtensionProvider("paused", "http://jabber.org/protocol/chatstates", new ChatStateExtension.Provider());
- pm
- .addExtensionProvider("inactive", "http://jabber.org/protocol/chatstates",
- new ChatStateExtension.Provider());
+ pm.addExtensionProvider("inactive", "http://jabber.org/protocol/chatstates", new ChatStateExtension.Provider());
pm.addExtensionProvider("gone", "http://jabber.org/protocol/chatstates", new ChatStateExtension.Provider());
// XHTML
pm.addExtensionProvider("html", "http://jabber.org/protocol/xhtml-im", new XHTMLExtensionProvider());
--- a/src/com/beem/project/beem/jingle/JingleService.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/jingle/JingleService.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,6 +1,46 @@
/**
- *
- */
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.jingle;
import java.util.ArrayList;
@@ -20,6 +60,7 @@
import android.util.Log;
+// TODO: Auto-generated Javadoc
/**
* Beem Jingle Service, manage jingle call.
* @author nikita
--- a/src/com/beem/project/beem/jingle/MicrophoneRTPManager.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/jingle/MicrophoneRTPManager.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.jingle;
import java.util.ArrayList;
@@ -10,14 +53,14 @@
import org.jivesoftware.smackx.jingle.nat.JingleTransportManager;
import org.jivesoftware.smackx.jingle.nat.TransportCandidate;
+// TODO: Auto-generated Javadoc
/**
* RTPMediaManager, gere les payloads et renvoie une session RTP.
* @author nikita
*/
public class MicrophoneRTPManager extends JingleMediaManager {
- /**
- * RTP media name.
- */
+
+ /** RTP media name. */
public static final String MEDIA_NAME = "Microphone";
private List<PayloadType> mPayloads;
@@ -32,6 +75,9 @@
setupPayloads();
}
+ /* (non-Javadoc)
+ * @see org.jivesoftware.smackx.jingle.media.JingleMediaManager#createMediaSession(org.jivesoftware.smackx.jingle.media.PayloadType, org.jivesoftware.smackx.jingle.nat.TransportCandidate, org.jivesoftware.smackx.jingle.nat.TransportCandidate, org.jivesoftware.smackx.jingle.JingleSession)
+ */
@Override
public JingleMediaSession createMediaSession(PayloadType payloadType, TransportCandidate remote,
TransportCandidate local, JingleSession jingleSession) {
@@ -39,11 +85,17 @@
return new MicrophoneRTPSession(payloadType, remote, local, null, jingleSession);
}
+ /* (non-Javadoc)
+ * @see org.jivesoftware.smackx.jingle.media.JingleMediaManager#getName()
+ */
@Override
public String getName() {
return MEDIA_NAME;
}
+ /* (non-Javadoc)
+ * @see org.jivesoftware.smackx.jingle.media.JingleMediaManager#getPayloads()
+ */
@Override
public List<PayloadType> getPayloads() {
// TODO Auto-generated method stub
--- a/src/com/beem/project/beem/jingle/MicrophoneRTPSession.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/jingle/MicrophoneRTPSession.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.jingle;
import org.jivesoftware.smackx.jingle.JingleSession;
@@ -5,6 +48,7 @@
import org.jivesoftware.smackx.jingle.media.PayloadType;
import org.jivesoftware.smackx.jingle.nat.TransportCandidate;
+// TODO: Auto-generated Javadoc
/**
* Manage microphone RTP session.
* @author nikita
@@ -32,26 +76,41 @@
// mReceiver = new MicroRTPReceiver(getLocal().getPort());
}
+ /* (non-Javadoc)
+ * @see org.jivesoftware.smackx.jingle.media.JingleMediaSession#initialize()
+ */
@Override
public void initialize() {
// TODO Auto-generated method stub
}
+ /* (non-Javadoc)
+ * @see org.jivesoftware.smackx.jingle.media.JingleMediaSession#setTrasmit(boolean)
+ */
@Override
public void setTrasmit(boolean active) {
}
+ /* (non-Javadoc)
+ * @see org.jivesoftware.smackx.jingle.media.JingleMediaSession#startReceive()
+ */
@Override
public void startReceive() {
}
+ /* (non-Javadoc)
+ * @see org.jivesoftware.smackx.jingle.media.JingleMediaSession#startTrasmit()
+ */
@Override
public void startTrasmit() {
}
+ /* (non-Javadoc)
+ * @see org.jivesoftware.smackx.jingle.media.JingleMediaSession#stopReceive()
+ */
@Override
public void stopReceive() {
if (mReceiver != null) {
@@ -59,6 +118,9 @@
}
}
+ /* (non-Javadoc)
+ * @see org.jivesoftware.smackx.jingle.media.JingleMediaSession#stopTrasmit()
+ */
@Override
public void stopTrasmit() {
if (mTransmitter != null) {
--- a/src/com/beem/project/beem/jingle/PCMTransmitter.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/jingle/PCMTransmitter.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,9 +1,53 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.jingle;
import android.media.AudioFormat;
import android.media.AudioRecord;
import android.media.MediaRecorder;
+// TODO: Auto-generated Javadoc
/**
* Transmit Microphone data through RTP.
* @author nikita
@@ -23,6 +67,9 @@
super(remoteIP, remotePort);
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.jingle.RTPTransmitter#start()
+ */
@Override
void start() {
AudioRecord audRec = new AudioRecord(MediaRecorder.AudioSource.DEFAULT, RATE_IN_HZ,
--- a/src/com/beem/project/beem/jingle/RTPReceiver.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/jingle/RTPReceiver.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.jingle;
import java.net.DatagramSocket;
@@ -7,6 +50,7 @@
import org.jlibrtp.jlibrtp.RTPAppIntf;
import org.jlibrtp.jlibrtp.RTPSession;
+// TODO: Auto-generated Javadoc
/**
* abstract RTP receiver class.
* @author nikita
@@ -34,11 +78,17 @@
mRtpSession.RTPSessionRegister(this, null, null);
}
+ /* (non-Javadoc)
+ * @see org.jlibrtp.jlibrtp.RTPAppIntf#frameSize(int)
+ */
@Override
public int frameSize(int payloadType) {
return 1;
}
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
@Override
public void run() {
start();
@@ -57,6 +107,9 @@
this.setKillme(true);
}
+ /* (non-Javadoc)
+ * @see org.jlibrtp.jlibrtp.RTPAppIntf#userEvent(int, org.jlibrtp.jlibrtp.Participant[])
+ */
@Override
public void userEvent(int arg0, Participant[] arg1) {
// TODO Auto-generated method stub
--- a/src/com/beem/project/beem/jingle/RTPTransmitter.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/jingle/RTPTransmitter.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.jingle;
import java.net.DatagramSocket;
@@ -10,6 +53,7 @@
import com.beem.project.beem.utils.FreePort;
+// TODO: Auto-generated Javadoc
/**
* abstract RTP transmitter class.
* @author nikita
@@ -46,16 +90,25 @@
getRtpSession().addParticipant(new Participant(remoteIP, remotePort, 0));
}
+ /* (non-Javadoc)
+ * @see org.jlibrtp.jlibrtp.RTPAppIntf#frameSize(int)
+ */
@Override
public int frameSize(int payloadType) {
return 1;
}
+ /* (non-Javadoc)
+ * @see org.jlibrtp.jlibrtp.RTPAppIntf#receiveData(org.jlibrtp.jlibrtp.DataFrame, org.jlibrtp.jlibrtp.Participant)
+ */
@Override
public void receiveData(DataFrame frame, Participant participant) {
// On envoie uniquement
}
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
@Override
public void run() {
start();
@@ -73,6 +126,9 @@
mKillme = true;
}
+ /* (non-Javadoc)
+ * @see org.jlibrtp.jlibrtp.RTPAppIntf#userEvent(int, org.jlibrtp.jlibrtp.Participant[])
+ */
@Override
public void userEvent(int type, Participant[] participant) {
// je sais pas ce que c'est
--- a/src/com/beem/project/beem/jingle/demo/JingleCallActivity.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/jingle/demo/JingleCallActivity.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.jingle.demo;
import org.jivesoftware.smack.ConnectionConfiguration;
@@ -17,6 +60,7 @@
import com.beem.project.beem.R;
import com.beem.project.beem.jingle.JingleService;
+// TODO: Auto-generated Javadoc
/**
* Activity used to test Jingle call.
* @author darisk
@@ -42,6 +86,9 @@
public JingleCallActivity() {
}
+ /* (non-Javadoc)
+ * @see android.app.Activity#onCreate(android.os.Bundle)
+ */
@Override
protected void onCreate(Bundle savedInstanceState) {
java.security.Security.addProvider(new com.sun.security.sasl.Provider());
--- a/src/com/beem/project/beem/jingle/demo/package-info.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/jingle/demo/package-info.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,5 +1,45 @@
/**
- * Package for testing the Jingle classes.
- */
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.jingle.demo;
--- a/src/com/beem/project/beem/jingle/package-info.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/jingle/package-info.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,5 +1,45 @@
/**
- * This package contains the class used by the Beem Jingle process.
- */
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.jingle;
--- a/src/com/beem/project/beem/package-info.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/package-info.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,5 +1,45 @@
/**
- * This package contains the main class for the Beem application.
- */
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem;
--- a/src/com/beem/project/beem/provider/Beem.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/provider/Beem.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,8 +1,52 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.provider;
import android.net.Uri;
import android.provider.BaseColumns;
+// TODO: Auto-generated Javadoc
/**
* Convenience definitions for BEEM's providers.
*/
@@ -13,86 +57,76 @@
*/
public static final class Contacts implements BaseColumns {
- /**
- * The query used to create the table.
- */
+ /** The query used to create the table. */
public static final String QUERY_CREATE = "CREATE TABLE " + Beem.CONTACTS_TABLE_NAME + " (" + BaseColumns._ID
+ " INTEGER PRIMARY KEY AUTOINCREMENT," + Contacts.UID + " INTEGER, " + Contacts.JID + " INTEGER,"
+ Contacts.NICKNAME + " TEXT," + Contacts.ALIAS + " TEXT," + Contacts.DATE_CREATED + " INTEGER,"
+ Contacts.DATE_MODIFIED + " INTEGER" + ");";
- /**
- * The content:// style URL for Contacts table.
- */
+ /** The content:// style URL for Contacts table. */
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/contacts");
- /**
- * The MIME type of {@link #CONTENT_URI} providing a directory of contacts.
- */
+ /** The MIME type of {@link #CONTENT_URI} providing a directory of contacts. */
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.beem.project.contact";
- /**
- * The MIME type of a {@link #CONTENT_URI} sub-directory of a single contact.
- */
+ /** The MIME type of a {@link #CONTENT_URI} sub-directory of a single contact. */
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.beem.project.contact";
- /**
- * The default sort order for this table.
- */
+ /** The default sort order for this table. */
public static final String DEFAULT_SORT_ORDER = "nickname ASC";
/**
- * The user id having the contact
- * <P>
- * Type: INTEGER
- * </P>
- * .
- */
+ * The user id having the contact
+ * <P>
+ * Type: INTEGER
+ * </P>
+ * .
+ */
public static final String UID = "uid";
/**
- * The JabberID of the contact
- * <P>
- * Type: INTEGER
- * </P>
- * .
- */
+ * The JabberID of the contact
+ * <P>
+ * Type: INTEGER
+ * </P>
+ * .
+ */
public static final String JID = "jid";
/**
- * The nickname of the contact
- * <P>
- * Type: TEXT
- * </P>
- * .
- */
+ * The nickname of the contact
+ * <P>
+ * Type: TEXT
+ * </P>
+ * .
+ */
public static final String NICKNAME = "nickname";
/**
- * The alias of the contact
- * <P>
- * Type: TEXT
- * </P>
- * .
- */
+ * The alias of the contact
+ * <P>
+ * Type: TEXT
+ * </P>
+ * .
+ */
public static final String ALIAS = "alias";
/**
- * The timestamp for when the contact was created
- * <P>
- * Type: INTEGER (long from System.curentTimeMillis())
- * </P>
- * .
- */
+ * The timestamp for when the contact was created
+ * <P>
+ * Type: INTEGER (long from System.curentTimeMillis())
+ * </P>
+ * .
+ */
public static final String DATE_CREATED = "created";
/**
- * The timestamp for when the contact was last modified
- * <P>
- * Type: INTEGER (long from System.curentTimeMillis())
- * </P>
- * .
- */
+ * The timestamp for when the contact was last modified
+ * <P>
+ * Type: INTEGER (long from System.curentTimeMillis())
+ * </P>
+ * .
+ */
public static final String DATE_MODIFIED = "modified";
}
@@ -102,84 +136,64 @@
*/
public static final class Users implements BaseColumns {
- /**
- * The query used to create the table.
- */
+ /** The query used to create the table. */
public static final String QUERY_CREATE = "CREATE TABLE " + Beem.USERS_TABLE_NAME + " (" + BaseColumns._ID
+ " INTEGER PRIMARY KEY AUTOINCREMENT," + Users.JUSERNAME + " TEXT," + Users.DATE_CREATED + " INTEGER,"
+ Users.DATE_MODIFIED + " INTEGER" + ");";
- /**
- * The content:// style URL for Contacts table.
- */
+ /** The content:// style URL for Contacts table. */
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/users");
- /**
- * The MIME type of {@link #CONTENT_URI} providing a directory of users.
- */
+ /** The MIME type of {@link #CONTENT_URI} providing a directory of users. */
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.beem.project.user";
- /**
- * The MIME type of a {@link #CONTENT_URI} sub-directory of a single user.
- */
+ /** The MIME type of a {@link #CONTENT_URI} sub-directory of a single user. */
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.beem.project.user";
- /**
- * The default sort order for this table.
- */
+ /** The default sort order for this table. */
public static final String DEFAULT_SORT_ORDER = "_id ASC";
/**
- * The Jabber username of the user
- * <P>
- * Type: TEXT
- * </P>
- * .
- */
+ * The Jabber username of the user
+ * <P>
+ * Type: TEXT
+ * </P>
+ * .
+ */
public static final String JUSERNAME = "username";
/**
- * The timestamp for when the user was created
- * <P>
- * Type: INTEGER (long from System.curentTimeMillis())
- * </P>
- * .
- */
+ * The timestamp for when the user was created
+ * <P>
+ * Type: INTEGER (long from System.curentTimeMillis())
+ * </P>
+ * .
+ */
public static final String DATE_CREATED = "created";
/**
- * The timestamp for when the user was last modified
- * <P>
- * Type: INTEGER (long from System.curentTimeMillis())
- * </P>
- * .
- */
+ * The timestamp for when the user was last modified
+ * <P>
+ * Type: INTEGER (long from System.curentTimeMillis())
+ * </P>
+ * .
+ */
public static final String DATE_MODIFIED = "modified";
}
- /**
- * AUTHORITY.
- */
+ /** AUTHORITY. */
public static final String AUTHORITY = "com.beem.project.provider";
- /**
- * DB Name.
- */
+ /** DB Name. */
public static final String DB_NAME = "beem.db";
- /**
- * DB Version.
- */
+ /** DB Version. */
public static final int DB_VERSION = 2;
- /**
- * Name of the users table.
- */
+ /** Name of the users table. */
public static final String USERS_TABLE_NAME = "users";
- /**
- * Name of the contacts table.
- */
+ /** Name of the contacts table. */
public static final String CONTACTS_TABLE_NAME = "contacts";
/**
--- a/src/com/beem/project/beem/provider/BeemDatabaseHelper.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/provider/BeemDatabaseHelper.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.provider;
import android.content.Context;
@@ -5,6 +48,7 @@
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
+// TODO: Auto-generated Javadoc
/**
* BeemDatabaseHelper class.
* @author Jamu
@@ -31,11 +75,17 @@
this.mCreationQuery = creationQuery;
}
+ /* (non-Javadoc)
+ * @see android.database.sqlite.SQLiteOpenHelper#onCreate(android.database.sqlite.SQLiteDatabase)
+ */
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(this.mCreationQuery);
}
+ /* (non-Javadoc)
+ * @see android.database.sqlite.SQLiteOpenHelper#onUpgrade(android.database.sqlite.SQLiteDatabase, int, int)
+ */
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
Log.w(this.mTag, "Upgrading database from version " + oldVersion + " to " + newVersion
--- a/src/com/beem/project/beem/provider/ContactProvider.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/provider/ContactProvider.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.provider;
import java.util.HashMap;
@@ -14,6 +57,7 @@
import android.provider.BaseColumns;
import android.text.TextUtils;
+// TODO: Auto-generated Javadoc
/**
* ContactProvider class.
* @author dasilvj
@@ -45,6 +89,9 @@
private BeemDatabaseHelper mOpenHelper;
+ /* (non-Javadoc)
+ * @see android.content.ContentProvider#delete(android.net.Uri, java.lang.String, java.lang.String[])
+ */
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
@@ -69,6 +116,9 @@
return count;
}
+ /* (non-Javadoc)
+ * @see android.content.ContentProvider#getType(android.net.Uri)
+ */
@Override
public String getType(Uri uri) {
switch (S_URI_MATCHER.match(uri)) {
@@ -83,6 +133,9 @@
}
}
+ /* (non-Javadoc)
+ * @see android.content.ContentProvider#insert(android.net.Uri, android.content.ContentValues)
+ */
@Override
public Uri insert(Uri uri, ContentValues initialValues) {
// Validate the requested uri
@@ -136,12 +189,18 @@
throw new SQLException("Failed to insert row into " + uri);
}
+ /* (non-Javadoc)
+ * @see android.content.ContentProvider#onCreate()
+ */
@Override
public boolean onCreate() {
mOpenHelper = new BeemDatabaseHelper(getContext(), TAG, Beem.CONTACTS_TABLE_NAME, Beem.Contacts.QUERY_CREATE);
return true;
}
+ /* (non-Javadoc)
+ * @see android.content.ContentProvider#query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String)
+ */
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
@@ -180,6 +239,9 @@
return c;
}
+ /* (non-Javadoc)
+ * @see android.content.ContentProvider#update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[])
+ */
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
--- a/src/com/beem/project/beem/provider/UserProvider.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/provider/UserProvider.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.provider;
import java.util.HashMap;
@@ -14,6 +57,7 @@
import android.provider.BaseColumns;
import android.text.TextUtils;
+// TODO: Auto-generated Javadoc
/**
* UserProvider class.
* @author Jamu
@@ -42,6 +86,9 @@
private BeemDatabaseHelper mOpenHelper;
+ /* (non-Javadoc)
+ * @see android.content.ContentProvider#delete(android.net.Uri, java.lang.String, java.lang.String[])
+ */
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
@@ -66,6 +113,9 @@
return count;
}
+ /* (non-Javadoc)
+ * @see android.content.ContentProvider#getType(android.net.Uri)
+ */
@Override
public String getType(Uri uri) {
switch (S_URI_MATCHER.match(uri)) {
@@ -80,6 +130,9 @@
}
}
+ /* (non-Javadoc)
+ * @see android.content.ContentProvider#insert(android.net.Uri, android.content.ContentValues)
+ */
@Override
public Uri insert(Uri uri, ContentValues initialValues) {
// Validate the requested uri
@@ -120,12 +173,18 @@
throw new SQLException("Failed to insert row into " + uri);
}
+ /* (non-Javadoc)
+ * @see android.content.ContentProvider#onCreate()
+ */
@Override
public boolean onCreate() {
mOpenHelper = new BeemDatabaseHelper(getContext(), TAG, Beem.USERS_TABLE_NAME, Beem.Users.QUERY_CREATE);
return true;
}
+ /* (non-Javadoc)
+ * @see android.content.ContentProvider#query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String)
+ */
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
@@ -164,6 +223,9 @@
return c;
}
+ /* (non-Javadoc)
+ * @see android.content.ContentProvider#update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[])
+ */
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
--- a/src/com/beem/project/beem/provider/package-info.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/provider/package-info.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,5 +1,45 @@
/**
- * This package contains the class concerning the providers of Beem.
- */
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.provider;
--- a/src/com/beem/project/beem/service/BeemChatManager.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/BeemChatManager.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.service;
import java.util.ArrayList;
@@ -29,6 +72,7 @@
import com.beem.project.beem.service.aidl.IMessageListener;
import com.beem.project.beem.service.aidl.IRoster;
+// TODO: Auto-generated Javadoc
/**
* An adapter for smack's ChatManager. This class provides functionnality to handle chats.
* @author darisk
@@ -155,9 +199,7 @@
}
}
- /**
- * Tag to use with log methods.
- */
+ /** Tag to use with log methods. */
public static final String TAG = "BeemChatManager";
private final ChatManager mAdaptee;
private final Map<String, ChatAdapter> mChats = new HashMap<String, ChatAdapter>();
@@ -224,6 +266,9 @@
Log.d(TAG, "END destroyChat - jid = " + chat.getParticipant().getJID());
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IChatManager#deleteChatNotification(com.beem.project.beem.service.aidl.IChat)
+ */
@Override
public void deleteChatNotification(IChat chat) {
mService.deleteNotification(chat.hashCode());
@@ -254,7 +299,7 @@
IRoster mRoster = mService.getBind().getRoster();
for (ChatAdapter chat : mChats.values()) {
- if (chat.getMessages().size() > 0) //TODO check plutot le nombre de messages dans l'historique
+ if (chat.getMessages().size() > 0) // TODO check plutot le nombre de messages dans l'historique
openedChats.add(mRoster.getContact(chat.getParticipant().getJID()));
}
return openedChats;
--- a/src/com/beem/project/beem/service/ChatAdapter.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/ChatAdapter.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.service;
import java.util.Collections;
@@ -11,6 +54,7 @@
import com.beem.project.beem.service.aidl.IChat;
+// TODO: Auto-generated Javadoc
/**
* An adapter for smack's Chat class.
* @author darisk
--- a/src/com/beem/project/beem/service/Contact.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/Contact.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,6 +1,46 @@
/**
- *
- */
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.service;
import java.util.ArrayList;
@@ -17,15 +57,14 @@
import com.beem.project.beem.utils.Status;
+// TODO: Auto-generated Javadoc
/**
* This class contains informations on a jabber contact.
* @author darisk
*/
public class Contact implements Parcelable {
- /**
- * Parcelable.Creator needs by Android.
- */
+ /** Parcelable.Creator needs by Android. */
public static final Parcelable.Creator<Contact> CREATOR = new Parcelable.Creator<Contact>() {
@Override
--- a/src/com/beem/project/beem/service/Message.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/Message.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.service;
import org.jivesoftware.smack.packet.XMPPError;
@@ -6,34 +49,26 @@
import android.os.Parcelable;
import android.util.Log;
+// TODO: Auto-generated Javadoc
/**
* This class represents a instant message.
* @author darisk
*/
public class Message implements Parcelable {
- /**
- * Normal message type. Theese messages are like an email, with subject.
- */
+ /** Normal message type. Theese messages are like an email, with subject. */
public static final int MSG_TYPE_NORMAL = 100;
- /**
- * Chat message type.
- */
+ /** Chat message type. */
public static final int MSG_TYPE_CHAT = 200;
- /**
- * Group chat message type.
- */
+ /** Group chat message type. */
public static final int MSG_TYPE_GROUP_CHAT = 300;
- /**
- * Error message type.
- */
+ /** Error message type. */
public static final int MSG_TYPE_ERROR = 400;
- /**
- * Parcelable.Creator needs by Android.
- */
+
+ /** Parcelable.Creator needs by Android. */
public static final Parcelable.Creator<Message> CREATOR = new Parcelable.Creator<Message>() {
@Override
--- a/src/com/beem/project/beem/service/PresenceAdapter.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/PresenceAdapter.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.service;
import org.jivesoftware.smack.packet.Presence;
@@ -8,15 +51,14 @@
import com.beem.project.beem.utils.PresenceType;
import com.beem.project.beem.utils.Status;
+// TODO: Auto-generated Javadoc
/**
* this class contain contact presence informations.
* @author nikita
*/
public class PresenceAdapter implements Parcelable {
- /**
- * Parcelable.Creator needs by Android.
- */
+ /** Parcelable.Creator needs by Android. */
public static final Parcelable.Creator<PresenceAdapter> CREATOR = new Parcelable.Creator<PresenceAdapter>() {
@Override
@@ -60,6 +102,9 @@
mStatusText = presence.getStatus();
}
+ /* (non-Javadoc)
+ * @see android.os.Parcelable#describeContents()
+ */
@Override
public int describeContents() {
// TODO Auto-generated method stub
@@ -146,6 +191,9 @@
this.mType = type;
}
+ /* (non-Javadoc)
+ * @see android.os.Parcelable#writeToParcel(android.os.Parcel, int)
+ */
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(mType);
--- a/src/com/beem/project/beem/service/PrivacyListItem.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/PrivacyListItem.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,8 +1,52 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.service;
import android.os.Parcel;
import android.os.Parcelable;
+// TODO: Auto-generated Javadoc
/**
* A simplified version of the Smack PrivacyItem class.
* @author Jean-Manuel Da Silva <dasilvj at beem-project dot com>
--- a/src/com/beem/project/beem/service/PrivacyListManagerAdapter.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/PrivacyListManagerAdapter.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.service;
import java.util.ArrayList;
@@ -17,15 +60,14 @@
import com.beem.project.beem.service.aidl.IPrivacyListListener;
import com.beem.project.beem.service.aidl.IPrivacyListManager;
+// TODO: Auto-generated Javadoc
/**
* An adapter for the Smack's PrivacyListManager.
* @author Jean-Manuel Da Silva <dasilvj at beem-project dot com>
*/
public class PrivacyListManagerAdapter extends IPrivacyListManager.Stub {
- /**
- * Class's Tag.
- */
+ /** Class's Tag. */
public static final String TAG = "PrivacyListManagerAdapter";
private final PrivacyListManager mPrivacyListManager;
@@ -35,17 +77,23 @@
/**
* Constructor.
- * @param connection The XMPP connection that will be used by the PrivacyListManagerAdapter.
+ * @param privacyListManager the privacy list manager
*/
public PrivacyListManagerAdapter(final PrivacyListManager privacyListManager) {
mPrivacyListManager = privacyListManager;
mPrivacyListManager.addListener(mPrivacyListListener);
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#blockUser(java.lang.String, java.lang.String)
+ */
@Override
public void blockUser(String listName, String jid) throws RemoteException {
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#createPrivacyList(java.lang.String, java.util.List)
+ */
@Override
public void createPrivacyList(String listName, List<PrivacyListItem> items) throws RemoteException {
Log.d(TAG, "BEGIN createPrivacyList.");
@@ -63,6 +111,9 @@
Log.d(TAG, "END createPrivacyList.");
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#declineActivePrivacyList()
+ */
@Override
public void declineActivePrivacyList() throws RemoteException {
try {
@@ -72,6 +123,9 @@
}
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#declineDefaultPrivacyList()
+ */
@Override
public void declineDefaultPrivacyList() throws RemoteException {
try {
@@ -81,6 +135,9 @@
}
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#editPrivacyList(java.lang.String, java.util.List)
+ */
@Override
public void editPrivacyList(String listName, List<PrivacyListItem> items) throws RemoteException {
Log.d(TAG, "BEGIN editPrivacyList.");
@@ -92,6 +149,9 @@
Log.d(TAG, "END editPrivacyList.");
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#getActivePrivacyList()
+ */
@Override
public String getActivePrivacyList() throws RemoteException {
try {
@@ -103,6 +163,9 @@
return null;
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#getBlockedGroupsByList(java.lang.String)
+ */
@Override
public List<String> getBlockedGroupsByList(String listName) throws RemoteException {
List<String> blockedGroups = new ArrayList<String>();
@@ -118,6 +181,9 @@
return blockedGroups;
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#getBlockedUsersByList(java.lang.String)
+ */
@Override
public List<String> getBlockedUsersByList(String listName) throws RemoteException {
List<String> blockedUsers = new ArrayList<String>();
@@ -133,6 +199,9 @@
return blockedUsers;
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#getDefaultPrivacyList()
+ */
@Override
public String getDefaultPrivacyList() throws RemoteException {
try {
@@ -144,6 +213,9 @@
return null;
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#removePrivacyList(java.lang.String)
+ */
@Override
public void removePrivacyList(String listName) throws RemoteException {
try {
@@ -153,6 +225,9 @@
}
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#setActivePrivacyList(java.lang.String)
+ */
@Override
public void setActivePrivacyList(String listName) throws RemoteException {
try {
@@ -162,6 +237,9 @@
}
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#setDefaultPrivacyList(java.lang.String)
+ */
@Override
public void setDefaultPrivacyList(String listName) throws RemoteException {
try {
@@ -239,18 +317,27 @@
}
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#addPrivacyListListener(com.beem.project.beem.service.aidl.IPrivacyListListener)
+ */
@Override
public void addPrivacyListListener(IPrivacyListListener listener) throws RemoteException {
if (listener != null)
mPrivacyListListeners.register(listener);
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#removePrivacyListListener(com.beem.project.beem.service.aidl.IPrivacyListListener)
+ */
@Override
public void removePrivacyListListener(IPrivacyListListener listener) throws RemoteException {
if (listener != null)
mPrivacyListListeners.unregister(listener);
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IPrivacyListManager#getPrivacyLists()
+ */
@Override
public List<String> getPrivacyLists() throws RemoteException {
Log.d(TAG, "BEGIN getPrivacyLists.");
--- a/src/com/beem/project/beem/service/RosterAdapter.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/RosterAdapter.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.service;
import java.util.ArrayList;
@@ -22,6 +65,7 @@
import com.beem.project.beem.service.aidl.IBeemRosterListener;
import com.beem.project.beem.utils.Status;
+// TODO: Auto-generated Javadoc
/**
* This class implement a Roster adapter for BEEM.
*/
@@ -169,11 +213,17 @@
mAdaptee.getEntry(jid).setName(name);
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IRoster#getPresence(java.lang.String)
+ */
@Override
public PresenceAdapter getPresence(String jid) throws RemoteException {
return new PresenceAdapter(mAdaptee.getPresence(jid));
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IRoster#addContactToGroup(java.lang.String, java.lang.String)
+ */
@Override
public void addContactToGroup(String groupName, String jid) throws RemoteException {
createGroup(groupName);
@@ -185,6 +235,9 @@
}
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IRoster#removeContactFromGroup(java.lang.String, java.lang.String)
+ */
@Override
public void removeContactFromGroup(String groupName, String jid) throws RemoteException {
RosterGroup group = mAdaptee.getGroup(groupName);
@@ -254,7 +307,6 @@
* @param group the group the entry was.
* @param jid the jid of the entry which is deleted.
*/
- @SuppressWarnings("unused")
public void onEntryDeleteFromGroup(final String group, final String jid) {
// Log.i(TAG, "entry delete listener");
final int n = mRemoteRosListeners.beginBroadcast();
--- a/src/com/beem/project/beem/service/XmppConnectionAdapter.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/XmppConnectionAdapter.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.service;
import org.jivesoftware.smack.ConnectionConfiguration;
@@ -28,11 +71,12 @@
import com.beem.project.beem.service.aidl.IChatManager;
import com.beem.project.beem.service.aidl.IRoster;
import com.beem.project.beem.service.aidl.IXmppConnection;
+import com.beem.project.beem.ui.ChangeStatus;
import com.beem.project.beem.ui.Subscription;
import com.beem.project.beem.utils.BeemBroadcastReceiver;
-import com.beem.project.beem.ui.ChangeStatus;
import com.beem.project.beem.utils.Status;
+// TODO: Auto-generated Javadoc
/**
* This class implements an adapter for XMPPConnection.
* @author darisk
@@ -44,13 +88,12 @@
*/
private static final String TAG = "XMPPConnectionAdapter";
- private static final int PRESENCE_PRIORITY = 128;
-
private final XMPPConnection mAdaptee;
private IChatManager mChatManager;
private final String mLogin;
private final String mPassword;
private String mResource;
+ private String mErrorMsg;
private RosterAdapter mRoster;
private int mPreviousPriority;
private PrivacyListManagerAdapter mPrivacyListManager;
@@ -120,6 +163,8 @@
*/
@Override
public final void connectAsync() throws RemoteException {
+ if (mAdaptee.isConnected() || mAdaptee.isAuthenticated())
+ return;
Thread t = new Thread(new Runnable() {
@Override
@@ -156,12 +201,19 @@
return true;
} catch (XMPPException e) {
Log.d(TAG, "Error while connecting", e);
- if (e.getXMPPError() != null && e.getXMPPError().getMessage() != null)
- mConListener.connectionFailed(e.getXMPPError().getMessage());
- else if (e.getMessage() != null)
- mConListener.connectionFailed(e.getMessage());
- else
- mConListener.connectionFailed("Error On Connection");
+ if (e.getXMPPError() != null && e.getXMPPError().getMessage() != null) {
+ mErrorMsg = e.getXMPPError().getMessage();
+ Log.d(TAG, "XMPP Error " + e.getXMPPError().getCode() + "message :" + e.getXMPPError().getMessage());
+ } else if (e.getStreamError() != null) {
+ mErrorMsg = e.getStreamError().toString();
+ Log.d(TAG, "Stream Error " + e.getStreamError().getCode() + "message :" + e.getStreamError());
+ } else if (e.getMessage() != null) {
+ // SASL !!
+ mErrorMsg = e.getMessage();
+ Log.d(TAG, "Error " + e.getMessage());
+ } else
+ mErrorMsg = "Error On Connection";
+ mConListener.connectionFailed(mErrorMsg);
} catch (IllegalStateException e) {
mConListener.connectionFailed(e.getMessage());
}
@@ -185,8 +237,10 @@
pres.setMode(mode);
// Smack limit : Priority between -128 and 128
int p = priority;
- if (priority < -128) p = -128;
- if (priority > 128) p = 128;
+ if (priority < -128)
+ p = -128;
+ if (priority > 128)
+ p = 128;
mPreviousPriority = p;
pres.setPriority(p);
mAdaptee.sendPacket(pres);
@@ -224,8 +278,8 @@
mStatusNotification.defaults = Notification.DEFAULT_LIGHTS;
mStatusNotification.flags = Notification.FLAG_NO_CLEAR | Notification.FLAG_ONGOING_EVENT;
- mStatusNotification.setLatestEventInfo(mService, "Beem Status", text, PendingIntent.getActivity(
- mService, 0, new Intent(mService, ChangeStatus.class), 0));
+ mStatusNotification.setLatestEventInfo(mService, "Beem Status", text, PendingIntent.getActivity(mService, 0,
+ new Intent(mService, ChangeStatus.class), 0));
mService.sendNotification(BeemService.NOTIFICATION_STATUS_ID, mStatusNotification);
}
@@ -316,7 +370,7 @@
/**
* PrivacyListManagerAdapter mutator.
- * @param privacyList the PrivacyListManager to set
+ * @param privacyListManager the privacy list manager
*/
public void setPrivacyListManager(PrivacyListManagerAdapter privacyListManager) {
this.mPrivacyListManager = privacyListManager;
@@ -331,6 +385,14 @@
}
/**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getErrorMessage() {
+ return mErrorMsg;
+ }
+
+ /**
* Listener for XMPP connection events. It will calls the remote listeners for connection events.
* @author darisk
*/
@@ -414,14 +476,15 @@
@Override
public void processPacket(Packet packet) {
String from = packet.getFrom();
- Notification notif = new Notification(android.R.drawable.stat_notify_more, mService
- .getString(R.string.AcceptContactRequest, from), System.currentTimeMillis());
+ Notification notif = new Notification(android.R.drawable.stat_notify_more, mService.getString(
+ R.string.AcceptContactRequest, from), System.currentTimeMillis());
notif.defaults = Notification.DEFAULT_ALL;
notif.flags = Notification.FLAG_AUTO_CANCEL;
Intent intent = new Intent(mService, Subscription.class);
intent.putExtra("from", from);
- notif.setLatestEventInfo(mService, from, mService.getString(R.string.AcceptContactRequestFrom,
- from), PendingIntent.getActivity(mService, 0, intent, PendingIntent.FLAG_ONE_SHOT));
+ notif.setLatestEventInfo(mService, from, mService
+ .getString(R.string.AcceptContactRequestFrom, from), PendingIntent.getActivity(mService, 0,
+ intent, PendingIntent.FLAG_ONE_SHOT));
int id = packet.hashCode();
mService.sendNotification(id, notif);
}
@@ -514,14 +577,15 @@
@Override
public void processPacket(Packet packet) {
String from = packet.getFrom();
- Notification notif = new Notification(android.R.drawable.stat_notify_more, mService
- .getString(R.string.AcceptContactRequest, from), System.currentTimeMillis());
+ Notification notif = new Notification(android.R.drawable.stat_notify_more, mService.getString(
+ R.string.AcceptContactRequest, from), System.currentTimeMillis());
notif.defaults = Notification.DEFAULT_ALL;
notif.flags = Notification.FLAG_AUTO_CANCEL;
Intent intent = new Intent(mService, Subscription.class);
intent.putExtra("from", from);
- notif.setLatestEventInfo(mService, from, mService.getString(R.string.AcceptContactRequestFrom,
- from), PendingIntent.getActivity(mService, 0, intent, PendingIntent.FLAG_ONE_SHOT));
+ notif.setLatestEventInfo(mService, from, mService
+ .getString(R.string.AcceptContactRequestFrom, from), PendingIntent.getActivity(mService, 0,
+ intent, PendingIntent.FLAG_ONE_SHOT));
int id = packet.hashCode();
mService.sendNotification(id, notif);
}
--- a/src/com/beem/project/beem/service/XmppFacade.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/XmppFacade.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.service;
import org.jivesoftware.smack.XMPPException;
@@ -15,6 +58,7 @@
import com.beem.project.beem.service.aidl.IXmppFacade;
import com.beem.project.beem.utils.PresenceType;
+// TODO: Auto-generated Javadoc
/**
* This class is a facade for the Beem Service.
* @author darisk
@@ -101,6 +145,9 @@
return mConnexion.getPrivacyListManager();
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IXmppFacade#sendPresencePacket(com.beem.project.beem.service.PresenceAdapter)
+ */
@Override
public void sendPresencePacket(PresenceAdapter presence) throws RemoteException {
Presence presence2 = new Presence(PresenceType.getPresenceTypeFrom(presence.getType()));
@@ -108,11 +155,17 @@
mConnexion.getAdaptee().sendPacket(presence2);
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IXmppFacade#call(java.lang.String)
+ */
@Override
public void call(String jid) throws RemoteException {
mJingle.call(jid);
}
+ /* (non-Javadoc)
+ * @see com.beem.project.beem.service.aidl.IXmppFacade#getVcardAvatar(java.lang.String)
+ */
@Override
public byte[] getVcardAvatar(String jid) throws RemoteException {
VCard vcard = new VCard();
--- a/src/com/beem/project/beem/service/aidl/IBeemConnectionListener.aidl Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/aidl/IBeemConnectionListener.aidl Tue Dec 15 10:29:46 2009 +0100
@@ -10,35 +10,35 @@
* Callback to call when the connection is closed
*/
void connectionClosed();
-
+
/**
* Callback to call when the connection occurs
*/
void onConnect();
-
+
//void connectionClosedOnError(in Exception e);
/**
* Callback to call when the connection is closed on error
*/
void connectionClosedOnError();
-
+
/**
* Callback to call when trying to reconnecting
*/
void reconnectingIn(in int seconds);
-
+
/**
* Callback to call when the reconnection has failed
*/
void reconnectionFailed();
-
+
/**
* Callback to call when the reconnection is successfull
- */
+ */
void reconnectionSuccessful();
-
+
/**
* Callback to call when the connection Failed
- */
+ */
void connectionFailed(in String errorMsg);
}
--- a/src/com/beem/project/beem/service/aidl/IXmppConnection.aidl Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/aidl/IXmppConnection.aidl Tue Dec 15 10:29:46 2009 +0100
@@ -27,4 +27,6 @@
void changeStatus(in int status, in String msg);
IPrivacyListManager getPrivacyListManager();
+
+ String getErrorMessage();
}
--- a/src/com/beem/project/beem/service/package-info.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/service/package-info.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,5 +1,45 @@
/**
- * This package contains the class used by the Beem service process.
- */
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.service;
--- a/src/com/beem/project/beem/ui/AddContact.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/ui/AddContact.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.ui;
import java.util.ArrayList;
@@ -24,6 +67,7 @@
import com.beem.project.beem.service.aidl.IXmppFacade;
import com.beem.project.beem.utils.BeemBroadcastReceiver;
+// TODO: Auto-generated Javadoc
/**
* This activity is used to add a contact.
* @author nikita
@@ -59,6 +103,9 @@
mReceiver = new BeemBroadcastReceiver(mServConn);
}
+ /* (non-Javadoc)
+ * @see android.app.Activity#onStart()
+ */
@Override
protected void onStart() {
super.onStart();
@@ -88,6 +135,9 @@
}
}
+ /* (non-Javadoc)
+ * @see android.app.Activity#onDestroy()
+ */
@Override
protected void onDestroy() {
super.onDestroy();
@@ -129,6 +179,7 @@
private final OnClickListener mOkListener = new OnClickListener() {
+ @Override
public void onClick(View v) {
String login;
login = getWidgetText(R.id.addc_login);
--- a/src/com/beem/project/beem/ui/ChangeStatus.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/ui/ChangeStatus.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,47 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
+
package com.beem.project.beem.ui;
import android.app.Activity;
@@ -26,10 +70,15 @@
import com.beem.project.beem.utils.BeemBroadcastReceiver;
import com.beem.project.beem.utils.Status;
+// TODO: Auto-generated Javadoc
/**
* This Activity is used to change the status.
* @author nikita
*/
+/**
+ * @author nikita
+ *
+ */
public class ChangeStatus extends Activity {
private static final Intent SERVICE_INTENT = new Intent();
@@ -117,6 +166,9 @@
}
}
+ /* (non-Javadoc)
+ * @see android.app.Activity#onDestroy()
+ */
@Override
protected void onDestroy() {
super.onDestroy();
@@ -128,7 +180,7 @@
* @return the status index from status the settings.
*/
private int getPreferenceStatusIndex() {
- return mSettings.getInt(getString(R.string.PreferenceStatus), 0);
+ return mSettings.getInt("PreferenceStatus", 0);
}
/**
--- a/src/com/beem/project/beem/ui/Chat.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/ui/Chat.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.ui;
import java.util.ArrayList;
@@ -56,6 +99,7 @@
import com.beem.project.beem.utils.BeemBroadcastReceiver;
import com.beem.project.beem.utils.Status;
+// TODO: Auto-generated Javadoc
/**
* This class represents an activity which allows the user to chat with his/her contacts.
* @author Jean-Manuel Da Silva <dasilvj at beem-project dot com>
@@ -111,13 +155,16 @@
mHandler = new Handler();
+ // SVC Bind
+ bindService(SERVICE_INTENT, mConn, BIND_AUTO_CREATE);
+
// Listeners
mMessageListener = new OnMessageListener();
mChatManagerListener = new OnChatManagerListener();
mBroadcastReceiver = new BeemBroadcastReceiver(mConn);
this.registerReceiver(mBroadcastReceiver, new IntentFilter(BeemBroadcastReceiver.BEEM_CONNECTION_CLOSED));
-
+
// UI
mContactNameTextView = (TextView) findViewById(R.id.chat_contact_name);
mContactStatusMsgTextView = (TextView) findViewById(R.id.chat_contact_status_msg);
@@ -147,7 +194,7 @@
super.onDestroy();
Log.v(TAG, "BEGIN onDestroy.");
- this.unregisterReceiver(mBroadcastReceiver);
+
if (mChatManager != null) {
try {
mChatManager.removeChatCreationListener(mChatManagerListener);
@@ -155,6 +202,10 @@
Log.e(TAG, e.getMessage());
}
}
+
+ this.unregisterReceiver(mBroadcastReceiver);
+ unbindService(mConn);
+
Log.v(TAG, "END onDestroy.");
}
@@ -166,7 +217,6 @@
super.onStart();
Log.v(TAG, "BEGIN onStart.");
- bindService(new Intent(this, BeemService.class), mConn, BIND_AUTO_CREATE);
Log.v(TAG, "END onStart.");
}
@@ -185,9 +235,6 @@
Log.e(TAG, e.getMessage());
}
}
- if (mBroadcastReceiver.isBinded()) {
- unbindService(mConn);
- }
Log.v(TAG, "END onStop.");
}
@@ -783,11 +830,11 @@
mName = new TextView(context);
mName.setText(name);
- addView(mName, new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
+ addView(mName, new LinearLayout.LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT, android.view.ViewGroup.LayoutParams.WRAP_CONTENT));
mMessage = new TextView(context);
mMessage.setText(message);
- addView(mMessage, new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
+ addView(mMessage, new LinearLayout.LayoutParams(android.view.ViewGroup.LayoutParams.FILL_PARENT, android.view.ViewGroup.LayoutParams.WRAP_CONTENT));
}
/**
--- a/src/com/beem/project/beem/ui/ContactDialog.java Thu Nov 26 15:21:46 2009 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-package com.beem.project.beem.ui;
-
-import android.app.Activity;
-import android.app.Dialog;
-import android.app.Service;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.util.Log;
-import android.view.View;
-import android.widget.Button;
-
-import com.beem.project.beem.R;
-import com.beem.project.beem.service.Contact;
-import com.beem.project.beem.service.aidl.IXmppFacade;
-
-/**
- * This activity class provides the view to show dialog when long click on contact list.
- * @author marseille
- */
-public class ContactDialog extends Dialog {
-
- private static final Intent SERVICE_INTENT = new Intent();
- private final Contact mContact;
- private final Context mContext;
- private IXmppFacade mXmppFacade;
- private final ServiceConnection mServConn = new BeemServiceConnection();
-
- static {
- SERVICE_INTENT.setComponent(new ComponentName("com.beem.project.beem", "com.beem.project.beem.BeemService"));
- }
-
- /**
- * Constructor.
- * @param context context where is call the dialog.
- * @param curContact current contact.
- */
- public ContactDialog(final Context context, final Contact curContact) {
- super(context);
- mContext = context;
-
- setContentView(R.layout.contactdialog);
- mContact = curContact;
- setTitle(curContact.getJID());
-
- Button button = (Button) findViewById(R.id.CDChat);
- button.setOnClickListener(new ChatListener());
- button = (Button) findViewById(R.id.CDInfos);
- button.setOnClickListener(new InfosListener());
- button = (Button) findViewById(R.id.CDCall);
- button.setOnClickListener(new CallListener());
- mContext.bindService(SERVICE_INTENT, mServConn, Service.BIND_AUTO_CREATE);
- }
-
- @Override
- protected void onStop() {
- // TODO Auto-generated method stub
- super.onStop();
- mContext.unbindService(mServConn);
- }
-
- @Override
- public void dismiss() {
- super.dismiss();
-
- }
-
- /**
- * Event simple click on call button.
- */
- class CallListener implements View.OnClickListener {
-
- /**
- * Constructor.
- */
- public CallListener() {
- }
-
- @Override
- public void onClick(View v) {
- try {
- // TODO permettre a l'user de choisir a quel ressource il veut
- // faire le call.
- mXmppFacade.call(mContact.getJID() + "/psi");
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * Event simple click on chat button.
- */
- class ChatListener implements View.OnClickListener {
-
- /**
- * Constructor.
- */
- public ChatListener() {
- }
-
- @Override
- public void onClick(View v) {
- Activity a = ContactDialog.this.getOwnerActivity();
- Intent i = new Intent(mContext, Chat.class);
- i.setData(mContact.toUri());
- a.startActivity(i);
- dismiss();
- }
-
- }
-
- /**
- * Event simple click on info button.
- */
- class InfosListener implements View.OnClickListener {
-
- /**
- * Constructor.
- */
- public InfosListener() {
- }
-
- @Override
- public void onClick(View v) {
- Activity a = ContactDialog.this.getOwnerActivity();
- Intent i = new Intent(mContext, UserInfo.class);
- Log.i("OOO", mContact.getJID());
- i.putExtra("contact_contactdialog", mContact.getJID());
- a.startActivity(i);
- dismiss();
- }
-
- }
-
- /**
- * The service connection used to connect to the Beem service.
- */
- private class BeemServiceConnection implements ServiceConnection {
-
- /**
- * Constructor.
- */
- public BeemServiceConnection() {
- }
-
- @Override
- public void onServiceConnected(ComponentName name, IBinder service) {
- mXmppFacade = IXmppFacade.Stub.asInterface(service);
- }
-
- @Override
- public void onServiceDisconnected(ComponentName name) {
- mXmppFacade = null;
- }
- }
-
-}
--- a/src/com/beem/project/beem/ui/ContactList.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/ui/ContactList.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,17 @@
+/**
+ * BEEM is a videoconference application on the Android Platform. Copyright (C) 2009 by Frederic-Charles Barthelery,
+ * Jean-Manuel Da Silva, Nikita Kozlov, Philippe Lago, Jean Baptiste Vergely, Vincent Véronis. This file is part of
+ * BEEM. BEEM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
+ * version. BEEM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License along with BEEM. If not, see
+ * <http://www.gnu.org/licenses/>. Please send bug reports with examples or suggestions to contact@beem-project.com or
+ * http://dev.beem-project.com/ Epitech, hereby disclaims all copyright interest in the program “Beem” written by
+ * Frederic-Charles Barthelery, Jean-Manuel Da Silva, Nikita Kozlov, Philippe Lago, Jean Baptiste Vergely, Vincent
+ * Veronis. Nicolas Sadirac, November 26, 2009 President of Epitech. Flavien Astraud, November 26, 2009 Head of the EIP
+ * Laboratory.
+ */
package com.beem.project.beem.ui;
import java.util.ArrayList;
@@ -10,6 +24,7 @@
import org.jivesoftware.smack.util.StringUtils;
import android.app.Activity;
+import android.app.Dialog;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -23,6 +38,7 @@
import android.os.IBinder;
import android.os.RemoteException;
import android.preference.PreferenceManager;
+import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@@ -35,8 +51,8 @@
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
+import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.AdapterView.OnItemClickListener;
-import android.widget.AdapterView.OnItemLongClickListener;
import com.beem.project.beem.R;
import com.beem.project.beem.service.Contact;
@@ -44,16 +60,23 @@
import com.beem.project.beem.service.aidl.IBeemRosterListener;
import com.beem.project.beem.service.aidl.IRoster;
import com.beem.project.beem.service.aidl.IXmppFacade;
+import com.beem.project.beem.ui.dialogs.builders.Alias;
+import com.beem.project.beem.ui.dialogs.builders.DeleteContact;
+import com.beem.project.beem.ui.dialogs.builders.ResendSubscription;
import com.beem.project.beem.utils.BeemBroadcastReceiver;
import com.beem.project.beem.utils.Status;
/**
- * The contact list activity displays the roster of the user.
+ * The contact list activity displays the roster of the user. TODO: Dismiss dialogs on destroy to avoid window leak
*/
public class ContactList extends Activity {
// private static final String TAG = "CONTACTLIST_ACT";
private static final Intent SERVICE_INTENT = new Intent();
+ static {
+ SERVICE_INTENT.setComponent(new ComponentName("com.beem.project.beem", "com.beem.project.beem.BeemService"));
+ }
+
private static final int REQUEST_CODE = 1;
private BeemContactList mAdapterContactList;
private BeemBanner mAdapterBanner;
@@ -62,6 +85,7 @@
private final List<String> mListGroup = new ArrayList<String>();
private final Map<String, List<Contact>> mContactOnGroup = new HashMap<String, List<Contact>>();
private String mCurGroup;
+ private Contact mContact;
private Handler mHandler;
private IXmppFacade mXmppFacade;
private SharedPreferences mSettings;
@@ -69,11 +93,6 @@
private BeemBroadcastReceiver mReceiver;
private final Map<Integer, Bitmap> mIconsMap = new HashMap<Integer, Bitmap>();
private LayoutInflater mInflater;
- private ContactDialog mContactDialog;
-
- static {
- SERVICE_INTENT.setComponent(new ComponentName("com.beem.project.beem", "com.beem.project.beem.BeemService"));
- }
/**
* Constructor.
@@ -93,8 +112,11 @@
mAdapterContactList = new BeemContactList(this);
mAdapterBanner = new BeemBanner(this);
mHandler = new Handler();
+
+ bindService(SERVICE_INTENT, mServConn, BIND_AUTO_CREATE);
mReceiver = new BeemBroadcastReceiver(mServConn);
this.registerReceiver(mReceiver, new IntentFilter(BeemBroadcastReceiver.BEEM_CONNECTION_CLOSED));
+
mInflater = LayoutInflater.from(this);
prepareIconsStatus();
}
@@ -131,6 +153,78 @@
}
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
+ super.onCreateContextMenu(menu, v, menuInfo);
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.contactlist_context, menu);
+ AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
+ Contact c = mListContact.get(info.position);
+ try {
+ mContact = mRoster.getContact(c.getJID());
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ menu.setHeaderTitle(mContact.getJID());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean onContextItemSelected(MenuItem item) {
+ Intent in;
+ if (mContact != null) {
+ switch (item.getItemId()) {
+ case R.id.contact_list_context_menu_chat_item:
+ in = new Intent(this, Chat.class);
+ in.setData(mContact.toUri());
+ startActivity(in);
+ return true;
+ case R.id.contact_list_context_menu_call_item:
+ try {
+ mXmppFacade.call(mContact.getJID() + "/psi");
+ return true;
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ return true;
+ case R.id.contact_list_context_menu_user_info:
+ item.getSubMenu().setHeaderTitle(mContact.getJID());
+ return true;
+ case R.id.contact_list_context_menu_userinfo_alias:
+ Dialog alias = new Alias(ContactList.this, mRoster, mContact).create();
+ alias.show();
+ return true;
+ case R.id.contact_list_context_menu_userinfo_group:
+ in = new Intent(this, GroupList.class);
+ in.putExtra("contact", mContact);
+ startActivity(in);
+ return true;
+ case R.id.contact_list_context_menu_userinfo_subscription:
+ Dialog subscription = new ResendSubscription(ContactList.this, mXmppFacade, mContact).create();
+ subscription.show();
+ return true;
+ case R.id.contact_list_context_menu_userinfo_block:
+ return true;
+ case R.id.contact_list_context_menu_userinfo_delete:
+ Dialog delete = new DeleteContact(ContactList.this, mRoster, mContact).create();
+ delete.show();
+ return true;
+ default:
+ return super.onContextItemSelected(item);
+ }
+ }
+ return super.onContextItemSelected(item);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see android.app.Activity#onActivityResult(int, int, android.content.Intent)
+ */
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
@@ -139,7 +233,6 @@
mListContact.clear();
stopService(SERVICE_INTENT);
finish();
- startActivity(new Intent(this, Login.class));
}
}
}
@@ -150,7 +243,6 @@
@Override
protected void onStart() {
super.onStart();
- bindService(SERVICE_INTENT, mServConn, BIND_AUTO_CREATE);
}
/**
@@ -159,22 +251,27 @@
@Override
protected void onStop() {
super.onStop();
- if (mContactDialog != null)
- mContactDialog.dismiss();
- if (mReceiver.isBinded())
- unbindService(mServConn);
+ if (mReceiver.isBinded()) {
+ mReceiver.setBinded(false);
+ }
}
+ /*
+ * (non-Javadoc)
+ * @see android.app.Activity#onDestroy()
+ */
@Override
protected void onDestroy() {
super.onDestroy();
this.unregisterReceiver(mReceiver);
+ unbindService(mServConn);
}
/**
* Comparator Contact by Name.
*/
- class ComparatorContactListByName<T> implements Comparator<T> {
+ @SuppressWarnings("unused")
+ private class ComparatorContactListByName<T> implements Comparator<T> {
/**
* Constructor.
*/
@@ -194,7 +291,7 @@
/**
* Comparator Contact by status and name.
*/
- class ComparatorContactListByStatusAndName<T> implements Comparator<T> {
+ private class ComparatorContactListByStatusAndName<T> implements Comparator<T> {
/**
* Constructor.
*/
@@ -226,7 +323,7 @@
sortBeemContactList();
ListView listView = (ListView) findViewById(R.id.contactlist);
listView.setOnItemClickListener(new BeemContactListOnClick());
- listView.setOnItemLongClickListener(new BeemContactListOnLongClick());
+ registerForContextMenu(listView);
listView.setAdapter(mAdapterContactList);
}
@@ -242,7 +339,7 @@
/**
* Event simple click on item of the contact list.
*/
- public class BeemContactListOnClick implements OnItemClickListener {
+ private class BeemContactListOnClick implements OnItemClickListener {
/**
* Constructor.
*/
@@ -263,30 +360,6 @@
}
/**
- * Event long click on item of the contact list.
- */
- public class BeemContactListOnLongClick implements OnItemLongClickListener {
- /**
- * Constructor.
- */
- public BeemContactListOnLongClick() {
-
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean onItemLongClick(AdapterView<?> arg0, View v, int pos, long lpos) {
- Contact c = mListContact.get(pos);
- mContactDialog = new ContactDialog(ContactList.this, c);
- mContactDialog.setOwnerActivity(ContactList.this);
- mContactDialog.show();
- return true;
- }
- }
-
- /**
* Event simple click on middle groupe name.
*/
private class OnItemClickGroupName implements OnItemClickListener {
@@ -312,8 +385,7 @@
R.drawable.status_available));
mIconsMap.put(Status.CONTACT_STATUS_AVAILABLE_FOR_CHAT, BitmapFactory.decodeResource(getResources(),
R.drawable.status_available));
- mIconsMap
- .put(Status.CONTACT_STATUS_AWAY, BitmapFactory.decodeResource(getResources(), R.drawable.status_away));
+ mIconsMap.put(Status.CONTACT_STATUS_AWAY, BitmapFactory.decodeResource(getResources(), R.drawable.status_away));
mIconsMap.put(Status.CONTACT_STATUS_BUSY, BitmapFactory.decodeResource(getResources(), R.drawable.status_dnd));
mIconsMap.put(Status.CONTACT_STATUS_DISCONNECT, BitmapFactory.decodeResource(getResources(),
R.drawable.status_offline));
@@ -512,7 +584,20 @@
*/
@Override
public Object getItem(int position) {
- return position;
+ Contact c = null;
+ if (mSettings.getBoolean("settings_key_hidden_contact", false)) {
+ int res = 0;
+ for (Contact cur : mListContact) {
+ if (res == position) {
+ c = cur;
+ break;
+ }
+ if (Status.statusOnline(cur.getStatus()))
+ res++;
+ }
+ } else
+ c = mListContact.get(position);
+ return c;
}
/**
@@ -581,7 +666,7 @@
/**
* Adapter banner list.
*/
- public class BeemBanner extends BaseAdapter {
+ private class BeemBanner extends BaseAdapter {
/**
* Constructor.
* @param c context activity.
@@ -629,6 +714,10 @@
}
/**
+ * Create dialog resend subscription.
+ */
+
+ /**
* The service connection used to connect to the Beem service.
*/
private class BeemServiceConnection implements ServiceConnection {
@@ -681,7 +770,6 @@
} catch (RemoteException e) {
e.printStackTrace();
}
-
}
@Override
--- a/src/com/beem/project/beem/ui/CreateAccount.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/ui/CreateAccount.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.ui;
import java.util.regex.Pattern;
@@ -15,7 +58,6 @@
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
-import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
@@ -66,12 +108,11 @@
private boolean createAccount(String username, String password) {
XMPPConnection xmppConnection = null;
ConnectionConfiguration connectionConfiguration = null;
-
- if (getRegisteredProxy() != null) {
- connectionConfiguration = new ConnectionConfiguration(getXMPPServer(), DEFAULT_XMPP_PORT,
- getRegisteredProxy());
+ ProxyInfo pi = null;
+ if ((pi = getRegisteredProxy()) != null) {
+ connectionConfiguration = new ConnectionConfiguration(getXMPPServer(), getXMPPPort(), pi);
} else {
- connectionConfiguration = new ConnectionConfiguration(getXMPPServer(), DEFAULT_XMPP_PORT);
+ connectionConfiguration = new ConnectionConfiguration(getXMPPServer(), getXMPPPort());
}
if (getRegisteredXMPPTLSUse())
connectionConfiguration.setSecurityMode(ConnectionConfiguration.SecurityMode.required);
@@ -81,11 +122,10 @@
xmppConnection.connect();
AccountManager accountManager = new AccountManager(xmppConnection);
accountManager.createAccount(username, password);
- Toast toast = Toast.makeText(getApplicationContext(), "Account " + username + " "
- + getString(R.string.create_account_successfull_after), NOTIFICATION_DURATION);
+ Toast toast = Toast.makeText(getApplicationContext(), String.format(
+ getString(R.string.create_account_successfull_after), username), NOTIFICATION_DURATION);
toast.show();
} catch (XMPPException e) {
- Log.e(getString(R.string.create_account_tag), e.getMessage());
createErrorDialog(e.getMessage());
return false;
}
@@ -98,7 +138,6 @@
* @param errMsg the error message
*/
private void createErrorDialog(String errMsg) {
- Log.v(getString(R.string.create_account_tag), errMsg);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.create_account_err_dialog_title).setMessage(errMsg).setCancelable(false);
builder.setNeutralButton(R.string.create_account_close_dialog_button, new DialogInterface.OnClickListener() {
@@ -130,7 +169,7 @@
* @return Registered proxy password
*/
private String getRegisteredProxyPassword() {
- return mSettings.getString(getString(R.string.settings_key_proxy_password), DEFAULT_STRING_VALUE);
+ return mSettings.getString("settings_key_proxy_password", DEFAULT_STRING_VALUE);
}
/**
@@ -138,8 +177,7 @@
* @return Registered proxy port
*/
private int getRegisteredProxyPort() {
- return Integer
- .parseInt(mSettings.getString(getString(R.string.settings_key_proxy_port), DEFAULT_STRING_VALUE));
+ return Integer.parseInt(mSettings.getString("settings_key_proxy_port", DEFAULT_STRING_VALUE));
}
/**
@@ -147,7 +185,7 @@
* @return Registered proxy server
*/
private String getRegisteredProxyServer() {
- return mSettings.getString(getString(R.string.settings_key_proxy_server), DEFAULT_STRING_VALUE);
+ return mSettings.getString("settings_key_proxy_server", DEFAULT_STRING_VALUE);
}
/**
@@ -156,7 +194,7 @@
*/
private ProxyInfo.ProxyType getRegisteredProxyType() {
ProxyInfo.ProxyType result;
- switch (mSettings.getInt(getString(R.string.settings_key_proxy_type), DEFAULT_INT_VALUE)) {
+ switch (mSettings.getInt("settings_key_proxy_type", DEFAULT_INT_VALUE)) {
case 0:
result = ProxyInfo.ProxyType.HTTP;
break;
@@ -164,7 +202,6 @@
result = ProxyInfo.ProxyType.SOCKS4;
break;
case 2:
- Log.i(getString(R.string.create_account_tag), "SOCKS5 PROXY");
result = ProxyInfo.ProxyType.SOCKS5;
break;
default:
@@ -179,7 +216,7 @@
* @return Registered proxy use
*/
private boolean getRegisteredProxyUse() {
- return mSettings.getBoolean(getString(R.string.settings_key_proxy_use), DEFAULT_BOOLEAN_VALUE);
+ return mSettings.getBoolean("settings_key_proxy_use", DEFAULT_BOOLEAN_VALUE);
}
/**
@@ -187,7 +224,18 @@
* @return Registered proxy username
*/
private String getRegisteredProxyUsername() {
- return mSettings.getString(getString(R.string.settings_key_proxy_username), DEFAULT_STRING_VALUE);
+ return mSettings.getString("settings_key_proxy_username", DEFAULT_STRING_VALUE);
+ }
+
+ /**
+ * Retrieve xmpp port from the preferences.
+ * @return Registered xmpp port
+ */
+ private int getXMPPPort() {
+ int port = DEFAULT_XMPP_PORT;
+ if (mSettings.getBoolean("settings_key_specific_server", false))
+ port = Integer.parseInt(mSettings.getString("settings_key_xmpp_port", "5222"));
+ return port;
}
/**
@@ -196,7 +244,11 @@
*/
private String getXMPPServer() {
TextView xmppServerTextView = (TextView) findViewById(R.id.create_account_username);
- String xmppServer = StringUtils.parseServer(xmppServerTextView.getText().toString());
+ String xmppServer = "";
+ if (mSettings.getBoolean("settings_key_specific_server", false))
+ xmppServer = mSettings.getString("settings_key_xmpp_server", "");
+ else
+ xmppServer = StringUtils.parseServer(xmppServerTextView.getText().toString());
return xmppServer;
}
@@ -205,7 +257,7 @@
* @return Registered TLS use
*/
private boolean getRegisteredXMPPTLSUse() {
- return mSettings.getBoolean(getString(R.string.settings_key_xmpp_tls_use), DEFAULT_BOOLEAN_VALUE);
+ return mSettings.getBoolean("settings_key_xmpp_tls_use", DEFAULT_BOOLEAN_VALUE);
}
/**
@@ -217,7 +269,7 @@
final String passwordConfirmFielddValue = ((EditText) findViewById(R.id.create_account_confirm_password))
.getText().toString();
- return passwordFieldValue.equals(passwordConfirmFielddValue);
+ return passwordFieldValue.equals(passwordConfirmFielddValue) && !passwordConfirmFielddValue.equals("");
}
/**
@@ -267,11 +319,10 @@
else {
if (createAccount(username, passwordFieldValue)) {
SharedPreferences.Editor settingsEditor = mSettings.edit();
- settingsEditor
- .putString(getString(R.string.settings_key_account_username), usernameFieldValue);
- settingsEditor
- .putString(getString(R.string.settings_key_account_password), passwordFieldValue);
- settingsEditor.putBoolean(getString(R.string.PreferenceIsConfigured), true);
+ settingsEditor.putString("settings_key_account_username", usernameFieldValue);
+ settingsEditor.putString("settings_key_account_password", passwordFieldValue);
+ settingsEditor.putBoolean("settings_key_gmail", false);
+ settingsEditor.putBoolean("PreferenceIsConfigured", true);
settingsEditor.commit();
finish();
}
--- a/src/com/beem/project/beem/ui/GroupList.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/ui/GroupList.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.ui;
import java.util.ArrayList;
@@ -28,6 +71,7 @@
import com.beem.project.beem.service.aidl.IXmppFacade;
import com.beem.project.beem.utils.BeemBroadcastReceiver;
+// TODO: Auto-generated Javadoc
/**
* That activity permit to manage user groups.
* @author nikita
@@ -56,6 +100,9 @@
public GroupList() {
}
+ /* (non-Javadoc)
+ * @see android.app.Activity#onCreate(android.os.Bundle)
+ */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -96,6 +143,9 @@
}
}
+ /* (non-Javadoc)
+ * @see android.app.Activity#onDestroy()
+ */
@Override
protected void onDestroy() {
super.onDestroy();
--- a/src/com/beem/project/beem/ui/Login.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/ui/Login.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,20 +1,55 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.ui;
import android.app.Activity;
import android.app.AlertDialog;
-import android.app.ProgressDialog;
-import android.content.ComponentName;
import android.content.DialogInterface;
import android.content.Intent;
-import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.os.Bundle;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.os.SystemClock;
import android.preference.PreferenceManager;
-import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
@@ -22,36 +57,18 @@
import android.widget.Toast;
import com.beem.project.beem.R;
-import com.beem.project.beem.service.aidl.IBeemConnectionListener;
-import com.beem.project.beem.service.aidl.IXmppConnection;
-import com.beem.project.beem.service.aidl.IXmppFacade;
-import com.beem.project.beem.utils.Status;
+import com.beem.project.beem.utils.BeemConnectivity;
/**
- * This class represents an activity which allows the user to connect to an XMPP server with his username/password.
- * @author Jean-Manuel Da Silva <dasilvj at beem-project dot com>
+ * This class is the main Activity for the Beem project.
+ * @author Da Risk <darisk972@gmai.com>
*/
public class Login extends Activity {
- private static final String TAG = "Login";
- private static final int REQUEST_CODE = 1;
- private static final Intent SERVICE_INTENT = new Intent();
- static {
- SERVICE_INTENT.setComponent(new ComponentName("com.beem.project.beem", "com.beem.project.beem.BeemService"));
- }
-
- private final Handler mConnectionHandler = new Handler();
- private final ConnectionRunnable mConnectionRunnable = new ConnectionRunnable();
- private ProgressDialog mProgressDialog;
-
- private boolean mIsConnectedService;
- private final ServiceConnection mServConn = new BeemServiceConnection();
- private IXmppFacade mXmppFacade;
-
private SharedPreferences mSettings;
+ private TextView mTextView;
private boolean mIsConfigured;
- private int mRetry;
- private IXmppConnection mXmppConnection;
+ private boolean mIsResult;
/**
* Constructor.
@@ -59,10 +76,100 @@
public Login() {
}
+ /* (non-Javadoc)
+ * @see android.app.Activity#onCreate(android.os.Bundle)
+ */
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.login);
+ mTextView = (TextView) findViewById(R.id.log_as_msg);
+ mSettings = PreferenceManager.getDefaultSharedPreferences(this);
+ }
+
+ /* (non-Javadoc)
+ * @see android.app.Activity#onStart()
+ */
+ @Override
+ protected void onStart() {
+ super.onStart();
+ mIsConfigured = mSettings.getBoolean("PreferenceIsConfigured", false);
+ // TODO utiliser une options des preference plutot.
+ if (mIsConfigured && !mIsResult && BeemConnectivity.isConnected(getApplicationContext())) {
+ mTextView.setText("");
+ Intent i = new Intent(this, LoginAnim.class);
+ startActivityForResult(i, 42);
+ mIsResult = false;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see android.app.Activity#onActivityResult(int, int, android.content.Intent)
+ */
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ if (requestCode == 42) {
+ mIsResult = true;
+ if (resultCode == Activity.RESULT_OK) {
+ startActivity(new Intent(this, ContactList.class));
+ finish();
+ } else if (resultCode == Activity.RESULT_CANCELED) {
+ if (data != null) {
+ String tmp = data.getExtras().getString("message");
+ Toast.makeText(Login.this, tmp, Toast.LENGTH_SHORT).show();
+ mTextView.setText(tmp);
+ }
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see android.app.Activity#onCreateOptionsMenu(android.view.Menu)
+ */
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ super.onCreateOptionsMenu(menu);
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.login, menu);
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem)
+ */
+ @Override
+ public final boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.login_menu_settings:
+ mTextView.setText("");
+ startActivity(new Intent(Login.this, Settings.class));
+ return true;
+ case R.id.login_menu_about:
+ createAboutDialog();
+ return true;
+ case R.id.login_menu_login:
+ if (testConnectivity()) {
+ Intent i = new Intent(this, LoginAnim.class);
+ startActivityForResult(i, 42);
+ }
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ private boolean testConnectivity() {
+ if (!BeemConnectivity.isConnected(getApplicationContext())) {
+ Toast.makeText(Login.this, R.string.login_no_connectivity, Toast.LENGTH_SHORT).show();
+ return false;
+ }
+ return true;
+ }
+
/**
* Create an about "BEEM" dialog.
*/
- public void createAboutDialog() {
+ private void createAboutDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.login_about_title).setMessage(R.string.login_about_msg).setCancelable(false);
builder.setNeutralButton(R.string.login_about_button, new DialogInterface.OnClickListener() {
@@ -74,320 +181,4 @@
AlertDialog aboutDialog = builder.create();
aboutDialog.show();
}
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- Log.d(TAG, "BEGIN onCreate.");
- mSettings = PreferenceManager.getDefaultSharedPreferences(this);
- setContentView(R.layout.login);
- mProgressDialog = new ProgressDialog(this);
- Log.d(TAG, "END onCreate.");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void onStop() {
- super.onStop();
- Log.d(TAG, "BEGIN onStop.");
- if (mIsConfigured && (mIsConnectedService || mXmppFacade != null)) {
- boolean isConnected = false;
- if (mXmppConnection != null) {
- try {
- isConnected = mXmppConnection.isAuthentificated();
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- }
- unbindService(mServConn);
- if (!isConnected) {
- stopService(SERVICE_INTENT);
- }
- mXmppFacade = null;
- }
- Log.d(TAG, "END onStop.");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void onPause() {
- super.onPause();
- Log.d(TAG, "BEGIN onPause.");
- mConnectionHandler.removeCallbacks(mConnectionRunnable);
- mProgressDialog.dismiss();
- Log.d(TAG, "END onPause.");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void onResume() {
- super.onResume();
- Log.d(TAG, "BEGIN onResume.");
- Log.d(TAG, "END onResume.");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void onStart() {
- super.onStart();
- Log.d(TAG, "BEGIN onStart.");
- mIsConfigured = mSettings.getBoolean("PreferenceIsConfigured", false);
- if (mIsConfigured && !mIsConnectedService) {
- try {
- Thread.sleep(1000); // HACK: Pour éviter de rebinder un service
- // pas encore arreter.
- } catch (InterruptedException e) {
- Log.e(TAG, e.getMessage());
- }
- bindService(Login.SERVICE_INTENT, mServConn, BIND_AUTO_CREATE);
- mIsConnectedService = true;
- }
- Log.d(TAG, "END onStart.");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- super.onActivityResult(requestCode, resultCode, data);
- if (requestCode == REQUEST_CODE) {
- if (resultCode == RESULT_OK) {
- stopService(SERVICE_INTENT);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- super.onCreateOptionsMenu(menu);
- MenuInflater inflater = getMenuInflater();
- inflater.inflate(R.menu.login, menu);
- return true;
- }
-
- /**
- * Callback for menu item selected.
- * @param item the item selected
- * @return true on success, false otherwise
- */
- @Override
- public final boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case R.id.login_menu_settings:
- startActivity(new Intent(Login.this, Settings.class));
- return true;
- case R.id.login_menu_about:
- createAboutDialog();
- return true;
- default:
- return false;
- }
- }
-
- /**
- * Connection runnable.
- * @author nikita
- */
- private class ConnectionRunnable implements Runnable {
-
- /**
- * Constructor.
- */
- public ConnectionRunnable() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void run() {
- if (mRetry++ > 3) {
- Toast.makeText(Login.this, R.string.login_max_retry, Toast.LENGTH_LONG).show();
- mConnectionHandler.removeCallbacks(mConnectionRunnable);
- } else {
- mIsConfigured = mSettings.getBoolean("PreferenceIsConfigured", false);
- if (mIsConfigured) {
- bindService(Login.SERVICE_INTENT, mServConn, BIND_AUTO_CREATE);
- }
- }
-
- }
- }
-
- /**
- * Listener use to check the state of the connection with the server.
- */
- private class BeemConnectionListener extends IBeemConnectionListener.Stub {
-
- /**
- * Constructor.
- */
- public BeemConnectionListener() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void connectionClosed() throws RemoteException {
- Log.d(TAG, "BEGIN connectionClosed.");
- if (mXmppFacade != null) {
- launchReconnectionHandler();
- mXmppFacade = null;
- }
- Log.d(TAG, "END connectionClosed.");
- }
-
- @Override
- public void connectionClosedOnError() throws RemoteException {
- Log.d(TAG, "BEGIN connectionClosedOnError.");
- if (mXmppFacade != null) {
- launchReconnectionHandler();
- mXmppFacade = null;
- }
- Log.d(TAG, "END connectionClosedOnError.");
- }
-
- @Override
- public void connectionFailed(String errorMsg) throws RemoteException {
- Log.d(TAG, "BEGIN connectionFailed.");
- if (mXmppFacade != null) {
- Login.this.unbindService(mServConn);
- Login.this.stopService(SERVICE_INTENT);
- mIsConnectedService = false;
- mXmppFacade = null;
- }
- dismissProgressDialog();
- showToast(errorMsg);
- launchReconnectionHandler();
- Log.d(TAG, "END connectionFailed.");
- }
-
- /**
- * launch reconnection handler.
- */
- private void launchReconnectionHandler() {
- mConnectionHandler.postAtTime(mConnectionRunnable, Integer.parseInt(mSettings.getString(
- "settings_key_reco_delay", "10"))
- * 1000 + SystemClock.uptimeMillis());
- }
-
- /**
- * Show an error message with a toast.
- * @param errorMsg The message to display.
- */
- private void showToast(final String errorMsg) {
- mConnectionHandler.post(new Runnable() {
- /**
- * @{inheritDoc
- */
- @Override
- public void run() {
- Toast.makeText(Login.this, errorMsg, Toast.LENGTH_LONG).show();
- TextView labelError = (TextView) findViewById(R.id.log_as_msg);
- labelError.setText(getString(R.string.login_error_msg, errorMsg));
- }
- });
- }
-
- /**
- * Dismiss the progress dialog.
- */
- private void dismissProgressDialog() {
- mConnectionHandler.post(new Runnable() {
-
- /**
- * @{inheritDoc
- */
- @Override
- public void run() {
- mProgressDialog.dismiss();
- }
- });
- }
-
- @Override
- public void onConnect() throws RemoteException {
- Log.d(TAG, "BEGIN onConnect.");
- dismissProgressDialog();
- mXmppFacade.changeStatus(Status.CONTACT_STATUS_AVAILABLE, null);
- mRetry = 0;
- startActivity(new Intent(Login.this, ContactList.class));
- finish();
- Log.d(TAG, "END onConnect.");
- }
-
- @Override
- public void reconnectingIn(int seconds) throws RemoteException {
- }
-
- @Override
- public void reconnectionFailed() throws RemoteException {
- }
-
- @Override
- public void reconnectionSuccessful() throws RemoteException {
- }
- }
-
- /**
- * ServiceConnection use to connect to the Beem Service.
- */
- private class BeemServiceConnection implements ServiceConnection {
- /**
- * Constructor.
- */
- public BeemServiceConnection() {
- }
-
- @Override
- public void onServiceConnected(ComponentName name, IBinder service) {
- Log.d(TAG, "BEGIN onServiceConnected.");
- mXmppFacade = IXmppFacade.Stub.asInterface(service);
- mIsConnectedService = true;
- try {
- mXmppConnection = mXmppFacade.createConnection();
- mXmppConnection.addConnectionListener(new BeemConnectionListener());
- if (!mXmppConnection.isAuthentificated()) {
- mConnectionHandler.post(new Runnable() {
- @Override
- public void run() {
- mProgressDialog.setMessage(getString(R.string.login_login_progress));
- mProgressDialog.show();
- }
- });
- Login.this.startService(Login.SERVICE_INTENT);
- } else {
- startActivity(new Intent(Login.this, ContactList.class));
- finish();
- }
- } catch (RemoteException e) {
- Log.e(TAG, e.getMessage());
- }
- Log.d(TAG, "END onServiceConnected.");
- }
-
- @Override
- public void onServiceDisconnected(ComponentName name) {
- Log.d(TAG, "BEGIN onServiceDisconnected.");
- mIsConnectedService = false;
- mXmppFacade = null;
- Log.d(TAG, "END onServiceDisconnected.");
- }
- }
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/com/beem/project/beem/ui/LoginAnim.java Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,273 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
+package com.beem.project.beem.ui;
+
+import android.app.Activity;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.widget.Button;
+import android.widget.ImageView;
+
+import com.beem.project.beem.R;
+import com.beem.project.beem.service.aidl.IXmppConnection;
+import com.beem.project.beem.service.aidl.IXmppFacade;
+
+// TODO: Auto-generated Javadoc
+/**
+ * This class is an activity which display an animation during the connection with the server.
+ * @author Da Risk <darisk972@gmail.com>
+ */
+public class LoginAnim extends Activity {
+
+ private static final String TAG = "LoginAnim";
+ private static final Intent SERVICE_INTENT = new Intent();
+ static {
+ SERVICE_INTENT.setComponent(new ComponentName("com.beem.project.beem", "com.beem.project.beem.BeemService"));
+ }
+ private ImageView mLogo;
+ private Animation mRotateAnim;
+ private final ServiceConnection mServConn = new LoginServiceConnection();
+ private IXmppFacade mXmppFacade;
+ private AsyncTask<IXmppFacade, Void, Boolean> mTask;
+ private Button mCancelBt;
+
+ /**
+ * Constructor.
+ */
+ public LoginAnim() {
+ }
+
+ /* (non-Javadoc)
+ * @see android.app.Activity#onCreate(android.os.Bundle)
+ */
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.login_anim);
+ mLogo = (ImageView) findViewById(R.id.loginanim_logo_anim);
+ mRotateAnim = AnimationUtils.loadAnimation(this, R.anim.rotate_and_scale);
+ mCancelBt = (Button) findViewById(R.id.loginanim_cancel_button);
+ mCancelBt.setOnClickListener(new ClickListener());
+ }
+
+ /* (non-Javadoc)
+ * @see android.app.Activity#onStart()
+ */
+ @Override
+ protected void onStart() {
+ super.onStart();
+ mLogo.startAnimation(mRotateAnim);
+ }
+
+ /* (non-Javadoc)
+ * @see android.app.Activity#onResume()
+ */
+ @Override
+ protected void onResume() {
+ super.onResume();
+ if (mTask == null)
+ mTask = new LoginTask();
+ if (mXmppFacade == null)
+ bindService(LoginAnim.SERVICE_INTENT, mServConn, BIND_AUTO_CREATE);
+ }
+
+ /* (non-Javadoc)
+ * @see android.app.Activity#onPause()
+ */
+ @Override
+ protected void onPause() {
+ super.onPause();
+ if (mXmppFacade != null) { // and async task not en cours
+ unbindService(mServConn);
+ mXmppFacade = null;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see android.app.Activity#onKeyDown(int, android.view.KeyEvent)
+ */
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ // TODO use onBackPressed on Eclair (2.0)
+ if (keyCode == KeyEvent.KEYCODE_BACK && mTask.getStatus() != AsyncTask.Status.FINISHED) {
+ if (!mTask.cancel(true)) {
+ Log.d(TAG, "Can't interrupt the connection");
+ }
+ setResult(Activity.RESULT_CANCELED);
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+
+ /**
+ * Click event listener on cancel button.
+ */
+ private class ClickListener implements OnClickListener {
+
+ /**
+ * Constructor.
+ */
+ ClickListener() {
+ }
+
+ @Override
+ public void onClick(View v) {
+ if (v == mCancelBt) {
+ if (!mTask.cancel(true)) {
+ Log.d(TAG, "Can't interrupt the connection");
+ }
+ setResult(Activity.RESULT_CANCELED);
+ finish();
+ }
+ }
+ }
+
+ /**
+ * Asynchronous class for connection.
+ */
+ class LoginTask extends AsyncTask<IXmppFacade, Void, Boolean> {
+
+ private IXmppConnection mConnection;
+ private String mMsg;
+
+ /**
+ * Constructor.
+ */
+ LoginTask() {
+ }
+
+ /* (non-Javadoc)
+ * @see android.os.AsyncTask#doInBackground(Params[])
+ */
+ @Override
+ protected Boolean doInBackground(IXmppFacade... params) {
+ boolean result = true;
+ IXmppFacade facade = params[0];
+ try {
+ mConnection = facade.createConnection();
+ if (!mConnection.isAuthentificated()) {
+ result = mConnection.connectSync();
+ if (!result)
+ mMsg = mConnection.getErrorMessage();
+ }
+ } catch (RemoteException e) {
+ mMsg = "Exception during connection";
+ result = false;
+ }
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see android.os.AsyncTask#onPostExecute(java.lang.Object)
+ */
+ @Override
+ protected void onPostExecute(Boolean result) {
+
+ if (result == null || !result) { // Task cancelled or exception
+ if (!result) {
+ Intent i = new Intent();
+ i.putExtra("message", mMsg);
+ LoginAnim.this.setResult(Activity.RESULT_CANCELED, i);
+ } else
+ LoginAnim.this.setResult(Activity.RESULT_CANCELED);
+ LoginAnim.this.finish();
+ } else {
+ mCancelBt.setEnabled(false);
+ LoginAnim.this.startService(LoginAnim.SERVICE_INTENT);
+ LoginAnim.this.setResult(Activity.RESULT_OK);
+ LoginAnim.this.finish();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see android.os.AsyncTask#onCancelled()
+ */
+ @Override
+ protected void onCancelled() {
+ try {
+ if (mConnection != null && mConnection.isAuthentificated()) {
+ mConnection.disconnect();
+ }
+ } catch (RemoteException e) {
+ Log.d(TAG, "Remote exception", e);
+ }
+ LoginAnim.this.stopService(LoginAnim.SERVICE_INTENT);
+ }
+
+ }
+
+ /**
+ * The service connection used to connect to the Beem service.
+ */
+ private class LoginServiceConnection implements ServiceConnection {
+
+ /**
+ * Constructor.
+ */
+ public LoginServiceConnection() {
+ }
+
+ @Override
+ public void onServiceConnected(ComponentName name, IBinder service) {
+ mXmppFacade = IXmppFacade.Stub.asInterface(service);
+ if (mTask.getStatus() == AsyncTask.Status.PENDING)
+ mTask = mTask.execute(mXmppFacade);
+ }
+
+ @Override
+ public void onServiceDisconnected(ComponentName name) {
+ mXmppFacade = null;
+ }
+ }
+}
--- a/src/com/beem/project/beem/ui/PrivacyList.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/ui/PrivacyList.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,9 +1,22 @@
+/**
+ * BEEM is a videoconference application on the Android Platform. Copyright (C) 2009 by Frederic-Charles Barthelery,
+ * Jean-Manuel Da Silva, Nikita Kozlov, Philippe Lago, Jean Baptiste Vergely, Vincent Véronis. This file is part of
+ * BEEM. BEEM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
+ * version. BEEM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License along with BEEM. If not, see
+ * <http://www.gnu.org/licenses/>. Please send bug reports with examples or suggestions to contact@beem-project.com or
+ * http://dev.beem-project.com/ Epitech, hereby disclaims all copyright interest in the program “Beem” written by
+ * Frederic-Charles Barthelery, Jean-Manuel Da Silva, Nikita Kozlov, Philippe Lago, Jean Baptiste Vergely, Vincent
+ * Veronis. Nicolas Sadirac, November 26, 2009 President of Epitech. Flavien Astraud, November 26, 2009 Head of the EIP
+ * Laboratory.
+ */
package com.beem.project.beem.ui;
import java.util.ArrayList;
import java.util.List;
-import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ListActivity;
import android.content.ComponentName;
@@ -11,26 +24,27 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
+import android.content.DialogInterface.OnDismissListener;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
-import android.view.LayoutInflater;
+import android.view.ContextMenu;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
+import android.widget.AdapterView;
import android.widget.ArrayAdapter;
-import android.widget.EditText;
-import android.widget.ListView;
-import com.beem.project.beem.BeemService;
import com.beem.project.beem.R;
import com.beem.project.beem.service.PrivacyListItem;
import com.beem.project.beem.service.aidl.IPrivacyListListener;
import com.beem.project.beem.service.aidl.IPrivacyListManager;
import com.beem.project.beem.service.aidl.IXmppFacade;
+import com.beem.project.beem.ui.dialogs.builders.CreatePrivacyList;
+import com.beem.project.beem.ui.dialogs.builders.DeletePrivacyList;
import com.beem.project.beem.utils.BeemBroadcastReceiver;
/**
@@ -44,17 +58,19 @@
static {
SERVICE_INTENT.setComponent(new ComponentName("com.beem.project.beem", "com.beem.project.beem.BeemService"));
}
- private static final int DIALOG_PRIVACY_LIST_ITEM = 1;
- private static final int DIALOG_CREATE_PRIVACY_LIST = 2;
+
+ private static final int DIALOG_CREATE = 0;
+ private static final int DIALOG_UPDATE_BUDDIES = 1;
+ private static final int DIALOG_UPDATE_GROUPS = 2;
+ private static final int DIALOG_DELETE = 3;
private static final String SAVED_INSTANCE_KEY_PRIVACY_LISTS = "PRIVACY_LISTS";
- private static final String SAVED_INSTANCE_KEY_LAST_CLICKED_ITEM = "LAST_CLICKED_ITEM";
private Handler mHandler = new Handler();
private ArrayAdapter<String> mAdapter;
private final List<String> mPrivacyListNames = new ArrayList<String>();
- private int mPosLastClickedItem;
+ private String mCurrPrivacyListName;
private final ServiceConnection mConn = new BeemServiceConnection();
private BeemBroadcastReceiver mBroadcastReceiver;
@@ -76,7 +92,6 @@
protected void onSaveInstanceState(Bundle savedInstanceState) {
Log.d(TAG, "BEGIN onSaveInstanceState.");
savedInstanceState.putStringArrayList(SAVED_INSTANCE_KEY_PRIVACY_LISTS, (ArrayList<String>) mPrivacyListNames);
- savedInstanceState.putInt(SAVED_INSTANCE_KEY_LAST_CLICKED_ITEM, mPosLastClickedItem);
Log.d(TAG, "END onSaveInstanceState.");
super.onSaveInstanceState(savedInstanceState);
}
@@ -88,18 +103,21 @@
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.d(TAG, "BEGIN onCreate.");
+
setContentView(R.layout.privacy_list);
+ registerForContextMenu(this.getListView());
mHandler = new Handler();
if (savedInstanceState != null && !savedInstanceState.isEmpty()) {
mPrivacyListNames.addAll(savedInstanceState.getStringArrayList(SAVED_INSTANCE_KEY_PRIVACY_LISTS));
- mPosLastClickedItem = savedInstanceState.getInt(SAVED_INSTANCE_KEY_LAST_CLICKED_ITEM);
}
mAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mPrivacyListNames);
setListAdapter(mAdapter);
+ bindService(SERVICE_INTENT, mConn, BIND_AUTO_CREATE);
+
mPrivacyListListener = new PrivacyListListener();
mBroadcastReceiver = new BeemBroadcastReceiver(mConn);
this.registerReceiver(mBroadcastReceiver, new IntentFilter(BeemBroadcastReceiver.BEEM_CONNECTION_CLOSED));
@@ -111,76 +129,11 @@
* {@inheritDoc}.
*/
@Override
- protected void onPrepareDialog(int id, Dialog dialog) {
- Log.d(TAG, "BEGIN onPrepareDialog.");
- switch (id) {
- case DIALOG_PRIVACY_LIST_ITEM:
- String dialogTitle = (mPosLastClickedItem > mPrivacyListNames.size() ? "" : mPrivacyListNames
- .get(mPosLastClickedItem));
- dialog.setTitle(dialogTitle);
- }
- Log.d(TAG, "END onPrepareDialog.");
- }
-
- /**
- * {@inheritDoc}.
- */
- @Override
- protected Dialog onCreateDialog(int id) {
- Log.d(TAG, "BEGIN onCreateDialog.");
- switch (id) {
- case DIALOG_PRIVACY_LIST_ITEM:
- return new AlertDialog.Builder(this).setTitle("X").setItems(R.array.privacy_list_select_dialog,
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- String[] items = getResources().getStringArray(R.array.privacy_list_select_dialog);
- if (items[which].equals(getResources().getString(
- R.string.privacy_list_select_dialog_delete))) {
- try {
- mPrivacyListManager.removePrivacyList(mPrivacyListNames.get(mPosLastClickedItem));
- } catch (RemoteException e) {
- Log.e(TAG, e.getMessage());
- }
- dismissDialog(DIALOG_PRIVACY_LIST_ITEM);
- }
- }
- }).create();
-
- case DIALOG_CREATE_PRIVACY_LIST:
- LayoutInflater factory = LayoutInflater.from(this);
- final View textEntryView = factory.inflate(R.layout.privacy_list_create_dialog, null);
-
- return new AlertDialog.Builder(this).setTitle(R.string.privacy_list_create_dialog_title).setView(
- textEntryView).setPositiveButton(R.string.privacy_list_create_dialog_create_button,
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int whichButton) {
- EditText listNameField = (EditText) textEntryView
- .findViewById(R.id.privacy_list_create_dialog_list_name);
- try {
- mPrivacyListManager.createPrivacyList(listNameField.getText().toString(),
- new ArrayList<PrivacyListItem>());
- } catch (RemoteException e) {
- Log.e(TAG, e.getMessage());
- }
- }
- }).setNegativeButton(R.string.CancelButton, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int whichButton) {
- }
- }).create();
- }
- Log.d(TAG, "END onCreateDialog.");
- return null;
- }
-
- /**
- * {@inheritDoc}.
- */
- @Override
protected void onDestroy() {
super.onDestroy();
Log.v(TAG, "BEGIN onDestroy.");
- this.unregisterReceiver(mBroadcastReceiver);
+
if (mPrivacyListManager != null) {
try {
mPrivacyListManager.removePrivacyListListener(mPrivacyListListener);
@@ -188,6 +141,10 @@
Log.e(TAG, e.getMessage());
}
}
+
+ this.unregisterReceiver(mBroadcastReceiver);
+ unbindService(mConn);
+
Log.v(TAG, "END onDestroy.");
}
@@ -199,7 +156,6 @@
super.onStart();
Log.v(TAG, "BEGIN onStart.");
- bindService(new Intent(this, BeemService.class), mConn, BIND_AUTO_CREATE);
Log.v(TAG, "END onStart.");
}
@@ -211,10 +167,41 @@
super.onStop();
Log.v(TAG, "BEGIN onStop.");
- if (mBroadcastReceiver.isBinded()) {
- unbindService(mConn);
+ Log.v(TAG, "END onStop.");
+ }
+
+ /**
+ * {@inheritDoc}.
+ */
+ @Override
+ protected Dialog onCreateDialog(int id) {
+ Dialog dialog;
+ switch (id) {
+ case DIALOG_CREATE:
+ dialog = new CreatePrivacyList(PrivacyList.this, mPrivacyListManager).create();
+ dialog.setOnDismissListener(new OnDismissListener() {
+
+ @Override
+ public void onDismiss(DialogInterface dialog) {
+ PrivacyList.this.removeDialog(DIALOG_CREATE);
+ }
+ });
+ break;
+ case DIALOG_DELETE:
+ dialog = new DeletePrivacyList(PrivacyList.this, mPrivacyListManager, mCurrPrivacyListName).create();
+ dialog.setOnDismissListener(new OnDismissListener() {
+
+ @Override
+ public void onDismiss(DialogInterface dialog) {
+ PrivacyList.this.removeDialog(DIALOG_DELETE);
+ }
+
+ });
+ break;
+ default:
+ dialog = null;
}
- Log.v(TAG, "END onStop.");
+ return dialog;
}
/**
@@ -230,12 +217,33 @@
}
/**
- * {@inheritDoc}.
+ * {@inheritDoc}
*/
@Override
- public void onListItemClick(ListView l, View v, int position, long id) {
- mPosLastClickedItem = position;
- showDialog(DIALOG_PRIVACY_LIST_ITEM);
+ public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
+ super.onCreateContextMenu(menu, v, menuInfo);
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.privacy_list_context, menu);
+ mCurrPrivacyListName = mPrivacyListNames.get(((AdapterView.AdapterContextMenuInfo) menuInfo).position);
+ menu.setHeaderTitle(mCurrPrivacyListName);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean onContextItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.privacy_list_context_menu_buddies_item:
+ return true;
+ case R.id.privacy_list_context_menu_groups_item:
+ return true;
+ case R.id.privacy_list_context_menu_delete_item:
+ showDialog(DIALOG_DELETE);
+ return true;
+ default:
+ return super.onContextItemSelected(item);
+ }
}
/**
@@ -245,7 +253,7 @@
public final boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.privacy_list_menu_create:
- showDialog(DIALOG_CREATE_PRIVACY_LIST);
+ showDialog(DIALOG_CREATE);
return true;
default:
return false;
--- a/src/com/beem/project/beem/ui/Settings.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/ui/Settings.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.ui;
import android.content.BroadcastReceiver;
@@ -15,6 +58,7 @@
import com.beem.project.beem.R;
import com.beem.project.beem.utils.BeemBroadcastReceiver;
+// TODO: Auto-generated Javadoc
/**
* This class represents an activity which allows the user to change his account or proxy parameters.
*/
@@ -33,6 +77,9 @@
public Settings() {
}
+ /* (non-Javadoc)
+ * @see android.preference.PreferenceActivity#onCreate(android.os.Bundle)
+ */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -92,20 +139,9 @@
i = new Intent(this, CreateAccount.class);
startActivity(i);
return true;
- case R.id.settings_menu_login:
- setResult(RESULT_OK);
- SharedPreferences settings = getPreferenceManager().getSharedPreferences();
- settings.edit().putBoolean(
- "PreferenceIsConfigured",
- !"".equals(settings.getString("settings_key_account_username", ""))
- || !"".equals(settings.getString("settings_key_account_password", ""))).commit();
- this.stopService(SERVICE_INTENT);
- finish();
- return true;
case R.id.settings_menu_privacy_lists:
- /*
- * i = new Intent(this, PrivacyList.class); startActivity(i);
- */
+ i = new Intent(this, PrivacyList.class);
+ startActivity(i);
return true;
default:
return false;
--- a/src/com/beem/project/beem/ui/Subscription.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/ui/Subscription.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.ui;
import org.jivesoftware.smack.packet.Presence;
@@ -22,6 +65,7 @@
import com.beem.project.beem.service.aidl.IXmppFacade;
import com.beem.project.beem.utils.BeemBroadcastReceiver;
+// TODO: Auto-generated Javadoc
/**
* This activity is used to accept a subscription request.
* @author nikita
@@ -45,6 +89,9 @@
public Subscription() {
}
+ /* (non-Javadoc)
+ * @see android.app.Activity#onCreate(android.os.Bundle)
+ */
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -59,6 +106,9 @@
this.registerReceiver(mReceiver, new IntentFilter(BeemBroadcastReceiver.BEEM_CONNECTION_CLOSED));
}
+ /* (non-Javadoc)
+ * @see android.app.Activity#onResume()
+ */
@Override
protected void onResume() {
super.onResume();
@@ -66,6 +116,9 @@
mReceiver.setBinded(true);
}
+ /* (non-Javadoc)
+ * @see android.app.Activity#onPause()
+ */
@Override
protected void onPause() {
super.onPause();
@@ -75,6 +128,9 @@
}
}
+ /* (non-Javadoc)
+ * @see android.app.Activity#onDestroy()
+ */
@Override
protected void onDestroy() {
super.onDestroy();
--- a/src/com/beem/project/beem/ui/UserInfo.java Thu Nov 26 15:21:46 2009 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,370 +0,0 @@
-package com.beem.project.beem.ui;
-
-import java.util.List;
-
-import org.jivesoftware.smack.packet.Presence;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.ServiceConnection;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.Gallery;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.beem.project.beem.BeemService;
-import com.beem.project.beem.R;
-import com.beem.project.beem.service.Contact;
-import com.beem.project.beem.service.PresenceAdapter;
-import com.beem.project.beem.service.aidl.IRoster;
-import com.beem.project.beem.service.aidl.IXmppFacade;
-import com.beem.project.beem.utils.BeemBroadcastReceiver;
-
-/**
- * This activity class provides the view for user infos after long click on a correspondant.
- * @author marseille
- */
-public class UserInfo extends Activity {
-
- private static final Intent SERVICE_INTENT = new Intent();
- private final ServiceConnection mServConn = new BeemServiceConnection();
- private TextView mTextAlias;
- private Gallery mGalleryGroups;
- private Contact mContact;
- private IXmppFacade mXmppFacade;
- private BeemBroadcastReceiver mReceiver;
- private String mJID;
- private IRoster mRoster;
-
- static {
- SERVICE_INTENT.setComponent(new ComponentName("com.beem.project.beem", "com.beem.project.beem.BeemService"));
- }
-
- /**
- * Constructor.
- */
- public UserInfo() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.userinfo);
- View v = (View) findViewById(R.id.userinfo_layout_alias);
- v.setOnClickListener(new AliasListener());
- v = findViewById(R.id.userinfo_layout_delete);
- v.setOnClickListener(new DeleteListener());
- v = findViewById(R.id.userinfo_layout_chg_group);
- v.setOnClickListener(new GroupListener());
- v = findViewById(R.id.userinfo_layout_re_suscription);
- v.setOnClickListener(new ResendListener());
- mTextAlias = (TextView) findViewById(R.id.userinfo_alias);
- mGalleryGroups = (Gallery) findViewById(R.id.userinfo_groups);
- mReceiver = new BeemBroadcastReceiver(mServConn);
- this.registerReceiver(mReceiver, new IntentFilter(BeemBroadcastReceiver.BEEM_CONNECTION_CLOSED));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void onResume() {
- super.onResume();
- bindService(new Intent(this, BeemService.class), mServConn, BIND_AUTO_CREATE);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void onPause() {
- super.onPause();
- if (mReceiver.isBinded()) {
- unbindService(mServConn);
- mReceiver.setBinded(false);
- }
- }
-
- @Override
- protected void onDestroy() {
- super.onDestroy();
- this.unregisterReceiver(mReceiver);
- }
-
- /**
- * Event simple click on layout alias.
- */
- private class AliasListener implements View.OnClickListener {
- /**
- * Constructor.
- */
- public AliasListener() {
- }
-
- @Override
- public void onClick(View v) {
- Dialog d = new DialogAlias();
- d.show();
- }
- }
-
- /**
- * Event simple click on layout group.
- */
- private class GroupListener implements View.OnClickListener {
- /**
- * Constructor.
- */
- public GroupListener() {
- }
-
- @Override
- public void onClick(View v) {
- Intent i = new Intent(UserInfo.this, GroupList.class);
- i.putExtra("contact", mContact);
- startActivity(i);
- }
-
- }
-
- /**
- * Create dialog alias.
- */
- public class DialogAlias extends Dialog {
-
- /**
- * Constructor.
- */
- public DialogAlias() {
- super(UserInfo.this);
- setContentView(R.layout.contactdialogaliasdialog);
- setTitle(mContact.getJID());
- EditText nameText = (EditText) findViewById(R.id.CDAliasDialogName);
- if (mContact.getName().length() == 0)
- nameText.setText(mContact.getJID());
- else
- nameText.setText(mContact.getName());
- Button ok = (Button) findViewById(R.id.CDAliasDialogOk);
- ok.setOnClickListener(new ContactDialogAliasDialogOK());
- }
-
- /**
- * Event click on the button OK.
- */
- private class ContactDialogAliasDialogOK implements View.OnClickListener {
-
- /**
- * Constructor.
- */
- public ContactDialogAliasDialogOK() {
- }
-
- @Override
- public void onClick(View v) {
- try {
- EditText nameText = (EditText) findViewById(R.id.CDAliasDialogName);
- String name = nameText.getText().toString();
- if (name.length() == 0)
- name = mContact.getJID();
- mRoster.setContactName(mContact.getJID(), name);
- mContact.setName(name);
- mTextAlias.setText(name);
-
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- dismiss();
- }
- }
- }
-
- /**
- * Adapter group horizontal list.
- */
- public class BeemGroups extends BaseAdapter {
- private Context mContext;
- private List<String> mListGroup;
-
- /**
- * Constructor.
- * @param c context activity.
- * @param listGroup the user group list.
- */
- public BeemGroups(final Context c, final List<String> listGroup) {
- mContext = c;
- if (listGroup.size() == 0)
- listGroup.add(getString(R.string.contact_list_no_group));
- mListGroup = listGroup;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int getCount() {
- return mListGroup.size();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object getItem(int position) {
- return position;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public long getItemId(int position) {
- return position;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- TextView textView = new TextView(mContext);
- textView.setText(mListGroup.get(position));
- return textView;
- }
-
- }
-
- /**
- * Event simple click on layout resend suscription.
- */
- class ResendListener implements View.OnClickListener {
-
- /**
- * Constructor.
- */
- public ResendListener() {
- }
-
- @Override
- public void onClick(View v) {
-
- AlertDialog.Builder builder = new AlertDialog.Builder(UserInfo.this);
- builder.setMessage(UserInfo.this.getString(R.string.userinfo_sureresend)).setCancelable(false)
- .setPositiveButton(UserInfo.this.getString(R.string.userinfo_yes),
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- Presence presencePacket = new Presence(Presence.Type.subscribe);
- presencePacket.setTo(mContact.getJID());
- try {
- mXmppFacade.sendPresencePacket(new PresenceAdapter(presencePacket));
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- Toast.makeText(UserInfo.this, getString(R.string.userinfo_resend), Toast.LENGTH_SHORT)
- .show();
- }
- }).setNegativeButton(UserInfo.this.getString(R.string.userinfo_no),
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- dialog.cancel();
- }
- });
- AlertDialog alert = builder.create();
- alert.show();
- }
-
- }
-
- /**
- * Event simple click on layout delete.
- */
- class DeleteListener implements View.OnClickListener {
-
- /**
- * Constructor.
- */
- public DeleteListener() {
- }
-
- @Override
- public void onClick(View v) {
- AlertDialog.Builder builder = new AlertDialog.Builder(UserInfo.this);
- builder.setMessage(UserInfo.this.getString(R.string.userinfo_sure2delete)).setCancelable(false)
- .setPositiveButton(UserInfo.this.getString(R.string.userinfo_yes),
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- try {
- mRoster.deleteContact(mContact);
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- finish();
- }
- }).setNegativeButton(UserInfo.this.getString(R.string.userinfo_no),
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- dialog.cancel();
- }
- });
- AlertDialog alert = builder.create();
- alert.show();
- }
- }
-
- /**
- * The ServiceConnection used to connect to the Beem service.
- */
- private class BeemServiceConnection implements ServiceConnection {
-
- /**
- * Constructor.
- */
- public BeemServiceConnection() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void onServiceConnected(ComponentName name, IBinder service) {
- mXmppFacade = IXmppFacade.Stub.asInterface(service);
- mReceiver.setBinded(true);
- try {
- mRoster = mXmppFacade.getRoster();
- mJID = getIntent().getStringExtra("contact_contactdialog");
- mContact = mRoster.getContact(mJID);
- if (mContact.getName() != null)
- mTextAlias.setText(mContact.getName());
- else
- mTextAlias.setText(mContact.getJID());
- mGalleryGroups.setAdapter(new BeemGroups(UserInfo.this, mContact.getGroups()));
- setTitle(mJID);
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void onServiceDisconnected(ComponentName name) {
- mXmppFacade = null;
- }
- }
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/com/beem/project/beem/ui/dialogs/builders/Alias.java Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,76 @@
+package com.beem.project.beem.ui.dialogs.builders;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.os.RemoteException;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.EditText;
+
+import com.beem.project.beem.R;
+import com.beem.project.beem.service.Contact;
+import com.beem.project.beem.service.aidl.IRoster;
+
+/**
+ * Create dialog alias.
+ */
+public class Alias extends AlertDialog.Builder {
+
+ private final static String TAG = "Dialogs.Builders > Alias";
+
+ private IRoster mRoster;
+ private Contact mContact;
+ private EditText mEditTextAlias;
+
+ /**
+ * Constructor.
+ * @param context context activity.
+ */
+ public Alias(final Context context, IRoster roster, Contact contact) {
+ super(context);
+
+ mRoster = roster;
+ mContact = contact;
+
+ LayoutInflater factory = LayoutInflater.from(context);
+ final View textEntryView = factory.inflate(R.layout.contactdialogaliasdialog, null);
+ setTitle(mContact.getJID());
+ setView(textEntryView);
+ mEditTextAlias = (EditText) textEntryView.findViewById(R.id.CDAliasDialogName);
+ mEditTextAlias.setText(mContact.getName());
+ setPositiveButton(R.string.OkButton, new DialogClickListener());
+ setNegativeButton(R.string.CancelButton, new DialogClickListener());
+ }
+
+ /**
+ * Event click listener.
+ */
+ class DialogClickListener implements DialogInterface.OnClickListener {
+
+ /**
+ * Constructor.
+ */
+ public DialogClickListener() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see android.content.DialogInterface.OnClickListener#onClick(android.content.DialogInterface, int)
+ */
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (which == DialogInterface.BUTTON_POSITIVE) {
+ String name = mEditTextAlias.getText().toString();
+ if (name.length() == 0)
+ name = mContact.getJID();
+ try {
+ mRoster.setContactName(mContact.getJID(), name);
+ } catch (RemoteException e) {
+ Log.e(TAG, e.getMessage());
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/com/beem/project/beem/ui/dialogs/builders/CreatePrivacyList.java Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,80 @@
+package com.beem.project.beem.ui.dialogs.builders;
+
+import java.util.ArrayList;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.os.RemoteException;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.EditText;
+
+import com.beem.project.beem.R;
+import com.beem.project.beem.service.PrivacyListItem;
+import com.beem.project.beem.service.aidl.IPrivacyListManager;
+
+/**
+ * Use this builder to build a dialog which handles a privacy list creation.
+ * @author Jean-Manuel Da Silva <dasilvj at beem-project dot com>
+ */
+public class CreatePrivacyList extends AlertDialog.Builder {
+
+ private static final String TAG = "Dialogs.Builders > CreatePrivacyList";
+
+ private final IPrivacyListManager mPrivacyListManager;
+ private final View mTextEntryView;
+ private EditText mListNameField;
+
+ /**
+ * Constructor.
+ * @param context context activity.
+ */
+ public CreatePrivacyList(final Context context, IPrivacyListManager privacyListManager) {
+ super(context);
+
+ LayoutInflater factory = LayoutInflater.from(context);
+
+ mTextEntryView = factory.inflate(R.layout.privacy_list_create_dialog, null);
+ setView(mTextEntryView);
+
+ mPrivacyListManager = privacyListManager;
+ mListNameField = (EditText) mTextEntryView.findViewById(R.id.privacy_list_create_dialog_list_name);
+
+ setTitle(R.string.privacy_list_create_dialog_title);
+ setPositiveButton(R.string.privacy_list_create_dialog_create_button, new DialogClickListener());
+ setNegativeButton(R.string.CancelButton, new DialogClickListener());
+ }
+
+ /**
+ * Event click listener.
+ */
+ class DialogClickListener implements DialogInterface.OnClickListener {
+
+ /**
+ * Constructor.
+ */
+ public DialogClickListener() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see android.content.DialogInterface.OnClickListener#onClick(android.content.DialogInterface, int)
+ */
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (which == DialogInterface.BUTTON_POSITIVE) {
+ try {
+ Log.d(TAG, "mPrivacyListManager ## " + mPrivacyListManager);
+ Log.d(TAG, "listNameField ## " + mListNameField);
+ Log.d(TAG, "listNameField.getText().toString() ## " + mListNameField.getText().toString());
+ mPrivacyListManager.createPrivacyList(mListNameField.getText().toString(),
+ new ArrayList<PrivacyListItem>());
+ } catch (RemoteException e) {
+ Log.e(TAG, e.getMessage());
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/com/beem/project/beem/ui/dialogs/builders/DeleteContact.java Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,58 @@
+package com.beem.project.beem.ui.dialogs.builders;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.beem.project.beem.R;
+import com.beem.project.beem.service.Contact;
+import com.beem.project.beem.service.aidl.IRoster;
+
+public class DeleteContact extends AlertDialog.Builder {
+
+ private final static String TAG = "Dialogs.Builders > DeleteContact";
+
+ private IRoster mRoster;
+ private Contact mContact;
+
+ /**
+ * Constructor.
+ * @param context context activity.
+ */
+ public DeleteContact(final Context context, IRoster roster, Contact contact) {
+ super(context);
+
+ mContact = contact;
+ mRoster = roster;
+
+ setMessage(R.string.userinfo_sure2delete);
+ DialogClickListener dl = new DialogClickListener();
+ setPositiveButton(R.string.userinfo_yes, dl);
+ setNegativeButton(R.string.userinfo_no, dl);
+ }
+
+ /**
+ * Event click listener.
+ */
+ private class DialogClickListener implements DialogInterface.OnClickListener {
+
+ /**
+ * Constructor.
+ */
+ public DialogClickListener() {
+ }
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (which == DialogInterface.BUTTON_POSITIVE) {
+ try {
+ mRoster.deleteContact(mContact);
+ } catch (RemoteException e) {
+ Log.e(TAG, e.getMessage());
+ }
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/com/beem/project/beem/ui/dialogs/builders/DeletePrivacyList.java Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,57 @@
+package com.beem.project.beem.ui.dialogs.builders;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.beem.project.beem.R;
+import com.beem.project.beem.service.aidl.IPrivacyListManager;
+
+public class DeletePrivacyList extends AlertDialog.Builder {
+
+ private static final String TAG = "Dialogs.Builders > DeletePrivacyList";
+
+ private final IPrivacyListManager mPrivacyListManager;
+ private final String mPrivacyListName;
+
+ /**
+ * Constructor.
+ * @param context context activity.
+ */
+ public DeletePrivacyList(final Context context, IPrivacyListManager privacyListManager, String privacyListName) {
+ super(context);
+
+ mPrivacyListManager = privacyListManager;
+ mPrivacyListName = privacyListName;
+
+ setMessage(context.getString(R.string.privacy_list_delete_dialog_msg, privacyListName));
+ DialogClickListener dl = new DialogClickListener();
+ setPositiveButton(R.string.privacy_list_delete_dialog_yes, dl);
+ setNegativeButton(R.string.privacy_list_delete_dialog_no, dl);
+ }
+
+ /**
+ * Event click listener.
+ */
+ private class DialogClickListener implements DialogInterface.OnClickListener {
+
+ /**
+ * Constructor.
+ */
+ public DialogClickListener() {
+ }
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (which == DialogInterface.BUTTON_POSITIVE) {
+ try {
+ mPrivacyListManager.removePrivacyList(mPrivacyListName);
+ } catch (RemoteException e) {
+ Log.e(TAG, e.getMessage());
+ }
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/com/beem/project/beem/ui/dialogs/builders/ResendSubscription.java Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,72 @@
+package com.beem.project.beem.ui.dialogs.builders;
+
+import org.jivesoftware.smack.packet.Presence;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.os.RemoteException;
+import android.util.Log;
+import android.widget.Toast;
+
+import com.beem.project.beem.R;
+import com.beem.project.beem.service.Contact;
+import com.beem.project.beem.service.PresenceAdapter;
+import com.beem.project.beem.service.aidl.IXmppFacade;
+
+public class ResendSubscription extends AlertDialog.Builder {
+
+ private final static String TAG = "Dialogs.Builders > ResendSubscription";
+
+ private Context mContext;
+ private IXmppFacade mXmppFacade;
+ private Contact mContact;
+
+ /**
+ * Constructor.
+ * @param context context activity
+ */
+ public ResendSubscription(final Context context, IXmppFacade xmppFacade, Contact contact) {
+ super(context);
+
+ mContext = context;
+ mXmppFacade = xmppFacade;
+ mContact = contact;
+
+ setMessage(R.string.userinfo_sureresend);
+ DialogClickListener dl = new DialogClickListener();
+ setPositiveButton(R.string.userinfo_yes, dl);
+ setNegativeButton(R.string.userinfo_no, dl);
+ }
+
+ /**
+ * Event click listener.
+ */
+ class DialogClickListener implements DialogInterface.OnClickListener {
+
+ /**
+ * Constructor.
+ */
+ DialogClickListener() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see android.content.DialogInterface.OnClickListener#onClick(android.content.DialogInterface, int)
+ */
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (which == DialogInterface.BUTTON_POSITIVE) {
+ Presence presencePacket = new Presence(Presence.Type.subscribe);
+ presencePacket.setTo(mContact.getJID());
+ try {
+ mXmppFacade.sendPresencePacket(new PresenceAdapter(presencePacket));
+ Toast.makeText(mContext, mContext.getString(R.string.userinfo_resend), Toast.LENGTH_SHORT).show();
+ } catch (RemoteException e) {
+ Log.e(TAG, e.getMessage());
+ }
+ }
+ }
+
+ }
+}
--- a/src/com/beem/project/beem/ui/package-info.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/ui/package-info.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,5 +1,45 @@
/**
- * This package contains the class concerning the user interface (activities) of Beem.
- */
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.ui;
--- a/src/com/beem/project/beem/utils/BeemBroadcastReceiver.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/utils/BeemBroadcastReceiver.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,3 +1,46 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.utils;
import android.app.Activity;
@@ -8,17 +51,14 @@
import android.util.Log;
import android.widget.Toast;
-import com.beem.project.beem.ui.Login;
-
+// TODO: Auto-generated Javadoc
/**
* Manage broadcast disconnect intent.
* @author nikita
*/
public class BeemBroadcastReceiver extends BroadcastReceiver {
- /**
- * Broadcast intent type.
- */
+ /** Broadcast intent type. */
public static final String BEEM_CONNECTION_CLOSED = "BeemConnectionClosed";
private ServiceConnection mService;
private boolean mIsBinded;
@@ -41,9 +81,10 @@
if (mIsBinded)
context.unbindService(mService);
setBinded(false);
+ // TODO ce code est comment car il empeche de gerer un cancel sur une connexion
// start activity if unexpected disconnection
- if (!intent.getBooleanExtra("normally", false))
- context.startActivity(new Intent(context, Login.class));
+ // if (!intent.getBooleanExtra("normally", false))
+ // context.startActivity(new Intent(context, Login.class));
CharSequence message = intent.getCharSequenceExtra("message");
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
if (context instanceof Activity) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/com/beem/project/beem/utils/BeemConnectivity.java Tue Dec 15 10:29:46 2009 +0100
@@ -0,0 +1,113 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
+package com.beem.project.beem.utils;
+
+import android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
+import android.net.NetworkInfo.DetailedState;
+import android.net.wifi.WifiInfo;
+import android.net.wifi.WifiManager;
+import android.telephony.TelephonyManager;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class BeemConnectivity.
+ */
+public class BeemConnectivity {
+
+ /**
+ * Checks if is connected.
+ * @param ctx the ctx
+ * @return true, if is connected
+ */
+ static public boolean isConnected(Context ctx) {
+ ConnectivityManager cm = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE);
+ NetworkInfo ni = cm.getActiveNetworkInfo();
+ return ni != null && ni.isConnected();
+ }
+
+ /**
+ * Checks if is wifi.
+ * @param ctx the ctx
+ * @return true, if is wifi
+ */
+ public static boolean isWifi(Context ctx) {
+ WifiManager wm = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE);
+ WifiInfo wi = wm.getConnectionInfo();
+ if (wi != null)
+ return false;
+ if (wi != null
+ && (WifiInfo.getDetailedStateOf(wi.getSupplicantState()) == DetailedState.OBTAINING_IPADDR || WifiInfo
+ .getDetailedStateOf(wi.getSupplicantState()) == DetailedState.CONNECTED)) {
+ return false;
+ }
+ return false;
+ }
+
+ /**
+ * Checks if is umts.
+ * @param ctx the ctx
+ * @return true, if is umts
+ */
+ public static boolean isUmts(Context ctx) {
+ TelephonyManager tm = (TelephonyManager) ctx.getSystemService(Context.TELEPHONY_SERVICE);
+ if (tm.getNetworkType() >= TelephonyManager.NETWORK_TYPE_UMTS)
+ return true;
+ return false;
+ }
+
+ /**
+ * Checks if is edge.
+ * @param ctx the ctx
+ * @return true, if is edge
+ */
+ public static boolean isEdge(Context ctx) {
+ TelephonyManager tm = (TelephonyManager) ctx.getSystemService(Context.TELEPHONY_SERVICE);
+ if (tm.getNetworkType() == TelephonyManager.NETWORK_TYPE_EDGE)
+ return true;
+ return false;
+ }
+
+}
--- a/src/com/beem/project/beem/utils/FreePort.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/utils/FreePort.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,8 +1,52 @@
+/**
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.utils;
import java.io.IOException;
import java.net.ServerSocket;
+// TODO: Auto-generated Javadoc
/**
* Utility class to get a free port.
* @author nikita
--- a/src/com/beem/project/beem/utils/PresenceType.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/utils/PresenceType.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,50 +1,77 @@
/**
- *
- */
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.utils;
import org.jivesoftware.smack.packet.Presence;
+// TODO: Auto-generated Javadoc
/**
* Utility class to deal with Presence type.
* @author nikita
*/
public final class PresenceType {
- /**
- * The user is available to receive messages (default).
- */
+ /** The user is available to receive messages (default). */
public static final int AVAILABLE = 100;
- /**
- * The user is unavailable to receive messages.
- */
+ /** The user is unavailable to receive messages. */
public static final int UNAVAILABLE = 200;
- /**
- * Request subscription to recipient's presence.
- */
+ /** Request subscription to recipient's presence. */
public static final int SUBSCRIBE = 300;
- /**
- * Grant subscription to sender's presence.
- */
+ /** Grant subscription to sender's presence. */
public static final int SUBSCRIBED = 400;
- /**
- * Request removal of subscription to sender's presence.
- */
+ /** Request removal of subscription to sender's presence. */
public static final int UNSUBSCRIBE = 500;
- /**
- * Grant removal of subscription to sender's presence.
- */
+ /** Grant removal of subscription to sender's presence. */
public static final int UNSUBSCRIBED = 600;
- /**
- * The presence packet contains an error message.
- */
+ /** The presence packet contains an error message. */
public static final int ERROR = 701;
/**
--- a/src/com/beem/project/beem/utils/Status.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/utils/Status.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,45 +1,74 @@
/**
- *
- */
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.utils;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.packet.Presence.Mode;
+// TODO: Auto-generated Javadoc
/**
* Utility class to deal with status and presence value.
* @author marseille
*/
public final class Status {
- /**
- * Status of a disconnected contact.
- */
+ /** Status of a disconnected contact. */
public static final int CONTACT_STATUS_DISCONNECT = 100;
- /**
- * Status of a unavailable (long away) contact.
- */
+ /** Status of a unavailable (long away) contact. */
public static final int CONTACT_STATUS_UNAVAILABLE = 200;
- /**
- * Status of a away contact.
- */
+ /** Status of a away contact. */
public static final int CONTACT_STATUS_AWAY = 300;
- /**
- * Status of a busy contact.
- */
+ /** Status of a busy contact. */
public static final int CONTACT_STATUS_BUSY = 400;
- /**
- * Status of a available contact.
- */
+ /** Status of a available contact. */
public static final int CONTACT_STATUS_AVAILABLE = 500;
- /**
- * Status of a available for chat contact.
- */
+ /** Status of a available for chat contact. */
public static final int CONTACT_STATUS_AVAILABLE_FOR_CHAT = 600;
/**
--- a/src/com/beem/project/beem/utils/package-info.java Thu Nov 26 15:21:46 2009 +0100
+++ b/src/com/beem/project/beem/utils/package-info.java Tue Dec 15 10:29:46 2009 +0100
@@ -1,5 +1,45 @@
/**
- * This package contains utility class used by the Beem project.
- */
+ BEEM is a videoconference application on the Android Platform.
+
+ Copyright (C) 2009 by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Véronis.
+
+ This file is part of BEEM.
+
+ BEEM is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ BEEM is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with BEEM. If not, see <http://www.gnu.org/licenses/>.
+
+ Please send bug reports with examples or suggestions to
+ contact@beem-project.com or http://dev.beem-project.com/
+
+ Epitech, hereby disclaims all copyright interest in the program “Beem”
+ written by Frederic-Charles Barthelery,
+ Jean-Manuel Da Silva,
+ Nikita Kozlov,
+ Philippe Lago,
+ Jean Baptiste Vergely,
+ Vincent Veronis.
+
+ Nicolas Sadirac, November 26, 2009
+ President of Epitech.
+
+ Flavien Astraud, November 26, 2009
+ Head of the EIP Laboratory.
+
+*/
package com.beem.project.beem.utils;